Jump to content

Archived

This topic is now archived and is closed to further replies.

nawtwrong

frustrating session problem in Opera/Internet explorer on Mac

Recommended Posts

I have an e-commerce script that works perfectly in internet explorer/firefox/netscape on any windows OS but when I use the script in Opera on windows (or in IE/Safari on a Mac I've been told) the sessions don't work.

What should happen is 5 sessions are set at the login stage:

[code]$_SESSION['login'];
$_SESSION['products'];
$_SESSION['total'];
$_SESSION['product_codes'];
$_SESSION['country_code'];[/code]

These are set on a 'shared' secure server (https://shared_secure_server_space/mydomain/). Don't know if it's anything to do with this?

Like I say in internet explorer/firefox/netscape the sessions carry over from the login page right through to the order added page with no problems. In Opera/safari etc something wierd happens, sometimes they work, other times they are not set at all and on the rare occasions they do work, when you refresh a page they disappear! This happens randomly, there is no pattern to it or anything I can spot that should be causing it.

I have tried clearing the cache of the browser to see if that was it, but it still happens.

Has anyone has similar experiences or can offer any helpful advice, I'd really appreciate it because it's driving me mad.

Thanks in advance for any help.

Share this post


Link to post
Share on other sites
I have a very similar problem where sessions are set perfectly in all cases except on the Mac platform.

Does anyone have any ideas?

Share this post


Link to post
Share on other sites
are you losing all session data or some?  Most likely the case is in the browser's way of supplying the sessionID to the server.  Best bet to solve this is to have the session id stored as a cookie on the users computer and then use that to restore the session value.  Its probably a couple of lines, but I wouldn't know if it would help. 
so basically you have
[code]
<?php
if(the cookie not set){
///set cookie= sesionid();
}
else{
//set sessionid = cooke;
}
?>
[/code]
the page
http://us2.php.net/manual/en/function.session-id.php
should help explain.  I think this will help if the issue is as I suspect with the browser not keeping its session ID

Share this post


Link to post
Share on other sites

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.