Remove bogus session_path checks. Reverts r67465, r63813, r75256, r64717.
authorChad Horohoe <demon@users.mediawiki.org>
Sun, 12 Dec 2010 17:25:56 +0000 (17:25 +0000)
committerChad Horohoe <demon@users.mediawiki.org>
Sun, 12 Dec 2010 17:25:56 +0000 (17:25 +0000)
includes/installer/Installer.i18n.php
includes/installer/WebInstaller.php

index 18be623..ed6d292 100644 (file)
@@ -38,7 +38,6 @@ You can increase this by setting <code>session.gc_maxlifetime</code> in php.ini.
 Restart the installation process.',
        'config-no-session'               => 'Your session data was lost!
 Check your php.ini and make sure <code>session.save_path</code> is set to an appropriate directory.',
-       'config-session-path-bad'         => 'Your <code>session.save_path</code> (<code>$1</code>) seems to be invalid or unwritable.',
        'config-your-language'            => 'Your language:',
        'config-your-language-help'       => 'Select a language to use during the installation process.',
        'config-wiki-language'            => 'Wiki language:',
index e4d1154..474b019 100644 (file)
@@ -277,22 +277,6 @@ class WebInstaller extends CoreInstaller {
         * Start the PHP session. This may be called before execute() to start the PHP session.
         */
        public function startSession() {
-               $sessPath = $this->getSessionSavePath();
-
-               if( $sessPath != '' ) {
-                       if( strval( ini_get( 'open_basedir' ) ) != '' ) {
-                               // we need to skip the following check when open_basedir is on.
-                               // The session path probably *wont* be writable by the current
-                               // user, and telling them to change it is bad. Bug 23021.
-                       } elseif( !is_dir( $sessPath ) || !is_writeable( $sessPath ) ) {
-                               $this->showError( 'config-session-path-bad', $sessPath );
-                               return false;
-                       }
-               } else {
-                       // If the path is unset it'll default to some system bit, which *probably* is ok...
-                       // not sure how to actually get what will be used.
-               }
-
                if( wfIniGetBool( 'session.auto_start' ) || session_id() ) {
                        // Done already
                        return true;
@@ -311,23 +295,6 @@ class WebInstaller extends CoreInstaller {
                return true;
        }
 
-       /**
-        * Get the value of session.save_path
-        *
-        * Per http://www.php.net/manual/en/session.configuration.php#ini.session.save-path,
-        * this may have an initial integer value to indicate the depth of session
-        * storage (eg /tmp/a/b/c). Explode on ; and check and see if this part is
-        * there or not. Should also allow paths with semicolons in them (if you
-        * really wanted your session files stored in /tmp/some;dir) which PHP
-        * supposedly supports.
-        *
-        * @return String
-        */
-       private function getSessionSavePath() {
-               $parts = explode( ';', ini_get( 'session.save_path' ), 2 );
-               return count( $parts ) == 1 ? $parts[0] : $parts[1];
-       }
-
        /**
         * Get a hash of data identifying this MW installation.
         *