zend subdomains auth doesn't carry over

104 views Asked by At

I recently had introduced two languages to my site and were initially hidden from the URL. however, after reading more into it, it seemed that having them in the url seemed more SEO friendly. So I added them as subdomains. I now have en.site.com and ja.site.com.

My problem is that when I login to the site via en.site.com, and then switch to ja.site.com, my Zend_Auth doesn't seem to have an identity.

I can provide code, but I don't know exactly where to look for this problem.

Any insight would be appreciated!

Thanks!

EDIT:

 ini_set('session.cookie_domain', '.site.com' );

That is the first line of my /public/index.php file, but still no luck.

2

There are 2 answers

1
Mr Coder On

do this on top of your public/index.php

ini_set('session.cookie_domain', '.site.com' );
0
Artur Michalak On

Or in application.ini

session.cookie_domain = ".example.com"

I think this is better because it's more flexible.