php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #16282 session data not saved when script ends
Submitted: 2002-03-26 05:04 UTC Modified: 2002-04-28 00:00 UTC
Votes:5
Avg. Score:4.4 ± 0.8
Reproduced:4 of 4 (100.0%)
Same Version:1 (25.0%)
Same OS:2 (50.0%)
From: sorinv at yahoo dot com Assigned:
Status: No Feedback Package: Session related
PHP Version: 4.0.6 OS: Linux 2.4.7-10
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: sorinv at yahoo dot com
New email:
PHP Version: OS:

 

 [2002-03-26 05:04 UTC] sorinv at yahoo dot com
<?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 


Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2002-03-26 05:12 UTC] derick@php.net
Please try php-4.2.0rc1.tar.gz from www.php.net/~derick

Derick
 [2002-04-28 00:00 UTC] php-bugs at lists dot php dot net
No feedback was provided for this bug for over a month, so it is
being suspended automatically. If you are able to provide the
information that was originally requested, please do so and change
the status of the bug back to "Open".
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sat Dec 21 16:01:28 2024 UTC