ID: 43682 User updated by: k dot andris at gmail dot com Reported By: k dot andris at gmail dot com -Status: Feedback +Status: Open Bug Type: Session related Operating System: Debian Sarge PHP Version: 5.2.4 New Comment:
So on subdomains it does work all right. What clears the $_SESSION variable is the root domain. Session is passed fine between a.mysite.com and b.mysite.com, but if I open a session at mysite.com, it will not see the subdomain's session variables, and it will also erase them. The session cookie passes along fine. I call: ini_set('session.cookie_domain', '.mysite.com'); session_start(); I thought it does not work because the dot befor thee site's name (since the root does not have that dot), but removing it does not help either. Can you test this? Previous Comments: ------------------------------------------------------------------------ [2008-02-01 22:36:55] [EMAIL PROTECTED] Try check what the domain actually is in that /var/www/index.php file. ------------------------------------------------------------------------ [2008-02-01 22:35:51] [EMAIL PROTECTED] Sounds like a lighttpd problem to me. I only use lighttpd but I don't have any wildcard dns names set. Perhaps lighttpd doesn't set the host properly that is passed to PHP (or actually any other fastcgi..) ------------------------------------------------------------------------ [2008-02-01 19:47:05] k dot andris at gmail dot com Now I'm closer to see what's causing this... It only happens with a vhost serving a wildcard subdomain. When all *.mysite.net requests go to a single /var/www/index.php file. When I serve subdomains from /var/www/subdomain/ it works ok. I'm using lighttpd with fastcgi. I'l try to see if the problem is with lighttpd or php, but if you can test it with Apache... Thanks. ------------------------------------------------------------------------ [2008-01-26 01:04:07] [EMAIL PROTECTED] If you're not using the sources we provide, then we can't help you. But if you can reproduce this using fresh sources from http://php.net/ then we can talk more.. I have NO problems with sessions in subdomains. ------------------------------------------------------------------------ [2008-01-18 13:15:54] k dot andris at gmail dot com Thanks, I'll try it. 5.2.4 works OK, too. My 5.2.5 was from dotdeb and not the official sources. ------------------------------------------------------------------------ The remainder of the comments for this report are too long. To view the rest of the comments, please view the bug report online at http://bugs.php.net/43682 -- Edit this bug report at http://bugs.php.net/?id=43682&edit=1