php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #32065 session_start() ALWAYS makes a new session
Submitted: 2005-02-22 15:06 UTC Modified: 2005-02-25 13:54 UTC
Votes:2
Avg. Score:5.0 ± 0.0
Reproduced:2 of 2 (100.0%)
Same Version:2 (100.0%)
Same OS:2 (100.0%)
From: mikegmarshall at hotmail dot com Assigned:
Status: Not a bug Package: IIS related
PHP Version: 5.0.3 OS: Windows 2000 IIS5
Private report: No CVE-ID: None
 [2005-02-22 15:06 UTC] mikegmarshall at hotmail dot com
Description:
------------
When I call session_start() with IIS5, it always creates a new session.

I have 2 servers - both with PHP 5.0.3, one with IIS 5 and one with IIS6. php.ini is identical in both (i.e. copied from one to the other). On the IIS6 machine, the SID echoed never changes if I press refresh. On the IIS5 machine it generates a new SID every 1-2 mins of inactivity.

I have not yet found a suitable workaround.

Reproduce code:
---------------
<? session_start();
echo $session_id;
?>

Wait 60 secs or so and press refresh - the SID changes.

Expected result:
----------------
The sessionid that is echoed should remain the same.

Actual result:
--------------
The SID changes.

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2005-02-22 16:17 UTC] mikegmarshall at hotmail dot com
I am a very experienced IT Support/Software Engineer...I spend all day telling people to "get the latest updates"...you would think I would listen to my own advice wouldn't ya :)

I did all the updates at windowsupdate.com - no idea which one fixed it, but there were about 15. One of them did it.

*hangs head in shame*
 [2005-02-22 17:26 UTC] tony2001@php.net
We mark such reports as bogus.
 [2005-02-24 17:51 UTC] mikegmarshall at hotmail dot com
Very strange. As I reported, Windows Update seemed to fix it, but only temporarily. Its now happening again, same script, same setup. Searching the web, I have found other reports of identical problems, but not enough to suggest that this applies to all instances of PHP on IIS5. This leads me to think its an IIS5 config problem, tho I can't for the life of me think what. Any pointers?
 [2005-02-24 23:57 UTC] tony2001@php.net
Please, ask such questions in support forums.
Check if your browser recieves session cookie, check if it does send it back etc. etc.
 [2005-02-25 13:54 UTC] mikegmarshall at hotmail dot com
Just a note in case anyone finds this thread whilst looking for the same problem - turning off the option "Cache ISAPI applications" in IIS5 seems to fix it, although I am using the cgi version. Go figure.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Fri Mar 29 14:01:28 2024 UTC