note 70387 added to function.session-start

From: Date: Fri, 13 Oct 2006 22:14:03 +0000
Subject: note 70387 added to function.session-start
Groups: php.notes 
Request: Send a blank email to php-notes+get-118517@lists.php.net to get a copy of this message
I had the same issue lots of you probably experienced; IE wouldnlt remember the session. I tried every solution i could find, sending P3P headers, change session settings in php.ini, change to IP instead of hostname, etc, etc. The change to the IP-address, instead of the hostname of the server, actually worked. It is however not a very pretty solution. So I decided to look for other solutions. Then I read somewhere it could be related to caching and I added a "pragma no-cache" header at every place in the code where session vars are being set. This fixed the issue with IE. <?php //So again at every place where you call: $_SESSION = ... //Add this: header("Pragma: no-cache"); ?> Worked for me, I hope it works for you also. Alfons ---- Server IP: 194.109.193.119 Probable Submitter: 130.89.165.56 ---- Manual Page -- http://www.php.net/manual/en/function.session-start.php Edit -- https://master.php.net/note/edit/70387 Del: integrated -- https://master.php.net/note/delete/70387/integrated Del: useless -- https://master.php.net/note/delete/70387/useless Del: bad code -- https://master.php.net/note/delete/70387/bad+code Del: spam -- https://master.php.net/note/delete/70387/spam Del: non-english -- https://master.php.net/note/delete/70387/non-english Del: in docs -- https://master.php.net/note/delete/70387/in+docs Del: other reasons-- https://master.php.net/note/delete/70387 Reject -- https://master.php.net/note/reject/70387 Search -- https://master.php.net/manage/user-notes.php

« previous php.notes (#118517) next »