Merge "Http::getProxy() method to get proxy configuration"
[lhc/web/wiklou.git] / includes / installer / Installer.php
index 7ebab67..442baf7 100644 (file)
@@ -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;
        }
 
        /**