[Discuss] PHP Session solved -- sort of
Darren Duncan
darren at DarrenDuncan.net
Fri Jun 23 14:58:31 PDT 2006
At 11:43 AM -0700 6/23/06, Deryk Barker wrote:
>Thus spake Carl B. Constantine (duckwing at duckwing.ca):
>
>> Isn't it always the case, you ask a question and then a few minutes
>> later, you find the answer yourself. This is what happens when you work
>> on other people's code ;-)
>>
>> At any rate, I got the session to work correctly on my local system.
>> Some of the code written by the previous programmer did some
>> optimization that just didn't work in my environment. So I'm using the
>> standard session_start() instead of his custom one while developing,
>> then will go back for final.
>
>Be warned: browsers treat session variables differently.
>
>Especially - you guessed - IE. Some of my students had a nasty
>(non-)portability surprise this term vecause of IE and session
>variables.
I don't know if it is relevant, but I read on a website called
phpfreaks that there is something you can do which helps workaround a
bug in IE related to caching, which may be affecting you.
The workaround, according to them, is to issue a cache-control =
private HTTP header on all your pages. Eg:
header( "Cache-Control: private" );
I have used this myself and haven't seemed to have any problems. Of
course, I never used IE yet in my testing either.
Since the problem is browser specific, I anticipate that this same
workaround is useful no matter what server side language you are
using.
-- Darren Duncan
More information about the Discuss
mailing list