Jump to content

Session headaches


tunnelboy

Recommended Posts

Built an ecommerce site from scratch 10+ years ago. Haven't changed anything significant. Now all of the sudden, some users are reporting lost sessions (empty carts, or empty carts upon return from a PayPal transaction, etc).

I've put in a simple check that writes the results to a log page, and there is no understanding what is wrong.

# Example page 1
session_start();
$_session['foo'] = "test";
# Go to page 2
#Example page 2
session_start();
if ($_session['foo'] != "test") exit("Session Lost!");

Often it works, sometimes it doesn't. Of course the script is more involved, but the check for a lost session is RIGHT AFTER session_start(); And I have it set to a log file, so I can see if and when it happens.

Odd thing is that it's working most of the time. I get orders. But some people have said their cart is emptying.

My host said everything is working fine on their end.

Any ideas? Where to start? How to troubleshoot further? Should I just append a custom $sid to every URL with like a hidden form entry? Very frustrating.

Link to comment
Share on other sites

I agree with you 100% I have been using Stablehost for a very long time and it *was* great. Then they sourced their support overseas and it's been horrible ever since. Whatever the issue, it's NEVER their fault. Never ever.

I had my MySQL locked up like a week ago, and I was actually pleading with them to restart the server and they insisted everything was fine. He finally agreed to restart it and all was fine seconds after restarting it.

I have already gone with another host. I'm dreading the move, but just wanted to make sure there wasn't an issue that I was doing.

Thank!

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.