#16102 [Com]: >1 session variables not getting set correctly

From: Date: Sat, 30 Nov 2002 11:25:01 +0000
Subject: #16102 [Com]: >1 session variables not getting set correctly
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-26220@lists.php.net to get a copy of this message
ID: 16102 Comment by: seema@infovergix.com Reported By: martin_jones@bigfoot.com Status: No Feedback Bug Type: Session related Operating System: Windows 2000/XP PHP Version: 4.1.2 New Comment: This is a major bug in this version of php 4.1.2 Previous Comments: ------------------------------------------------------------------------ [2002-11-13 04:31:59] albaity@php4web.com PHP Session is not work with IIS in windows2000/WinXP try this code : <? session_start(); //åÐí ÇáÏÇáå ÊÝÍÕ ÇÐÇ ßÇä ÇáÔÎÕ ÞÇã ÈÊÓÌíá ÇáÏÎæá Çã áÇ function is_login(){ Global $test; if (session_is_registered("test") ){ return true; }//end if else{ return false; }//end else }// end is_login() function //åÐå ÇáÏÇáÉ ÊÞæã ÈÊÓÌíá ÇáÏÎæá function make_login(){ Global $test; $test = 123; session_register('test'); } //åÐå ÇáÏÇáå ÊÞæã ÈÊÓÌíá ÇáÎÑæÌ function Logout(){ Global $test; session_destroy(); } //ÇáÇä ÊÌÑÈÉ áÚãá ÇáÏæÇá if (is_login()){ //ÇÐÇ ßÇä ÇáÔÎÕ ÞÏ ÞÇã ÈÊÓÌíá ÇáÏÎæá ÝÇØÈÚ ÞíãÉ ÇáãÊÛíÑ test echo $test; logout(); }else{ make_login(); ?> <a href="test.php">tryagain</a> <? } ?> it must output "123" but is output *NOTHING* ------------------------------------------------------------------------ [2002-05-04 00:00:04] php-bugs@lists.php.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". ------------------------------------------------------------------------ [2002-04-03 01:22:04] derick@php.net Nothing changed between 4.1.1 and 4.1.2, but you can try the windows binaries for php 4.2.0rc1 from www.php.net/~derick ------------------------------------------------------------------------ [2002-04-02 19:42:57] andreas@kampanjportalen.com OK, so this obviously doesn't work in the 4.1.2 version of PHP... Does anybody have a link to somewhere I could download the previous 4.1.1 version?? Can't seem to find it... Thanks! ------------------------------------------------------------------------ [2002-03-27 19:05:42] peter.monk@uwi.com.au Hope this isn't too much of a 'me too!'. I have the same problem on W2K/IIS5 running PHP 4.1.2 as an ISAPI module. I have looked at the session files in the temp directory and they seem to be created and populated with variables without any trouble. The problem is that any page referencing them returns an 'index not valid' error. I too am using $_SESSION. The only way I can get it to work is if I do sessions the "old-fashioned" way, ie: $foo = 'bar'; session_register( $foo ); If I go back to 4.1.1 everything works fine (using $_SESSION). Peter. ------------------------------------------------------------------------ The remainder of the comments for this report are too long. To view the rest of the comments, please view the bug report online at http://bugs.php.net/16102 -- Edit this bug report at http://bugs.php.net/?id=16102&edit=1

« previous php.bugs (#26220) next »