Two identical installs, same database.
localhost/install1 is mapped as abc.com
localhost/install2 is mapped as xyz.com
two directories, two domains, one database
if I point my browser to xyz.com, a cookie is set that expires in three weeks. If I *login*, the cookie becomes a session cookie that expires immediately. bad.
if I point my browser to abc.com, a cookie is set that expires in three weeks. If I *login*, the cookie still expires in three weeks. good.
It's as if there was something about the "xyz" domain that drupal doesn't like.
But here's the kicker:
Two identical installs, *two* databases.
localhost/install1 is mapped as abc.com
localhost/install2 is mapped as xyz.com
if I point my browser to xyz.com, a cookie is set that expires in three weeks. If I *login*, the cookie becomes a session cookie that expires immediately. bad.
if I point my browser to abc.com, a cookie is set that expires in three weeks. If I *login*, the cookie still expires in three weeks. good.
BUT, and this is a big but, if I switch everything around, and map localhost/install1 to xyz.com and map localhost/install2 to abc.com:
if I point my browser to xyz.com, a cookie is set that expires in three weeks. If I *login*, the cookie becomes a session cookie that expires immediately. bad.
if I point my browser to abc.com, a cookie is set that expires in three weeks. If I *login*, the cookie still expires in three weeks. good.
wha?
Comments
or to put it another way
I have two separate Drupal installs on my system. Same exact codebase, but two different domains and two different databases.
The problem is, domain abc.com, everything works good. I login, close the browser, reopen, and it remembers me.
Domain xyz.com, I login, close the browser, reopen, and I have to login again.
But, bizarre, if I point domain xyz.com to the abc local folder and the abc database, it don;t remember.
but if I point the abc.com to the xyz local folder and database, it remembers.
crazy session/cookie stuff going on here.
I tried all differnet browsers, same result.
I tried putting it on a live server, same result.
check .htaccess for a session
check .htaccess for a session and/or cookie value for each domain. It sounds like there is a value set high for abc, but not for xyz. No matter how you have php configured, .htacess will override the settings.
Annie