Jump to content
  • Checkout
  • Login
  • Get in touch


The e-commerce.

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


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


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

Join the conversation

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

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