php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #25881 Session is not saved at first time...
Submitted: 2003-10-15 10:01 UTC Modified: 2003-10-28 04:47 UTC
Votes:2
Avg. Score:4.0 ± 1.0
Reproduced:1 of 1 (100.0%)
Same Version:1 (100.0%)
Same OS:1 (100.0%)
From: adriano at steelconsultoria dot com dot br Assigned:
Status: No Feedback Package: Session related
PHP Version: 4.3.3 OS: Windows 2000
Private report: No CVE-ID: None
Have you experienced this issue?
Rate the importance of this bug to you:

 [2003-10-15 10:01 UTC] adriano at steelconsultoria dot com dot br
Description:
------------
I?m using Win2K + IIS.

I call my script like that:

http://localhost/test.php?id=2

And the script is:

<?
 session_start();
 $_SESSION['id'] = $_GET['id'];

 Header("Location: test2.php");
?>

In the test2.php I have:

<?
 session_start();
 if (!$_SESSION['id']) {
  Header('Location: error.php');
 }
 else {
  echo 'OK';
 }
?>

So when I call the script for the first time it calls the error.php
Then I call again through IE and it works.

With Apache it works correctly...



Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2003-10-28 04:47 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.


 [2003-11-07 14:50 UTC] omarh at cox dot net
I think I am seeing the same bug. 
I'm also using Windows 2000 Professional (latest service pack) with IIS 5.x. 

I'm just trying to get the sample session code to work, and it does not increment my counter each time I reload the page. It acts like it isn't storing the session at all between page loads.
Here is the code I'm using.

<?php 
if (!isset($_SESSION['myCounter']))
{
	$_SESSION['myCounter']=1;
}
else
{
	$_SESSION['myCounter']++;

}
?>
Counter : 
<?php echo $_SESSION['myCounter']; ?>
<br>
This should increment each time you refresh the page.
<br>
In our session we have the following: <br>
<?php print_r($_SESSION);
?>
 [2003-11-07 18:42 UTC] omarh at cox dot net
The problem went away after I updated to the latest snapshot at 
http://snaps.php.net/win32/php4-win32-STABLE-latest.zip
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Thu Apr 18 02:02:52 2024 UTC