Re: sessions failing to persist

From: Date: Mon, 03 May 2004 07:42:14 +0000
Subject: Re: sessions failing to persist
References: 1 2 3 4  Groups: php.general 
Request: Send a blank email to php-general+get-185170@lists.php.net to get a copy of this message
Well, the cookie won't ever be set in his configuration... In the html source of the rendered page, is the form action modified to reflect the current session id (to post it as a $_GET value)? or: does the <input type="hidden" value reflect a valid session id? If any or all those values (session id) are present in the source: do they get posted? A print_r($_REQUEST) should shed some light on that... You also could change the form method from "post" to "get" for debugging purposes, so you can see on one glance what variables are assigned and which values they have. another poster mentionned whether the session dir is writeable... I'd say that would narrow it down considerably. as a sidenote: it would be good practive to enclose element attributes in double quotes. for some dialects of (x|ht)ml it's a requirement. hth Richard Monday, May 3, 2004, 9:26:59 AM, thus was written: > Michael R. Wayne <phpuser@wayne47.com> skrev den Mon, 3 May 2004 00:56:11 > -0400: >> On Mon, May 03, 2004 at 12:54:54AM -0400, John Nichel wrote: >>> Michael R. Wayne wrote: >>> >>> >As I posted last week, I seem unable to have sessions persist. I >>> >have ruled out https as a problem, the following simple script, >>> >installed as xxx.php will generate a new session number every time >>> >the field is filled in and "Submit" is hit. >>> > >>> >Note that I am not using cookies, the relevant session variables are: >>> > Session Support enabled >>> > session.auto_start On >>> > session.use_cookies Off >>> > session.use_trans_sid On >>> > >>> >When run, the session file appears to contain stage=1 but never is >>> being >>> >read. >>> > >>> >I suspect I'm missing something obvious, any pointers? >>> >>> I copy and pasted your code, and didn't get the results you described >>> above. Basically, it all worked fine on my box (and now I have to go >>> put my ini settings back to my normal values ;) >>> >>> Is this a *nix or Windows machine? Is your session directory writable >>> by the webserver user? >> >> FreeBSD 4.8 Unix. Yes, the session directory is writable and the >> files are getting properly written to that directory - the problem >> is that they are never being read (so each time I click Submit, I >> get a new session ID). >> >> /\/\ \/\/ > I had a similar problem a while ago and it turned out to be the browsers > fault. The browser I used didn't send anything. > But from the earlier discussions this doesn't seem to be the problem but I > thought it was worth mentioning anyway. > echo $_COOKIE["PHPSESSID"]; // First of all to see if any cookie has been > sent. > /Thomas > -- > ===================================== > Thomas Björk > CTO > UNINET

« previous php.general (#185170) next »