Index: trunk/phase3/includes/GlobalFunctions.php |
— | — | @@ -2708,13 +2708,14 @@ |
2709 | 2709 | * Initialise php session |
2710 | 2710 | */ |
2711 | 2711 | function wfSetupSession() { |
2712 | | - global $wgSessionsInMemcached, $wgCookiePath, $wgCookieDomain, $wgCookieSecure, $wgCookieHttpOnly; |
| 2712 | + global $wgSessionsInMemcached, $wgCookiePath, $wgCookieDomain, |
| 2713 | + $wgCookieSecure, $wgCookieHttpOnly, $wgSessionHandler; |
2713 | 2714 | if( $wgSessionsInMemcached ) { |
2714 | 2715 | require_once( 'MemcachedSessions.php' ); |
2715 | | - } elseif( 'files' != ini_get( 'session.save_handler' ) ) { |
2716 | | - # If it's left on 'user' or another setting from another |
2717 | | - # application, it will end up failing. Try to recover. |
2718 | | - ini_set ( 'session.save_handler', 'files' ); |
| 2716 | + } elseif( $wgSessionHandler && $wgSessionHandler != ini_get( 'session.save_handler' ) ) { |
| 2717 | + # Only set this if $wgSessionHandler isn't null and session.save_handler |
| 2718 | + # hasn't already been set to the desired value (that causes errors) |
| 2719 | + ini_set ( 'session.save_handler', $wgSessionHandler ); |
2719 | 2720 | } |
2720 | 2721 | $httpOnlySafe = wfHttpOnlySafe(); |
2721 | 2722 | wfDebugLog( 'cookie', |
Index: trunk/phase3/includes/DefaultSettings.php |
— | — | @@ -736,6 +736,12 @@ |
737 | 737 | |
738 | 738 | $wgSessionsInMemcached = false; |
739 | 739 | |
| 740 | +/** This is used for setting php's session.save_handler. In practice, you will |
| 741 | + * almost never need to change this ever. Other options might be 'user' or |
| 742 | + * 'session_mysql.' Setting to null skips setting this entirely (which might be |
| 743 | + * useful if you're doing cross-application sessions, see bug 11381) */ |
| 744 | +$wgSessionHandler = 'files'; |
| 745 | + |
740 | 746 | /**@{ |
741 | 747 | * Memcached-specific settings |
742 | 748 | * See docs/memcached.txt |
Index: trunk/phase3/RELEASE-NOTES |
— | — | @@ -31,6 +31,7 @@ |
32 | 32 | * Add $wgExportFromNamespaces for enabling/disabling the "export all from |
33 | 33 | namespace" option (disabled by default) |
34 | 34 | * (bug 18222) $wgMinimalPasswordLength default is now 1 |
| 35 | +* $wgSessionHandler can be used to configure session.save_handler |
35 | 36 | |
36 | 37 | === New features in 1.15 === |
37 | 38 | |
— | — | @@ -335,6 +336,8 @@ |
336 | 337 | * (bug 12998) Allow <sup>, <sub>, etc. in DISPLAYTITLE |
337 | 338 | * (bug 1553) Lowercase navigation headings in German |
338 | 339 | * (bug 7830) Pending transactions failed to commit on loginToUse() error |
| 340 | +* (bug 11613) session.save_handler being over-ridden |
| 341 | +* (bug 11381) session.save_handler being set twice (causes error) |
339 | 342 | |
340 | 343 | == API changes in 1.15 == |
341 | 344 | * (bug 16858) Revamped list=deletedrevs to make listing deleted contributions |