views:

310

answers:

1

Follow up to this:

http://stackoverflow.com/questions/795414/why-cant-i-pass-user-sessions-between-subdomains

I followed the advice there and used :

ini_set('session.cookie_domain','mydomain'); (with and without a dot before mydomain) as the first line of index.php in the public folder as advised there and in other links around the web. The problem is that it completely "ruined" Zend_Session_Namespace inside my application. While it persisted among calls (as it should) of the page, now every time it is being called it is behaving as a new session is being instantiated, without holding all variables. Any ideas on how to fix this?

A: 

Have you tried setting the cookie domain via Zend_Session?


$config['cookie_domain'] = 'mydomain';

Zend_Session::setOptions($config);
ksharpe
yes, and it did not work:$sessionOptions = array( );$sessionOptions['cookie_domain'] = BASE_SITE;Zend_Session::setOptions($sessionOptions);Zend_Session::start();
dimitris mistriotis
I found a solution after many months, until now I used a workaround:inside php.ini of apache:session.cookie_domain = ".example.com"which is the same as the "same" question in the link above.Afterwards the apache needs obviously a restart, but the the browser's cache and sessions need to be cleaned as well to test from "new".After that I only used more than one session namespaces to have domain specific variables in each.
dimitris mistriotis