[CLUE-Tech] PHP Sessions and Cookies: Brain Cramp

Jed S. Baer thag at frii.com
Sun Oct 13 09:49:27 MDT 2002


On Sun, 13 Oct 2002 09:42:25 -0600
Sean LeBlanc <seanleblanc at americanisp.net> wrote:

> On 10-12 22:38, Jed S. Baer wrote:
> <snip>
> 
> > So, reloading this thing continually, I get a different session id
> > each time, and, obviously, $thecnt = 1. The burgers/fries cookie does
> > get set.
>                                                               ^^^^
> You mean doesn't, right? I wonder if this has anything to do with a
> fully-qualified domain? I see you are using localhost - don't cookies
> use the domain (along with an optional path) to store/retrieve? What
> would it do with "localhost"? Just a guess.

No, it _does_ get set. It isn't useful, as it has no path or domain, so
would not get sent back AFAIK.

> I'm not really sure what the session stuff has to do with the cookie in
> your simple script. Is there any way you can try it without that in
> there? In any case, I'm puzzled why you would get a different session
> each reload? It sounds like Mozilla/Galeon is rejected even memory-only
> cookies, too.

The burgers/fries cookie is there only to see if any cookie can be
successfuly set in my browser, from localhost. The session stuff is
related, as PHP tries to use a cookie for session management. I get a
different session on each reload, because ... hmmm, I'm not completely
sure, but I assume that if the cookie were there to send back to the
server, the browser would do it on a page reload.

A little quick coding on the sample script will maybe be more telling.

jed
-- 
We're frogs who are getting boiled in a pot full of single-character
morphemes, and we don't notice. - Larry Wall; Perl6, Apocalypse 5



More information about the clue-tech mailing list