Jump to content

disappearing cookie set by osCommerce


garnetlion

Recommended Posts

I'm working on a web site with an OS Commerce install (I posted over there too, but no replies yet), and I'd like to have a log in/log out (as appropriate) button in the top of every page, including those not part of OS Commerce.

 

I logged into osCommerce and print_r-ed (that is so a word) $_SESSION and $_COOKIE, and certain session variables are set when logged in that are not present when not logged in. Of course, there's a session cookie (named osCsid) that contains the session id. So I navigated on over to a not osCommerce page set to print the same things, and they were empty. $_COOKIE was shown as being an empty array, but $_SESSION didn't even print that. I went back to the osCommerce page and all the data was still there. The browser verifies that the cookie does not disappear, other PHP scripts just can't access it. Why? How do they hide it when they're both issued by the same domain? More importantly, any idea on how I can get to it?

 

I found <a href="http://www.milonic.com/mfa/2005-May/changing-menu-item-according-to-login-state.html">this</a> discussion of how to tell if a user is logged in or not, but the relevant functions don't return usable information off the osCommerce pages. I've poked around the code and found nothing that looked relevant (not exhaustively, of course. osCommerce is huge!), I'm hoping somebody here can possibly point me in the right direction off the top of their head. I can't possibly be the first person to want to do this, so I don't know why none of my googling has turned up any results.

 

I appreciate any pointers or insight you may have.

Link to comment
https://forums.phpfreaks.com/topic/39709-disappearing-cookie-set-by-oscommerce/
Share on other sites

Archived

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

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