#43682 [Fbk->Opn]: headers are OK
| From: | k dot andris at gmail dot com | Date: | Sun, 10 Feb 2008 17:21:07 +0000 |
| Subject: | #43682 [Fbk->Opn]: headers are OK | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-122153@lists.php.net to get a copy of this message | ||
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:
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.
Previous Comments:
------------------------------------------------------------------------
[2008-02-05 00:28:53] jani@php.net
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".
------------------------------------------------------------------------
[2008-02-02 13:11:51] k dot andris at gmail dot com
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?
------------------------------------------------------------------------
[2008-02-01 22:36:55] jani@php.net
Try check what the domain actually is in that /var/www/index.php file.
------------------------------------------------------------------------
[2008-02-01 22:35:51] jani@php.net
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..)
------------------------------------------------------------------------
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