Index: trunk/phase3/install-utils.inc |
— | — | @@ -106,4 +106,20 @@ |
107 | 107 | exit(1); |
108 | 108 | } |
109 | 109 | } |
110 | | -?> |
| 110 | + |
| 111 | +/** |
| 112 | + * Get the value of session.save_path |
| 113 | + * |
| 114 | + * Per http://uk.php.net/manual/en/ref.session.php#ini.session.save-path, |
| 115 | + * this might have some additional preceding parts which need to be |
| 116 | + * ditched |
| 117 | + * |
| 118 | + * @return string |
| 119 | + */ |
| 120 | +function mw_get_session_save_path() { |
| 121 | + $path = ini_get( 'session.save_path' ); |
| 122 | + $path = substr( $path, strrpos( $path, ';' ) ); |
| 123 | + return $path; |
| 124 | +} |
| 125 | + |
| 126 | +?> |
\ No newline at end of file |
Index: trunk/phase3/config/index.php |
— | — | @@ -395,7 +395,8 @@ |
396 | 396 | |
397 | 397 | # session.save_path doesn't *have* to be set, but if it is, and it's |
398 | 398 | # not valid/writable/etc. then it can cause problems |
399 | | -$sessionSavePath = ini_get( 'session.save_path' ); |
| 399 | +$sessionSavePath = mw_get_session_save_path(); |
| 400 | +$ssp = htmlspecialchars( $sessionSavePath ); |
400 | 401 | # Warn the user if it's not set, but let them proceed |
401 | 402 | if( !$sessionSavePath ) { |
402 | 403 | print "<li><strong>Warning:</strong> A value for <tt>session.save_path</tt> |
— | — | @@ -404,14 +405,12 @@ |
405 | 406 | for the user your web server is running under.</li>"; |
406 | 407 | } elseif ( is_dir( $sessionSavePath ) && is_writable( $sessionSavePath ) ) { |
407 | 408 | # All good? Let the user know |
408 | | - print "<li>Session save path appears to be valid.</li>"; |
| 409 | + print "<li>Session save path (<tt>{$ssp}</tt>) appears to be valid.</li>"; |
409 | 410 | } else { |
410 | | - # Something not right? Halt the installation so the user can fix it up |
411 | | - dieout( "Your session save path appears to be invalid or is not writable. |
412 | | - PHP needs to be able to save data to this location in order for correct |
413 | | - session operation. Please check that <tt>session.save_path</tt> in |
414 | | - <tt>PHP.ini</tt> points to a valid path, and is read/write/execute for |
415 | | - the user your web server is running under." ); |
| 411 | + # Something not right? Warn the user, but let them proceed |
| 412 | + print "<li><strong>Warning:</strong> Your <tt>session.save_path</tt> value (<tt>{$ssp}</tt>) |
| 413 | + appears to be invalid or is not writable. PHP needs to be able to save data to |
| 414 | + this location for correct session operation.</li>"; |
416 | 415 | } |
417 | 416 | |
418 | 417 | # Check for PCRE support |
Index: trunk/phase3/RELEASE-NOTES |
— | — | @@ -114,6 +114,10 @@ |
115 | 115 | * (bug 10118) Introduced Special:Mostlinkedtemplates, report which lists |
116 | 116 | templates with a high number of inclusion links |
117 | 117 | * (bug 10104) Fixed Database::getLag() for PostgreSQL and Oracle |
| 118 | +* (bug 9820) session.save_path check no longer halts installation, but |
| 119 | + warns of possible bad values |
| 120 | +* (bug 9978) Fixed session.save_path validation when using extended |
| 121 | + configuration format, e.g. "5;/tmp" |
118 | 122 | |
119 | 123 | == MediaWiki API changes since 1.10 == |
120 | 124 | |