# posix_getegid() *not* getmygid() because we want the group of the webserver,
# not whoever owns the current script.
$gid = posix_getegid();
- $getpwuid = posix_getpwuid( $gid );
- $group = $getpwuid['name'];
+ $group = posix_getpwuid( $gid )['name'];
return $group;
}
}
if ( !$caches ) {
- $key = 'config-no-cache';
- // PHP >=5.5 is called APCu, earlier versions use APC (T61998).
- if ( !wfIsHHVM() && version_compare( PHP_VERSION, '5.5', '>=' ) ) {
- // config-no-cache-apcu
- $key .= '-apcu';
- }
+ $key = 'config-no-cache-apcu';
$this->showMessage( $key );
}
* Override the necessary bits of the config to run an installation.
*/
public static function overrideConfig() {
- define( 'MW_NO_SESSION', 1 );
+ // Use PHP's built-in session handling, since MediaWiki's
+ // SessionHandler can't work before we have an object cache set up.
+ define( 'MW_NO_SESSION_HANDLER', 1 );
// Don't access the database
$GLOBALS['wgUseDatabaseMessages'] = false;
// Some of the environment checks make shell requests, remove limits
$GLOBALS['wgMaxShellMemory'] = 0;
+ // Override the default CookieSessionProvider with a dummy
+ // implementation that won't stomp on PHP's cookies.
$GLOBALS['wgSessionProviders'] = [
[
'class' => 'InstallerSessionProvider',
] ]
]
];
+
+ // Don't try to use any object cache for SessionManager either.
+ $GLOBALS['wgSessionCacheType'] = CACHE_NONE;
}
/**