Jump to content

frustrating session problem in Opera/Internet explorer on Mac


nawtwrong

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.
Link to comment
Share on other sites

  • 1 year later...
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
Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

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.