[PHP] sessions / cookies / header(Location...
I have a page that does a login... right after the login is successfull it registers a session var called 'userid'... and does a header(Location: newpage.php) which checks for the existance of this var... if it exists it will show, otherwise it goes back to the login page... the weird thing is... it always worked fine, even if I logged in and out with three different users to test it... but now it only works if I replace the header() thing with: header(Location: newpage.php?PHPSESSID=$PHPSESSID) why is this weird now? it use to work... and the weird thing is... while in newpage.php the user does some stuff which calls itself and also gets this 'userid' var... and gets it fine without any PHPSESSID stuff... any clues? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] sessions / cookies / header(Location...
yup, your browser is not accepting cookies. thats a good guess. when a browser does not accept cookies, trans-sid will kick in, trans-sid will not work on full urls, just reletive urls. no trans-sid http://www.mediawaveonline.com/index.php trans-sid /index.php header redirectect require (supposed to require) full urls. in other words its a good idea to put PHPSESSID=$PHPSESSID on all your full urls anyhow, just incase for non-cookie browsers. -- Chris Lee [EMAIL PROTECTED] Christian Dechery [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... I have a page that does a login... right after the login is successfull it registers a session var called 'userid'... and does a header(Location: newpage.php) which checks for the existance of this var... if it exists it will show, otherwise it goes back to the login page... the weird thing is... it always worked fine, even if I logged in and out with three different users to test it... but now it only works if I replace the header() thing with: header(Location: newpage.php?PHPSESSID=$PHPSESSID) why is this weird now? it use to work... and the weird thing is... while in newpage.php the user does some stuff which calls itself and also gets this 'userid' var... and gets it fine without any PHPSESSID stuff... any clues? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] sessions / cookies / header(Location...
it does not have anything to do with my browser... that's for sure... I'm using MSIE 5.5, and never had any trouble... and as I said on the email... it used to work fine... it just stopped working... and now yet some fresh info... it's working again now... I've tried... one thing I noticed, that when I was testing and it was not working f2s.com was relly slow... sluggish really... then 1 hour later got faster... I tested it and it worked... so... does speed has anything to do with it? Maybe they were doing some maintenance or whatever... At 14:35 17/5/2001 -0500, Chris Lee wrote: yup, your browser is not accepting cookies. thats a good guess. when a browser does not accept cookies, trans-sid will kick in, trans-sid will not work on full urls, just reletive urls. no trans-sid http://www.mediawaveonline.com/index.php trans-sid /index.php header redirectect require (supposed to require) full urls. in other words its a good idea to put PHPSESSID=$PHPSESSID on all your full urls anyhow, just incase for non-cookie browsers. -- Chris Lee [EMAIL PROTECTED] Christian Dechery [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... I have a page that does a login... right after the login is successfull it registers a session var called 'userid'... and does a header(Location: newpage.php) which checks for the existance of this var... if it exists it will show, otherwise it goes back to the login page... the weird thing is... it always worked fine, even if I logged in and out with three different users to test it... but now it only works if I replace the header() thing with: header(Location: newpage.php?PHPSESSID=$PHPSESSID) why is this weird now? it use to work... and the weird thing is... while in newpage.php the user does some stuff which calls itself and also gets this 'userid' var... and gets it fine without any PHPSESSID stuff... any clues? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] . Christian Dechery (lemming) . http://www.tanamesa.com.br . Gaita-L Owner / Web Developer -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]