RE: [PHP] Session problems / where to register

From: Date: Fri, 23 Aug 2002 16:39:54 +0000
Subject: RE: [PHP] Session problems / where to register
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-113816@lists.php.net to get a copy of this message
php_value session.cookie_domain .foo.bar in your httpd.conf or even .htaccess or with an ini_set() before the session_start() call all work fine. Stick a phpinfo() call on a page and verify that the setting is there in the "Local Value" column. If it isn't, doublecheck that you are editing the right files, putting the stuff in the right place, and finally, more likely, your code isn't bogus. -Rasmus On Fri, 23 Aug 2002, Chad Day wrote: > Still no luck, both in Apache (tried php_flag and php_value), and .htaccess > (ditto) > > I have a feeling I am missing something very basic, but can't imagine what > it is. And yes, I restarted Apache and closed out of IE after I made each > and every change. > > Chad > > -----Original Message----- > From: Rasmus Lerdorf [mailto:rasmus@php.net] > Sent: Friday, August 23, 2002 12:16 PM > To: Chad Day > Cc: php-general@lists.php.net > Subject: RE: [PHP] Session problems / where to register > > > You need to set it to .domain.com > > On Fri, 23 Aug 2002, Chad Day wrote: > > > 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 > > > > > > > > -- > > PHP General Mailing List (http://www.php.net/) > > To unsubscribe, visit: http://www.php.net/unsub.php > > > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > >

« previous php.general (#113816) next »