PHP 4.0 Bug #5493: Both ISAPI & CGI modules in 4.0.1pl2 exhibit errors with session ids

From: Date: Tue, 11 Jul 2000 01:33:12 +0000
Subject: PHP 4.0 Bug #5493: Both ISAPI & CGI modules in 4.0.1pl2 exhibit errors with session ids
Groups: php.dev 
Request: Send a blank email to php-dev+get-23979@lists.php.net to get a copy of this message
From: fseesink@usa.net Operating system: Windows NT Server 4 SP5 running IIS4 PHP version: 4.0 Latest CVS (10/07/2000) PHP Bug Type: Session related Bug description: Both ISAPI & CGI modules in 4.0.1pl2 exhibit errors with session ids * Using PHP v4.0.1pl2 Win32 binary provided by PHP.NET/Zend.com [NOTE: It would be helpful to add binary releases to your 'PHP version:' field above, as v4.0.1, v4.0.1pl1, and v4.0.1pl2 are not listed above.] * Zend Optimizer RC1 also installed * In PHP.INI, all configured properly: session.save_path, session.save_handler = files, etc. [Question: PHP.INI file contains "session.cookie_lifetime", but PHP Manual says "session.lifetime". Which is correct? Have put in both to be safe.] * USING ISAPI module installed as ISAPI filter & AppMapping in IIS4 as described in README.TXT file, new session ids are created on each invocation of a new page, thereby eliminating any chance for session variables to propogate properly. After initial session file properly created, subsequent session files are 0 bytes, indicating no variables stored. * USING CGI module (PHP.EXE), keep receiving "Warning: open(/tmp/sess_f30188520bcdfb68ecd0baf4236475b7, O_RDWR) failed" errors. Session id do at least stay the same. * Final notes: with ISAPI module setting cookies appears to work as expected, and reading cookies works also. However, with CGI version, apparently unable to either set cookies or read them back in. Also, IIS' inetinfo.exe crashes about 1/2 the time when attempting to 'net stop iisadmin' with the ISAPI modules installed. Scripts used to test this: **********[ Check4SessionId.PHP ]********** <? if ( isset($HTTP_COOKIE_VARS["PHPSESSID"]) ) { echo "Yep, we got a cookie!<br>"; } else { echo "Nope, no cookie.<br>"; } ?> **********[ StartSession.PHP ]********** <? session_start(); echo "Have started a session.<br>"; ?> **********[ Page1.PHP ]********** <? session_start(); if (!$PHPSESSID) { $userid=100; $firstaccess=time(); $lastaccess=time(); session_register("userid"); session_register("firstaccess"); session_register("lastaccess"); } $lastaccess = time(); ?> <HTML> <HEAD> <TITLE>Page 1</TITLE> </HEAD> <BODY> This is page 1.<br> <? echo "\$PHPSESSID = '$PHPSESSID'<br>"; echo "\$userid = '$userid'<br>"; echo "\$firstaccess = '$firstaccess'<br>"; echo "\$lastaccess = '$lastaccess'<p>"; ?> <A HREF="page2.php">Page 2</A>.<p> </BODY> </HTML> **********[ Page2.PHP ]********** **********[ Page3.PHP ]********** **********[ Page4.PHP ]********** Same as above, only with slight changes so that Page1 links to Page 2, Page2->Page3, Page3->Page4, and Page4->Page1.

« previous php.dev (#23979) next »