r4916 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r4915‎ | r4916 | r4917 >
Date:03:10, 24 August 2004
Author:vibber
Status:old
Tags:
Comment:
Patch by Ivan Krstic, slightly modified, for the session handler wrong setting problem.

Bug 179: Detect when session.save_handler set incorrectly
http://bugzilla.wikipedia.org/show_bug.cgi?id=179
Modified paths:
  • /trunk/phase3/includes/User.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/User.php
@@ -155,6 +155,10 @@
156156 global $wgSessionsInMemcached, $wgCookiePath, $wgCookieDomain;
157157 if( $wgSessionsInMemcached ) {
158158 require_once( 'MemcachedSessions.php' );
 159+ } elseif( 'files' != ini_get( 'session.save_handler' ) ) {
 160+ # If it's left on 'user' or another setting from another
 161+ # application, it will end up failing. Try to recover.
 162+ ini_set ( 'session.save_handler', 'files' );
159163 }
160164 session_set_cookie_params( 0, $wgCookiePath, $wgCookieDomain );
161165 session_cache_limiter( 'private, must-revalidate' );

Follow-up revisions

RevisionCommit summaryAuthorDate
r4917Patch by Ivan Krstic, slightly modified, for the session handler wrong settin...vibber05:27, 24 August 2004

Status & tagging log