[Mediawiki-l] php_value session.save_path '/tmp'

Brion Vibber brion at pobox.com
Mon Apr 11 22:03:03 UTC 2011

On Mon, Apr 11, 2011 at 2:31 PM, Fred Bauder <fredbaud at fairpoint.net> wrote:

> If I wanted to put the equivalent of "php_value session.save_path '/tmp'
> " into LocalSettings.php
> with /tmp being a writable subdirectory of the directory
> LocalSettings.php is in, what would I add?

First, be very careful; you may accidentally expose your session files to
the web that way! Ensure that such a directory's contents cannot be read and
exposed via the web server.

You're looking for either the ini_set() function in general, or


Be aware that this must be set before the session is opened; so if PHP has
been configured to open sessions automatically, it may be too late. Normally
PHP is not configured that way (check the online documentation for session
settings to see which ones to look for.)

-- brion

More information about the MediaWiki-l mailing list