X-Git-Url: https://git.heureux-cyclage.org/?a=blobdiff_plain;f=includes%2Finstaller%2FInstaller.php;h=442baf76a0cc564237474703e5044ad264a74d6a;hb=e3bd13db0c285f312e31bb1b7271af4628cca80c;hp=7ebab67eb95210b253b29e0a40473890ee791863;hpb=58cb1f824ac75c3b58ba19d1e88c1b38f9dc1fab;p=lhc%2Fweb%2Fwiklou.git diff --git a/includes/installer/Installer.php b/includes/installer/Installer.php index 7ebab67eb9..442baf76a0 100644 --- a/includes/installer/Installer.php +++ b/includes/installer/Installer.php @@ -609,8 +609,7 @@ abstract class Installer { # 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; } @@ -843,12 +842,7 @@ abstract class Installer { } 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 ); } @@ -1715,7 +1709,9 @@ abstract class Installer { * 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; @@ -1739,6 +1735,8 @@ abstract class Installer { // 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', @@ -1747,6 +1745,9 @@ abstract class Installer { ] ] ] ]; + + // Don't try to use any object cache for SessionManager either. + $GLOBALS['wgSessionCacheType'] = CACHE_NONE; } /**