php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #15395 Zero Length Session Files and Sessions not recognized
Submitted: 2002-02-05 19:29 UTC Modified: 2002-02-06 07:37 UTC
Votes:1
Avg. Score:5.0 ± 0.0
Reproduced:1 of 1 (100.0%)
Same Version:1 (100.0%)
Same OS:1 (100.0%)
From: nalkat at yahoo dot com Assigned:
Status: Closed Package: Session related
PHP Version: 4.1.1 OS: Linux 2.2.19
Private report: No CVE-ID: None
 [2002-02-05 19:29 UTC] nalkat at yahoo dot com
This is not so much of a bug report as a fix to a problem that I have seen many having.  I was using PHP v4.0.1, and had very little problems with my sessions not being saved.  I didnt have a problem with zero length files being created until I upgraded to PHP 4.0.4x.

Upon upgrading to this new version, ALL of my scripts that contained sessions started creating 0 byte files, and would not save the session variables.  I looked through all of these bug reports and noticed that others were having these problems as well.  I also noticed that the developers became aware of this problem and implemented $_SESSION variables in 4.1.x versions.

I am writing this to attempt to help others that were having this problem.  Here is what I did to fix it:

1] I obtained a fresh copy of Apache_1.3.23 from www.apache.org

2] I obtained a new copy of PHP v4.1.1 from the main site here.  www.php.net

3] I installed as per the instructions in the PHP documentation. (except I used ./configure --with-apxs --with-mysql --enable-track-vars --enable-trans-sid)

4] I replaced instances of session_register (varname) to $_SESSION = "value"; and added session_start() to the top of all my scripts.

Voila!  My 2 months of headaches were over!  My scripts all work now.  There are no more sessions with blank data, no more troubles passint the session ID to the next script.

Thank you guys (developers) for finding the problem with this issue, and I hope this will help others that are having similar problems to resolve them.

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2002-02-06 07:37 UTC] sander@php.net
Ok. Closing.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Fri Apr 26 03:01:32 2024 UTC