Bug #16282: session data not saved when script ends

From: Date: Tue, 26 Mar 2002 10:04:41 +0000
Subject: Bug #16282: session data not saved when script ends
Groups: php.bugs 
Request: Send a blank email to php-bugs+get-3367@lists.php.net to get a copy of this message
From: sorinv@yahoo.com Operating system: Linux 2.4.7-10 PHP version: 4.0.6 PHP Bug Type: Session related Bug description: session data not saved when script ends <?php session_start(); session_register ("count"); header ("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); $count++; //session_write_close(); ?> If I don't put the session_write_close() call, I will end up getting an empty session file, and all the session data is lost. Putting the call solves the problem, but this shouldn't happen at all. Using Apache 1.3.22 with PHP 4.0.6 as a dynamic module. --------------- session info as read from phpinfo() ---------------- session.auto_start Off Off session.cache_expire 180 180 session.cache_limiter nocache nocache session.cookie_domain no value no value session.cookie_lifetime 0 0 session.cookie_path / / session.cookie_secure Off Off session.entropy_file no value no value session.entropy_length 0 0 session.gc_maxlifetime 1440 1440 session.gc_probability 1 1 session.name PHPSESSID PHPSESSID session.referer_check no value no value session.save_handler files files session.save_path /tmp /tmp session.serialize_handler php php session.use_cookies On On -- Edit bug report at http://bugs.php.net/?id=16282&edit=1 -- Fixed in CVS: http://bugs.php.net/fix.php?id=16282&r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=16282&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=16282&r=needtrace Try newer version: http://bugs.php.net/fix.php?id=16282&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=16282&r=support Expected behavior: http://bugs.php.net/fix.php?id=16282&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=16282&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=16282&r=submittedtwice

« previous php.bugs (#3367) next »