php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #16840 IIS5 session behaviour with php 4.2.0 (see #8989)
Submitted: 2002-04-25 21:16 UTC Modified: 2002-06-05 01:00 UTC
Votes:4
Avg. Score:4.5 ± 0.5
Reproduced:4 of 4 (100.0%)
Same Version:2 (50.0%)
Same OS:4 (100.0%)
From: mrieger at NOSPAM dot nanometrics dot com Assigned:
Status: No Feedback Package: IIS related
PHP Version: 4.2.0 OS: Win2000
Private report: No CVE-ID: None
View Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
If you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: mrieger at NOSPAM dot nanometrics dot com
New email:
PHP Version: OS:

 

 [2002-04-25 21:16 UTC] mrieger at NOSPAM dot nanometrics dot com
Hi!
 
I created my own session handlers (using a database) and used the CGI binary version of PHP. Once I started a session, the session variables got lost through the pages, although the session variables were inserted correctly into the database. 
After playing around with it all day, I re-installed PHP 4.1.2 ? and again it wouldn?t work. 
 
I then installed Apache 2.0 (without making any changes to PHP), and ? it?s working!!!!
 
* There definitely is a bug with sessions in collaboration with IIS. *
 
I tried to call the vars with $_SESSION, and set register_globals on. 
No matter how I set the session.referer_check (according to a posting in #8989), it will not run with IIS5. 
 
The funniest thing is, the scripts were actually developed on PHP 4.1.2 running on RedHat 7.2 with Apache and then moved onto the windows server running IIS5, where they didn?t run anymore. The relevant settings in php.ini were the same on windows and on RedHat, and the scripts don't use any platform-specific features. 
 
Cheers, 
 
 
Marwin
 

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2002-05-03 06:00 UTC] oversize at gmx dot li
i m encountering the same problem. 
I use IIS on the 2k Server  (default installation iff IIS is v5 i guess). My PHP Version is 4.1.0.  Maybe i should upgrade anyway soon. I m olso using a DB session Handler (Ying Zhangs form phpbuilder.com) and i can see that the Session Variables are in the DB but sometimes there is just nomore session anymore (just as described by mrieger). 
Cant tell you when exactly this causes to happen, but it definitly does, sometimes. When i loose a Session, i m olso not able anymore to open a new one. Even if I close all my Browser windows, a new Session ist not startet (... but as i said: only if it got lost before) I always can fix this again by deleting all entrys from the session table. Then everything works fine again.
Dont knwo if this helps you but i strongly believe that there might be the same reason doing unusefull stuff here.
 
best regards & thank you
 manuel
 [2002-05-04 05:14 UTC] hansvanrijswijk at hotmail dot com
In version 4.1.2 this code works, in 4.2.0 not!
So I got back to 4.1.2 because I didn't manage to make it work.
<?php
session_start();
if ( !isset($count)) {
     $count = 0;
     session_register("count");
     echo "Counter initialized, reload and the counter will be incremented";
} else {
$count++;
session_register("count");
}
echo "The counter is now $count ";
?>
 [2002-05-04 05:17 UTC] rasmus@php.net
Did you turn on register_globals?  If not, in 4.2 you will need to use:

if(isset($_SESSION['count']))

for this to work.
 [2002-05-06 13:29 UTC] mrieger at NOSPAM dot nanometrics dot com
Yes, register_globals are turned on. 
I also used $_SESSION['varname']:

if(isset($_SESSION['VALID_USER']))
... move on, else redirect to login page

I tried to get it working with both PHP 4.1.2 and 4.2.0, but it simply wouldn't.
However, as soon as I had installed Apache, everything worked just fine without any change to the scripts! 

Best regards,

Marwin
 [2002-06-05 01: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".
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sun Nov 03 23:01:27 2024 UTC