php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #16585 Use of $_SESSION to set variable doesn't save variable
Submitted: 2002-04-13 06:50 UTC Modified: 2002-05-14 00:00 UTC
Votes:5
Avg. Score:5.0 ± 0.0
Reproduced:5 of 5 (100.0%)
Same Version:4 (80.0%)
Same OS:2 (40.0%)
From: cedric dot dufour at cogito-ergo-soft dot com Assigned:
Status: No Feedback Package: Session related
PHP Version: 4.1.2 OS: Windows XP
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 this is not your bug, you can add a comment by following this link.
If this is your bug, but you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: cedric dot dufour at cogito-ergo-soft dot com
New email:
PHP Version: OS:

 

 [2002-04-13 06:50 UTC] cedric dot dufour at cogito-ergo-soft dot com
Following the 'Session handling' documentation and expriencing problems with a production script, I wrote the following test script:

test.php:
<?php
session_start();
echo "Session ID : ".session_id()."<BR>\r\n";
if( !isset( $_SESSION['Test'] ) )
{
	$_SESSION['Test'] = "bla bla bla";
	echo "Defined : ".$_SESSION['Test']."<BR>\r\n";
}
else
{
	echo "Existing : ".$_SESSION['Test']."<BR>\r\n";
}
//session_write_close();
?>

which I expect to set the 'Test' session variable on the first call to the page and then return the 'Test' session variable on subsequent calls to the script.

This works FINE with PHP 4.1.1 but DOES NOT WORK with PHP 4.1.2 (though the session ID is the same). I had to revert to the old 'session_register()' function for the script to work in PHP 4.1.2, $HTTP_SESSION_VARS not working either.

Any clue ?

Ce.D

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2002-04-13 14:11 UTC] sniper@php.net
It's propably the same issue as everyone else is having.
Please try the PHP 4.2.0RC3 from http://www.php.net/~derick/
as others have reported that it works fine for them.

And don't forget to replace the php4ts.dll in your system
with the one in the 4.2.0RC3 package.

 [2002-05-14 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".
 [2003-03-06 05:07 UTC] sean at seansilas dot com
This bug is EXTREMELEY ANNOYING, and very hard to replicate. Sometimes it happens, other times it doesn't. Seems to happen more when the server has been idle for awhile.

The big problem here, is that I cannot upgrade my PHP, because I am using a remote hosting company that has 4.1.2 installed.

I have no idea what to do, and I'm extremely frustrated.

SS
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Thu Mar 28 11:01:27 2024 UTC