Internet Explorer is being very strage (not that i'm suprised)

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

Threaded View

I've written a website using PHP4/Mysql. The login function (that
creates 2 or 3 sessions) does not seem to work in IE, but does in
The strange thing is that when I lower the privacy level in IE it
works. I can then then set the privacy level back to the original
level and it will then work also. I can then set the privacy level two
levels down from 'Block all cookies' and it will still work.

This is how the sessions are set:


Is this just a problem with IE or must i rewrite code so it will work
with IE?

Thanks very much,

Re: Internet Explorer is being very strage (not that i'm suprised) wrote:
Quoted text here. Click to load it

First of all, you don't have "2 or 3 sessions".  You have one session  
for a browser at a time.  You may have multiple variables in the  
session, though.

Next, don't use session_register - it's been deprecated.  Rather, you  
should use the $_SESSION superglobal (and put session_start() at the  
beginning of every page using sessions).

As to IE operation - PHP by default uses a cookie to keep track of the  
session id.  If the browser doesn't accept cookies, you will have a  
problem.  This is true for not only IE, but any browser.

This is controlled by two settings in your php.ini file:

session.use_cookies indicates whether PHP should use cookies to keep the  
session_id.  If it is on, PHP will try to use a cookie to keep track of  
the session id.  If it's off, PHP will append the session id to the URL,  

session.use_only_cookies specifies whether to use only cookies (if  
session.use_cookies is on).  If it is on, PHP will only use cookies.  If  
it is off, PHP will try to use cookies first, and if not possible, fall  
back to the URL modification method mentioned above.

Your behavior is indicative of both of these being turned on.

As to why it works after lowering/raising the privacy level, it probably  
will return a cookie, but not accept a new one.

Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.

Site Timeline