Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Regenerate session = true prevents clients from logging in. Ways to workaround


RusNN

Recommended Posts

Today I got issue with regenerate session = true. I can't login to the shop as a client. Google get this topc

but without answer. Unfortunatelly topic is archived, but maybe my answer may help somebody else.

Well in may case everything was simple - changing session name in application_top.php from osCsid to osCsid1 close the issue. In my case I have 2 versions of the shop: one is the mainshop.com and the second is test.mainshop.com. Both completely different even the database and images paths, but cookies from mainshop.com are available in test.mainshop.com and session in test shop cannot recreated after user login. No errors are produced.

Everything to do is to change in application_top .php session name:

// set the session name and save path
  tep_session_name('osCsid1');

 

This may happend if 2 or more cookies with same name are available for different subdomains in single domain. Everything will work OK, just before you not to try regenerate session id. In osCommerce this happens after user login. Session regenerate OK,  cookie replaced, but something wents wrong and in DB in whos_online and session tables we got 2 lines: with old and with new session id, and it must be 1 line with new id replaces old.

This issue is for 3.2+ osCommerce with different from 2.2 session management. I never see this problem in 2.2 shops. I gues this may happen in new v4. So I suggest to make session name as a configuration value.

 

 

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...