From: Rob Church Date: Thu, 29 Mar 2007 18:37:45 +0000 (+0000) Subject: * (bug 9177) Installer now warns of various conditions affecting session.save_path... X-Git-Tag: 1.31.0-rc.0~53539 X-Git-Url: https://git.cyclocoop.org//%22?a=commitdiff_plain;h=9227f77e3033c332d5b21362742afc84a90b36b6;p=lhc%2Fweb%2Fwiklou.git * (bug 9177) Installer now warns of various conditions affecting session.save_path which can lead to broken session storage * Warns, but doesn't halt, if no explicit value set (sessions can still work) * Halts if the value is set and invalid or not writable --- diff --git a/RELEASE-NOTES b/RELEASE-NOTES index 4bf7d5cc60..7e692c706d 100644 --- a/RELEASE-NOTES +++ b/RELEASE-NOTES @@ -107,6 +107,8 @@ it from source control: http://www.mediawiki.org/wiki/Download_from_SVN messages, shown at the end of Special:Contributions as appropriate for the target * (bug 8421) Expose current action in JavaScript globals (as 'wgAction') * (bug 9069) Use galleries in query pages dedicated to images +* (bug 9177) Installer now warns of various conditions affecting session.save_path + which can lead to broken session storage == Bugfixes since 1.9 == * (bug 7292) Fix site statistics when moving pages in/out of content namespaces diff --git a/config/index.php b/config/index.php index 2fc91f2f3b..51dbcc5ed1 100644 --- a/config/index.php +++ b/config/index.php @@ -360,13 +360,35 @@ if( $conf->xml ) { If you're running Mandrake, install the php-xml package." ); } -# Crude check for session support +# Check for session support if( !function_exists( 'session_name' ) ) dieout( "PHP's session module is missing. MediaWiki requires session support in order to function." ); -# Likewise for PCRE +# session.save_path doesn't *have* to be set, but if it is, and it's +# not valid/writable/etc. then it can cause problems +$sessionSavePath = ini_get( 'session.save_path' ); +# Warn the user if it's not set, but let them proceed +if( !$sessionSavePath ) { + print "
  • Warning: A value for session.save_path + has not been set in PHP.ini. If the default value causes problems with + saving session data, set it to a valid path which is read/write/execute + for the user your web server is running under.
  • "; +} elseif ( is_dir( $sessionSavePath ) && is_writable( $sessionSavePath ) ) { + # All good? Let the user know + print "
  • Session save path appears to be valid.
  • "; +} else { + # Something not right? Halt the installation so the user can fix it up + dieout( "Your session save path appears to be invalid or is not writable. + PHP needs to be able to save data to this location in order for correct + session operation. Please check that session.save_path in + PHP.ini points to a valid path, and is read/write/execute for + the user your web server is running under." ); +} + +# Check for PCRE support if( !function_exists( 'preg_match' ) ) - dieout( "The PCRE regular expression functions are missing. MediaWiki requires these in order to function." ); + dieout( "The PCRE support module appears to be missing. MediaWiki requires the + Perl-compatible regular expression functions." ); $memlimit = ini_get( "memory_limit" ); $conf->raiseMemory = false;