SID confusion

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Derek Fountain

    SID confusion

    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?
  • Gordon Burditt

    #2
    Re: SID confusion

    >I was just looking into the aspects of session handling in PHP (version 4.3[color=blue]
    >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.[/color]

    *IF* the browser accepts cookies.
    [color=blue]
    >All
    >subsequent page requests (where the session ID is supplied from the browser
    >via a cookie) leave the SID empty.[/color]

    *IF* the browser accepts cookies.
    [color=blue]
    >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?[/color]

    Why does your browser accept cookies virtually all the time?
    [color=blue]
    >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?[/color]

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

    Gordon L. Burditt

    Comment

    Working...