Hello,
Is it possible to share cakePHP sessions (stored in the database) across subdomains?
This thing - ini_set("session.cookie_domain", ".mydomain.com"); seems not to be working in this case.
Thanks
Hello,
Is it possible to share cakePHP sessions (stored in the database) across subdomains?
This thing - ini_set("session.cookie_domain", ".mydomain.com"); seems not to be working in this case.
Thanks
Is it possible to share cakePHP sessions (stored in the database) across subdomains?
This single code is correct:
ini_set("session.cookie_domain", ".mydomain.com");
You need more than just that 1 line in order to have session stored in the database across subdomain.
Beside that you also need these 2 new session in cakePHP:
Plus you also need add a cookie code:
http://book.cakephp.org/2.0/en/core-libraries/components/cookie.html
After you implement the code it should work.
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.