Jump to content

Recommended Posts

Posted

I've been having a problem on our site off and on and I think I've pinpointed it to something with cookies, but I wanted to get a second opinion.

 

I've got a custom cart designed on our site and every now and then, an order will come through just fine, but some information will be missing. Or, other times, the entry will get put into the database, but every field will be null. Same thing occurs for member signups as well. To attempt to find out why this was occuring, I'm now checking browser versions and logging anything put into database with that information. So far, there has been no relation as different browsers have the same problem.

 

The odd thing is that I can't recreate this at all. I've tried time and time again to recreate the problem and I can't make it happen. Everytime I do anything as far as signup or buy, it works perfectly.

 

My theory is that since sessions still require cookies to be enabled, some people don't have them enabled, and its causing problems. Either that, or there are momentary hiccups when the code tries to enter things into the database.

Posted

I suppose the answer is "yes" but have you tried disabling cookies on your browser and see if that's the cause of the problem?

Posted

I tried that but my error-checking picks up empty data in required fields and puts me right back to the form.

 

I think I might have found the problem, though. Apparently, when using the header() function, there some issues with session data transferring correctly. Using session_write_close() before initiating a header change will write all current session information to disk first. It should do this automatically as the header changes, but sometimes it doesn't.

 

I'll try this and see if it makes a difference.

Posted

Sorry I couldn't help you more, I never had those problems with sessions :\

 

But I'm glad you found a possible solution. Let me know how it goes B)

Join the conversation

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

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  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...