Strange behavior when running two Oxid eshops

Hello

I use two Oxid CE 4.5.5 installations (one for production and the other one for testing) like this: www.blahblah.com/OxidA and www.blahblah.com/OxidB

Of course they use different databases and database users (defined in their config.inc.php) and have different RewriteBase paths in their .htaccess (RewriteBase /OxidA and RewriteBase /OxidB).

I use different users to log in - let say userA and userB.

The weird thing is that both kind of “share” their baskets when run at the same time in two browser windows (Firefox).

For example when I add new articles in OxidA same articles strangely appear in the OxidB also ?!!?!? and vice versa. Sometimes after adding or altering content of OxidB basket, OxidA “switches” from userA to userB !??

When I run the same thing in different browsers (Firefox and Safari) everything works normal.

I’m scratching my head for hours now :confused:. and running out of ideas. Checked and rechecked config.inc.php and .htaccess , deleted oxid’s tmp and Forefox’s cache …

Could it be something connected to sessions/cookies wrongly defined … ?

Is there someone with similar configuration with two Oxid eshops who could try to reproduce this behaviour?

Any ideas?

Marko

Hi,

i think this is a regular behavior and i can confirm this. Both Shops run correctly and separat.

The things mess up because the session will be transfered from one shop to the other. I use differnet browsers or close and reopen the browser when i switch between the shops. Do you want to open both shops to the puplic or is one just a test-shop?

cya

Thanks for quick clarification/demystification. Good to know that it’s not my configuration problem and is somehow under control. For now I use the second shop for testing only but I plan to have more than one active and hypothetically there could be a user on both shops at the same time and experiencing this weird behavior.

Maybe this “sessions mess up” should be classified as a bug?

Marko

[QUOTE=tmikla;75909]Maybe this “sessions mess up” should be classified as a bug? [/QUOTE]
Not really, as this is IMO the standard behaviour of PHP(Apache in conjunction with one Browser…

Just use two different browsers, and the “problem” is gone.

[QUOTE=tmikla;75909]but I plan to have more than one active and hypothetically there could be a user on both shops at the same time and experiencing this weird behavior.[/QUOTE]
If you use a different domain name for each shop this does not happen.

Now I see it’s really a universal kind of problem. I found some explanations regarding different browsers here:

IE 8 has even File/New session command.

Thanks for helping.

Hi all,

Server configuration is responsible for this: oxid by default uses the same session name in both directories, but server stores them in same place, so it is shared session between them. In order to make it work seperatly, open /core/oxsession.php function start there are lines:


        if ( $this->isAdmin() ) {
            $this->setName("admin_sid");
        } else {
            $this->setName("sid");
        }

change names by adding your shop prefix, and problem will be solved.
WARNING: i suggest use this fix only for testing. i’m not recomending to change any core files, as after update, you will loose your functionality. The best way is to write module for this.

Hi

You mean like this (for www.blahblah.com/OxidB):

    if ( $this->isAdmin() ) {
        $this->setName("OxidB/admin_sid");
    } else {
        $this->setName("OxidB/sid");
    }