RE: [PHP] Session problems / where to register
| From: | Chad Day | Date: | Fri, 23 Aug 2002 16:06:06 +0000 |
| Subject: | RE: [PHP] Session problems / where to register | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-113812@lists.php.net to get a copy of this message | ||
Still need help with this.. I've been browsing the list archives and have
tried various things.
No luck with an .htaccess file.. I've tried <IfModule> tags and setting the
session.cookie_domain value, <Location> tags, neither worked.
Tried making the change to httpd.conf, by putting the php_flag and php_value
tags in the <Directory> entry. Still nothing. Session variables I register
at my.domain.com aren't accessible at www.domain.com.
I really am at a loss to what I am doing wrong, I thought maybe I couldn't
use ini_set for some permission/security reason, but I'm not running in safe
mode, and judging by the documentation I should be able to change that
value.
The -only- way I've gotten it to work is to change it in php.ini itself, but
I plan on running some other sites here for other users, leasing out space,
and obviously I don't want them to be able to set cookies for my domain, and
I'm sure they may want to do apps where they need sessions/cookies as well.
Any help is greatly appreciated. Thanks!
Chad
-----Original Message-----
From: Chad Day [mailto:cday@atpco.com]
Sent: Friday, August 23, 2002 10:23 AM
To: Rasmus Lerdorf
Cc: php-general@lists.php.net
Subject: RE: [PHP] Session problems / where to register
Ok, thanks. I changed it in php.ini and it seems to work.
I'd rather set it in the script, but I had problems with that:
if (ini_set("session.cookie_domain", "domain.com")) {
echo "ini_set";
} else {
echo "no ini";
}
always failed.. I also tried moving it above the session_start call (saw in
a comment on php.net), but it still failed there as well. If anyone knows
why that would be failing, please let me know.
Thanks for your help, Rasmus. Much appreciated.
Chad
-----Original Message-----
From: Rasmus Lerdorf [mailto:rasmus@php.net]
Sent: Friday, August 23, 2002 10:21 AM
To: Chad Day
Cc: php-general@lists.php.net
Subject: RE: [PHP] Session problems / where to register
> Isn't that just if I want to set cookies in that domain? I'm looking to
> just register session variables, not save cookies to the user's machine.
That is the same thing in this case. The only way a session variable is
tied to a domain is through whatever mechanism decides how the session id
is propogated. If you are using cookies, then the cookie domain tells the
remote browser which domains to send this cookie-based session id to.
-Rasmus
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php