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?
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?
Comment