From: Chad Horohoe Date: Sat, 23 Oct 2010 16:02:34 +0000 (+0000) Subject: Fix r63813, r64717 (session path detection in new installer). Surprise surprise,... X-Git-Tag: 1.31.0-rc.0~34363 X-Git-Url: http://git.cyclocoop.org/%24action?a=commitdiff_plain;h=482cee8bac1ad3814302aa7986f7bfa371d09bfc;p=lhc%2Fweb%2Fwiklou.git Fix r63813, r64717 (session path detection in new installer). Surprise surprise, the PHP documentation doesn't match what happens in practice :p --- diff --git a/includes/installer/WebInstaller.php b/includes/installer/WebInstaller.php index dea927a209..208f5ea667 100644 --- a/includes/installer/WebInstaller.php +++ b/includes/installer/WebInstaller.php @@ -308,16 +308,17 @@ class WebInstaller extends CoreInstaller { * Get the value of session.save_path * * Per http://www.php.net/manual/en/session.configuration.php#ini.session.save-path, - * this might have some additional preceding parts which need to be - * ditched + * 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() { - $path = ini_get( 'session.save_path' ); - $path = ltrim( substr( $path, strrpos( $path, ';' ) ), ';'); - - return $path; + $parts = explode( ';', ini_get( 'session.save_path' ), 2 ); + return count( $parts ) == 1 ? $parts[0] : $parts[1]; } /**