Losing Session Variables in IE6

Do you have a question? Post it now! No Registration Necessary.  Now with pictures!

Threaded View
I notice that others have had this problem, after scanning Google, but
I couldn't find any solution.

I have tested my PHP code on both Mac's & PC's and on several browsers
(Firefox, Safari, IE etc etc), with several operating systems.
Everything works fine, except ...

On a couple of Windows XP SP2 PC's session variables in IE6 seem from
time to time to get 'lost'.

More specifically:

I start my session on every page. I get the user to log on, which sets
the appropriate session variables. When I access a couple of
*particular* pages (not all pages) - the first time I access them after
logging on, the session is lost. If I then log back in for a second
time (without closing down the browser) the session variables are
re-set and then if I access those *particular* pages again - the
session is fine!!!!

Now, as mentioned this works fine on 99.99% of browsers, platforms,
whatever - but on the occasional IE6 XP SP2 set-up this occurs. I've
played with the IE6 security settings (although I can't believe this
would make any difference to server side stuff - I was clutching at

If anybody has any ideas, experiences etc etc - then please let me
know, as this does seem a slightly bizarre problem, to say the least!

Many thanks in advance!

Re: Losing Session Variables in IE6

competitions@when-it-matters.com wrote:
Quoted text here. Click to load it

Anything to do with session_write_close() ?
Don't know, haven't used it myself (yet) but i heard session vars got
lost on Mac if one didn't use this. (Not in your case, but you can
always try)


Re: Losing Session Variables in IE6

Thanks for the response. Just cracked it after 1.5 days of trying! Both
the offending files (that broke the session) had hyphens in their file
names. Renamed them to use an underscore and voilla!

These two files were not the only file names within this site to have a
hyphen in their name, but were the only two that broke the session. The
only difference with these files is that they receive variables passed
through a URL (from a flash movie) ... although the pages broke the
session regardless of whether you passed vars or not (i.e. accessing
them through abc.php or abc?var1=test&var2=test would both break the
session ... if that makes sense!

Site Timeline