Page 1 of 1

Running two versions of Opencart

Posted: Thu Aug 16, 2018 12:57 am
by procheck
Hi everyone,
I have my main website which is the live version and a copy of this website in a sub-directory with separate DB, users etc.. I've changed the .htaccess file RewriteBase accordingly.

If I log onto my MAIN site and my TESTA site, there is no problem. If I create a new test website (TESTB) in a sub-directory and also with separate DB, users etc I cannot be logged into TESTA and TESTB at the same time. If I log into TESTA then into TESTB, I get booted out of TESTA. Why is that?

This is what I have
MAIN
MAIN/TESTA/
MAIN/TESTB/

Thanks

Re: Running two versions of Opencart

Posted: Sun Aug 19, 2018 11:03 pm
by MarketInSG
Because both are on the same domain, the sessions are the same. Create onto a sub-domain instead.

Re: Running two versions of Opencart

Posted: Fri Aug 24, 2018 8:48 pm
by procheck
What you say makes perfect sense but why would my live site at the root be OK with a copy that runs in a sub-folder?

Re: Running two versions of Opencart

Posted: Sat Aug 25, 2018 12:10 am
by MarketInSG
The session and the logged in customer ID is being switched around, but you have 2 different DBs. This means that switching between directories causes you to switch to a different DB, but running on the same session. The same logged in customer ID in testA that you have mentioned may not be present in testB database.

Re: Running two versions of Opencart

Posted: Sat Aug 25, 2018 12:16 am
by procheck
I thought that it would have worked the same way between 2 sub-folders since they all have separate DB's.
Thanks for clearing this up.