From 92f8c162be79226a135bc4ea2c759b1190a8ea7c Mon Sep 17 00:00:00 2001 From: Chad Horohoe Date: Sun, 12 Dec 2010 17:25:56 +0000 Subject: [PATCH] Remove bogus session_path checks. Reverts r67465, r63813, r75256, r64717. --- includes/installer/Installer.i18n.php | 1 - includes/installer/WebInstaller.php | 33 --------------------------- 2 files changed, 34 deletions(-) diff --git a/includes/installer/Installer.i18n.php b/includes/installer/Installer.i18n.php index 18be623584..ed6d292910 100644 --- a/includes/installer/Installer.i18n.php +++ b/includes/installer/Installer.i18n.php @@ -38,7 +38,6 @@ You can increase this by setting session.gc_maxlifetime in php.ini. Restart the installation process.', 'config-no-session' => 'Your session data was lost! Check your php.ini and make sure session.save_path is set to an appropriate directory.', - 'config-session-path-bad' => 'Your session.save_path ($1) 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:', diff --git a/includes/installer/WebInstaller.php b/includes/installer/WebInstaller.php index e4d115497b..474b019fe3 100644 --- a/includes/installer/WebInstaller.php +++ b/includes/installer/WebInstaller.php @@ -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. * -- 2.20.1