Keep sessions in subdomains with CakePHP

1

I am having problems keeping the sessions active among the subdomains of the system, I am using the CakePHP version 2.4.7, I already added the function below in App/bootstrap.php

ini_set('session.cookie_domain', env('HTTP_BASE')); 

I already put it in App/core.php

Configure::write('Security.level', 'low');
Configure::write('Session.save', 'session_save_handler');

But it still does not work, do you have any other settings for this to work?

    
asked by anonymous 28.04.2014 / 15:22

1 answer

2

You have a configuration inside the app / Config / core.php file to change the domain session cookie:

Configure::write('Session', array(
    'defaults' => 'php',
    'ini' => array(
        'cookie_domain' => '.example.com'
    )
));

I did the test and it worked correctly.

    
21.05.2014 / 18:16