By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
428,601 Members | 989 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 428,601 IT Pros & Developers. It's quick & easy.

SID confusion

P: n/a
I was just looking into the aspects of session handling in PHP (version 4.3
on SUSE-9.1) and I've got confused about the SID constant. The info says
'Constant containing either the session name and session ID in the form of
"name=ID" or empty string if session ID was set in an appropriate session
cookie.'

In practise it appears that SID is set after the initial call to
start_session() which initiates the session, but is empty thereafter. All
subsequent page requests (where the session ID is supplied from the browser
via a cookie) leave the SID empty. Which kind of makes the documentation
make sense, but it leaves me wondering a) why SID is set at the outset, but
is otherwise left empty; and b) is SID of any real use if it's going to be
empty virtually all the time? Do PHP scripts in general make regular use of
the SID constant, and if so, how is it being empty most of the time a
helpful design?
Jul 17 '05 #1
Share this Question
Share on Google+
1 Reply


P: n/a
>I was just looking into the aspects of session handling in PHP (version 4.3
on SUSE-9.1) and I've got confused about the SID constant. The info says
'Constant containing either the session name and session ID in the form of
"name=ID" or empty string if session ID was set in an appropriate session
cookie.'

In practise it appears that SID is set after the initial call to
start_session() which initiates the session, but is empty thereafter.
*IF* the browser accepts cookies.
All
subsequent page requests (where the session ID is supplied from the browser
via a cookie) leave the SID empty.
*IF* the browser accepts cookies.
Which kind of makes the documentation
make sense, but it leaves me wondering a) why SID is set at the outset, but
is otherwise left empty; and b) is SID of any real use if it's going to be
empty virtually all the time?
Why does your browser accept cookies virtually all the time?
Do PHP scripts in general make regular use of
the SID constant, and if so, how is it being empty most of the time a
helpful design?


To make things work if the browser doesn't (GUESS WHAT?).

Gordon L. Burditt
Jul 17 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.