Re: Configuration problems concerning sessions.

From: Date: Thu, 04 Jul 2002 21:34:41 +0000
Subject: Re: Configuration problems concerning sessions.
Groups: php.general 
Request: Send a blank email to php-general+get-105519@lists.php.net to get a copy of this message
>Hi all. I'm having problems using sessions. I've been able to narrow >it down to a configuration problem, but I have no idea what to look >for in php.ini or whatever. > >Anyway, let me explain a bit more. For some odd reason php on my local >machine will not pass any variables when you either reload the page or >when you try and pass the $PHPSESSID to another page. For example, >I've used a test script that is supposed to work like a counter. > ><?PHP > session_start(); > session_register('count'); > $count++; > print("<P>You have been here $count times.</P>"); >?> > >Okay, so when you reload this script it's supposed to increase $count >by one. But it doesn't. No matter how many times I reload it stays at >1. > >I'm using GNU Debian Linux Unstable (PPC platform) with Apache 1.3.26-1, >PHP 4.2.1. I don't know how much this has to do with this, but I do >have track-vars enabled. Hmmmm. Okay, try this. Use the Preferences in your browser to "Ask each time" a Cookie is presented. It's in there somewhere. Then, when you visit the page, you should be getting a Cookie. Write down the cookie, and see if you either get sent a different cookie each time, no cookies at all, or the same cookie every time. You may have turned off the Cookies in your php.ini, and since you are not passing $PHPSESSID as part of HTTP communication via GET or POST, then you get a new session every time, because you aren't you. :-) -- Like Music? http://l-i-e.com/artists.htm

« previous php.general (#105519) next »