NYCPHP Meetup

NYPHP.org

[nycphp-talk] Failure to write session data

Jeff Siegel jsiegel1 at optonline.net
Tue Nov 18 21:08:42 EST 2003


My client's website is running PHP v. 4.1.2. The website's error handler
sent me the following:

"ERROR NUMBER: 2
ERR DETAILS: Failed to write session data (files). Please verify that
the current setting of session.save_path is correct (/tmp)"

The interesting thing here is the specific error (failure to write
session data) even though session.save_path is already set in the
php.ini to "/tmp."

A bit of Googling turned up the following: creating a tmp folder in
SERVER ROOT like /var/www/tmp and setting permissions accordingly. 

I'm not sure if the following is relevant to the above problem but since
it is "session" related, it may be of some importance here. When going
from one page to another, I pass the session ID by appending it to the
URL, e.g., header("Location:
http://{$_SERVER['HTTP_HOST']}/mynextpage.php?code=" . session_id());

And then, on that next page, I grab the ID using session_id
($_GET['code']);


Jeff Siegel







More information about the talk mailing list