php - Cannot share session with subdomains with Laravel 4 -
i'm trying use laravel on host has many subdomains. 1 subdoman have laravel's app running on i'd share things (like current user) via php native session.
i've edited laravel's session config work subdomains, changing domain value:
'cookie' => 'mydomain_session', 'domain' => '.mydomain.com',
in subdomain, laravel not running, i'm trying access session in way:
session_name("mydomain_session"); session_set_cookie_params(0,'/','.mydomain.com',false,true); session_start();
but it's not working, if try echo $_session variable empty.
the strangest thing if try echo session_id() it's same in both subdomains.
moreover if set same script in third subdomain share session other non-laravel subdomain no problem.
so i'm doing wrong? i'm missing or laravel not managing native php session in ordinary way?
any appreciated!
or laravel not managing native php session in ordinary way?
correct.
throw top of routes.php file:
session::put('foo', 'bar'); die(print_r($_session));
you'll see laravel puts sessions multidimensional array.
for me, "foo" session contained in $_session['_sf2_attributes']
Comments
Post a Comment