31 if ( defined(
'MW_CONFIG_FILE' ) ) {
32 return MW_CONFIG_FILE;
35 if ( $installationPath ===
null ) {
44 $configFile = getenv(
'MW_CONFIG_FILE' ) ?:
"LocalSettings.php";
47 if ( strpos( $configFile,
'/' ) ===
false ) {
48 $configFile =
"$installationPath/$configFile";
51 define(
'MW_CONFIG_FILE', $configFile );
69 if ( !defined(
'MW_INSTALL_PATH' ) ) {
70 $IP = getenv(
'MW_INSTALL_PATH' );
71 if (
$IP ===
false ) {
72 $IP = dirname( __DIR__ );
74 define(
'MW_INSTALL_PATH',
$IP );
77 return MW_INSTALL_PATH;
86 return PHP_OS_FAMILY ===
'Windows';
96 return PHP_SAPI ===
'cli' || PHP_SAPI ===
'phpdbg';
wfDetectLocalSettingsFile(?string $installationPath=null)
Decide and remember where to load LocalSettings from.
wfIsWindows()
Check if the operating system is Windows.
wfDetectInstallPath()
Decide and remember where mediawiki is installed.
wfIsCLI()
Check if we are running from the commandline.
if(!defined( 'MEDIAWIKI')) if(ini_get('mbstring.func_overload')) if(!defined( 'MW_ENTRY_POINT')) global $IP
Environment checks.
if(!defined('MW_SETUP_CALLBACK'))
The persistent session ID (if any) loaded at startup.