ID:               43682
 Updated by:       [EMAIL PROTECTED]
-Summary:          headers are OK
 Reported By:      k dot andris at gmail dot com
-Status:           Open
+Status:           Feedback
 Bug Type:         Session related
 Operating System: Debian Sarge
 PHP Version:      5.2.4
 New Comment:

I don't see how this is PHP bug at all. More like lighttpd bug if a bug
at all. Check these: What host PHP script gets from ligttpd
($_SERVER['SERVER_NAME'] and what is tried to be set for the cookie. 


Previous Comments:
------------------------------------------------------------------------

[2008-02-10 18:29:19] k dot andris at gmail dot com

I found it! The problem only occours if you serve the base domain and
the subdomains from different sections of lighttpd config file, like
this:

$HTTP["host"] =~ "^mysite\.com" {
  server.document-root = "/var/www/mysite/"
}

$HTTP["host"] =~ "(.+)\.mysite\.com$" {
  server.document-root = "/var/www/mysubdomains/"
}

------------------------------------------------------------------------

[2008-02-10 18:17:20] k dot andris at gmail dot com

It seems to work on another server. I'll try to find out what was wrong
with the first one.  Sorry..

------------------------------------------------------------------------

[2008-02-10 17:21:06] k dot andris at gmail dot com

Did you try getting the session variable set on a subdomain at the
root? Like apple.mydomain.com/echo.php sets $_SESSION['apple'] =
'fruit', but mydomain.com/echo.php will not see it. Or does it in your
tests? BTW, session_set_cookie_params lack parameter docs, but I guess
lifetime is in seconds.

------------------------------------------------------------------------

[2008-02-05 00:28:53] [EMAIL PROTECTED]

Try using this instead of ini_set():

http://php.net/session_set_cookie_params

Calling this with proper values prior to calling session_start(); works
just fine for me.

------------------------------------------------------------------------

[2008-02-02 13:15:14] k dot andris at gmail dot com

Host names pass along fine to the script handling the subdomains.
Actually I used the subdfomain name to set test session variables, like
"a_test2 and "b_test".

------------------------------------------------------------------------

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

Reply via email to