php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #25393 Session Variable is cleared with every connection
Submitted: 2003-09-06 02:45 UTC Modified: 2003-09-06 19:53 UTC
From: zoop at lone dot ath dot cx Assigned:
Status: Not a bug Package: Session related
PHP Version: 4.3.3 OS: Solaris 2.8
Private report: No CVE-ID: None
 [2003-09-06 02:45 UTC] zoop at lone dot ath dot cx
Description:
------------
The problem occured in php 4.3.3 apache 1.3.27 solaris 2.8
I seemed to have a problem with the $_SESSION Variable I could set something in the array and the print it but I couldn't go to another page. It would have an empty array.
I downgraded to 4.3.2 and it works without any probems

Reproduce code:
---------------
if (!$_SESSION['the']) {
     print here;
}

$_SESSION['the'] = 1

<html> submit to load the page again

Expected result:
----------------
the first time you load the page it should print here and whatever html there might be.  after you reload the page or post to it it shouldn't print here.

Actual result:
--------------
it prints here every time you load the page.  if you print the value of $_SESSION['the'] it is undefined.

Patches

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2003-09-06 05:05 UTC] derick@php.net
Sorry, but your problem does not imply a bug in PHP itself.  For a
list of more appropriate places to ask for help using PHP, please
visit http://www.php.net/support.php as this bug system is not the
appropriate forum for asking support questions. 

Thank you for your interest in PHP.

YOu probably forgot about session_start()
 [2003-09-06 10:34 UTC] zoop at lone dot ath dot cx
I thought that this "session.auto_start = 1" option made it so you didn't have to use session_start()

I am useing the same config file from version 4.3.2 and 4.3.3 and 4.3.3 doesn't keeps the session variable around.
 [2003-09-06 19:53 UTC] sniper@php.net
Works fine for me. Most likely your php.ini is not loaded or wrong php.ini is used.

 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sun Aug 18 13:01:27 2024 UTC