ID: 39931 User updated by: stefan dot lakerveld at sogeti dot nl Reported By: stefan dot lakerveld at sogeti dot nl Status: Bogus Bug Type: Session related Operating System: IIS PHP Version: 4.4.4 New Comment:
If i set a session variable in script 1 and it doesn't appear in script 2 then something seems to be wrong? Previous Comments: ------------------------------------------------------------------------ [2006-12-22 13:59:36] [EMAIL PROTECTED] Sorry, but your problem does not imply a bug in PHP itself. For a list of more appropriate places to ask for help using PHP, please visit http://www.php.net/support.php as this bug system is not the appropriate forum for asking support questions. Due to the volume of reports we can not explain in detail here why your report is not a bug. The support channels will be able to provide an explanation for you. Thank you for your interest in PHP. ------------------------------------------------------------------------ [2006-12-22 13:47:37] stefan dot lakerveld at sogeti dot nl Description: ------------ I made a simple login page which redirects to another page if the userid and password is correct. I verify the login by setting a session variable which is checked in the redirected page. If the session variable is not correct then the user is returned to the login page again. The problem is this: if a user enters a correct password for the first then he is still being redirected back to the login page. if the user enters the correct password again then he is directed to the next page. During the session this problem doesn't occur again and the user can logoff and logon again without problems. But only the first time he has to login twice which is very annoying. Reproduce code: --------------- login.php $_SESSION['login'] = "Y"; echo "<script language='Javascript'>"; echo "document.location = 'http://www.somesite.com/index.php?team=999'"; echo "</script>"; index.php if ($_SESSION['login'] != "Y") { header("location: inloggen.php"); exit (); } else { echo "Welcome"; } (i simplified the scripts) Expected result: ---------------- I would expect that after the first succesfull login the script index.php would receive a session variable 'login' filled with a "Y" Actual result: -------------- After a succesfull login the script index.php receives session variable 'login' being empty and sends the user back to login.php If the user enters the (same) correct data again then the second time script index.php DOES receive a "Y" in session variable 'login' ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=39931&edit=1