Bug #9914 Updated: session_id loss with redirection via header() method

From: Date: Mon, 15 Apr 2002 17:28:10 +0000
Subject: Bug #9914 Updated: session_id loss with redirection via header() method
References: 1  Groups: php.bugs php.doc 
Request: Send a blank email to php-bugs+get-5045@lists.php.net to get a copy of this message
ID: 9914 Updated by: rsswartz@yahoo.com Reported By: royerj@free.fr Status: Analyzed Bug Type: Documentation problem Operating System: Win32 PHP Version: 4.0.4pl1 New Comment: I've tried the recommended solution==> header("Location:$url.'?$PHPSESSID'"); This fails for me. My example: $SID1=$SID // * up at the top Header ("Location:registration.php.'?$SID1'"); Notice the strange registration.php. in the middle. Well php doesn't like it either. Any other recommendations? Previous Comments: ------------------------------------------------------------------------ [2001-03-22 07:14:07] sniper@php.net You're right, the session id is not added when doing redirects. You have to do it 'manually', with something like this: header("Location: $url.'?$PHPSESSID'"); Reclassified as documentation problem. Note: IIRC there's also feature/change request about this. --Jani ------------------------------------------------------------------------ [2001-03-22 05:53:27] royerj@free.fr Althought the transient_id option is active, the session_id is lost after using the header() method in order to redirect to another script. ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=9914&edit=1

« previous php.bugs (#5045) next »