[Mediawiki-l] "Remember me" checkbox not working, session problem (not in FAQ)

Daniel Barrett dbarrett at vistaprint.com
Mon Mar 12 02:54:12 UTC 2007


The "Remember me" checkbox is not working on our wiki.  If users terminate
and restart their browser, they have to log into the wiki again. This
doesn't happen on Wikipedia, so I assume our wiki is having a session
problem.

The PHP session directory (session.save_path) exists, is writable by the
webserver, and session files ARE being created within it:

 session.save_path="C:\temp\php\Session"

(and I have already tried moving the directory underneath the PHP
installation directory, but that didn't help).

If I watch the browser's cookies and the session directory, the browser
switches to a new session without preserving the username information. A
detailed case study is below.

Setup is: MediaWiki 1.9.3 on Windows 2003 server; Apache 2.2.4; PHP 5.2.1;
mySQL 5.

Case study:

1. I visit our MediaWiki site and log in, taking care to check the
checkbox, "Remember my login on this computer". Note: Our wiki requires
logins to edit a page:

 # LocalSettings.php:
 $wgGroupPermissions['*']['edit'] = false;

Authentication is done using normal MediaWiki accounts.

2. Confirm that a PHP session file was created, its name is stored in a
browser cookie (wikidb_tablePrefix__session), and it contains this
information:

kw_bread_crumbs: TechWiki (1.9.3.vp.2.e)|a:2:{i:0;s:17:"Special:Userlogin";i:1;s:16:"Name of page";}wsUserID|i:16;wsUserName|s:4:"Danb";wsToken|s:32:"f12a2d7154f0ea29190a5c0fb91a6e1a";

3. Close the browser.  Confirm the session file still exists as above.

4. Launch the browser and visit the wiki's home page. The correct username
is displayed at the top of the page, as if the user were still logged
in. Everything looks good so far, but........

5. Visit ANY OTHER page on the wiki. The username at the top of the page
disappears, the IP address is shown instead, and a new session file gets
associated with the browser (as verified in the session cookie above). The
new session file contains no username information:

kw_bread_crumbs: TechWiki (1.9.3.vp.2.e)|a:1:{i:0;s:36:"Name of page";}

and the old session file still exists, unchanged.

Now, if I repeat this experiment but use en.wikipedia.org instead of my
wiki, the session information is remembered even after I close and reopen
the browser.

This problem exists in both IE 7 and Firefox 2.0.  And the problem existed
before we installed the "kw_bread_crumbs" extension mentioned in the
session data above.

Any help appreciated!

- Dan Barrett
dbarrett at vistaprint.com



More information about the MediaWiki-l mailing list