php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #21416 Session variables timeout prematurely
Submitted: 2003-01-04 14:44 UTC Modified: 2003-07-04 02:09 UTC
Votes:5
Avg. Score:4.2 ± 1.6
Reproduced:3 of 3 (100.0%)
Same Version:1 (33.3%)
Same OS:3 (100.0%)
From: maladil at everestkc dot net Assigned:
Status: No Feedback Package: Session related
PHP Version: 4.2.1 OS: Redhat 7.3
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: maladil at everestkc dot net
New email:
PHP Version: OS:

 

 [2003-01-04 14:44 UTC] maladil at everestkc dot net
I am having problems getting simple $_SESSION[] variable to go from one page to the next.  I have created an extremely stripped down version of the rest of my code and it can be reached at http://gcfc.net/testsite1/docs/misc/one.php

our php and server settings are here....
http://gcfc.net/testsite1/debug.php

Simply put, one.php sets a session variable.  two.php and three.php simply check to see if that session variable is set.  If you go from one.php to two.php and wait for 60 seconds then the session variable is no longer present, but the session id is still intact.  This happens on IE and Netscape.  

I have included my code below for the first 2 pages...........................

<?php
//one.php
session_start();
$_SESSION['person']="Bob";
?>
<html><head><title>Session Test page 1</title></head>
<body>
<h1>You are at page 1</h1>
<br>
<a href="two.php">Page 2</a><br>
<a href="three.php">Page 3</a>
<br>Session variable person is 
<?php echo $_SESSION['person']; ?>
<br>Session ID = <?php echo session_id(); ?>

</body>
</html>
********************************

<?php session_start(); ?>
<html><head><title>Session Test page 2</title></head><body>
<h1>You are at page 2</h1><br>
<a href="one.php">Page 1</a><br>
<a href="three.php">Page 3</a><br>
<a href="four.php">Page 4, briefly</a>
<br>Session variable person is 
<?php echo $_SESSION['person']; ?>
<br>Session ID = <?php echo session_id(); ?>
</body>
</html>
****************************************

Thanks
Jason
maladil@everestkc.net

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2003-01-04 14:50 UTC] nicos@php.net
Please try using this CVS snapshot:

  http://snaps.php.net/php4-latest.tar.gz
 
For Windows:
 
  http://snaps.php.net/win32/php4-win32-latest.zip


 [2003-01-04 14:54 UTC] maladil at everstkc dot net
I suggest copying the link into your browser to check this out.  I clicked on the link from the ticket and the $_SESSION variable won't appear on any page but one.php, however if you copy the link into the browser then you can still see the variable for about 45 seconds until it seems to time out.
Thanks,
Jason
 [2003-01-04 15:00 UTC] maladil at everstkc dot net
I am not able to upgrade to a newer version of php.  I have contacted our host to do so, but they are not going to for some reason.
Thanks,
Jason
 [2003-01-04 15:04 UTC] nicos@php.net
Well I can verify your bug but it has probably been fixed in PHP4.3.0. So you should really ask your host to really do it.

Thank you.
 [2003-01-04 15:34 UTC] maladil at everestkc dot net
my email address was wrong, sorry.

I have tried to persuade my host, but they will not budge, so what can I do in the mean time as a work around?

maladil@everestkc.net
 [2003-07-04 02:09 UTC] sniper@php.net
No feedback was provided. The bug is being suspended because
we assume that you are no longer experiencing the problem.
If this is not the case and you are able to provide the
information that was requested earlier, please do so and
change the status of the bug back to "Open". Thank you.


 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Fri Apr 19 13:01:30 2024 UTC