goldlife
goldlife

Reputation: 1989

two laravel installations session destroy

I have two laravel 4 installations in my htdocs folder. htdocs/laravel1 and htdocs/laravel2. Both have different databases and also a different key in app/config/app.php

Both installations have the driver database for sessions in the config. I want to start both installations with the artisan serve command. the first laravel is started with artisan serve on port 8000. the second laravel is started with artisan serve --port=4000

The problem: When I login in laravel1, and then login into laravel2, my Session in laravel1 is away ... why is this happen? as I say, they are in different databases, and they have a different key in the config file. How can I avoid this problem? Thanks!

Upvotes: 0

Views: 107

Answers (1)

Marek
Marek

Reputation: 7433

You have use different session cookie name for each installation, as they are on the same domain. You should be able to set it in app/config/session.php.

Upvotes: 3

Related Questions