Page MenuHomePhabricator

When session.auto_start=true "cookie is disabled" error displayed on login
Closed, ResolvedPublic

Description

Author: zbigniew.braniecki

Description:
When you have session.auto_start=true in php.ini and you login to MediaWiki it
assigns new name to session cookie, but PHP can't change the default one
(http://pl.php.net/manual/en/function.session-name.php#42747).
Despite of that, when later MediaWiki asks for session cookie name by
session_name() method, it returns the new (not the assigned) one.

It's also a PHP bug imho (it should return the really used name).


Version: 1.5.x
Severity: normal
Platform: PC
URL: bugs.flock.com/show_bug.cgi?id=1531

Details

Reference
bz3990

Event Timeline

bzimport raised the priority of this task from to Medium.Nov 21 2014, 8:54 PM
bzimport set Reference to bz3990.

zbigniew.braniecki wrote:

patch against 1.5.2

this patch adds a if() statement to check if MediaWiki can change the session
cookie name.

Attached:

martin wrote:

*** Bug 5251 has been marked as a duplicate of this bug. ***

chris wrote:

In 1.5.7, you can instead replace line 128 of Setup.php with this:

if (!ini_get('session.auto_start')) { // Added in case sessions auto start in PHP
session_name( $wgCookiePrefix . '_session' );
}