Problem with session SID

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Goran Ljubej

    Problem with session SID

    This constant doesn't work for me...

    <?php echo strip_tags(SID) ; ?> does nothing, and yes I did start session....

    manual says that session id should be passed throug url as
    session_name=se ssion_id but how can I found out session's name???
  • Janwillem Borleffs

    #2
    Re: Problem with session SID

    Goran Ljubej wrote:[color=blue]
    > manual says that session id should be passed throug url as
    > session_name=se ssion_id but how can I found out session's name???[/color]




    JW



    Comment

    • BLob

      #3
      Re: Problem with session SID

      > <?php echo strip_tags(SID) ; ?> does nothing, and yes I did start
      session....[color=blue]
      > manual says that session id should be passed throug url as
      > session_name=se ssion_id but how can I found out session's name???[/color]

      SID is the string you need to add when the session id is not passed via a
      cookie.
      As you do not need to add anything to the url when cookies are enable, SID
      is then empty.
      Anyway, I don't see why you need to strip_tags(SID) : it doesn't have any
      tag.
      I would understand a urlencode(SID) a little better, eventhough I think it
      is not necessary.

      If you need the session name or the session id :
      session_name()
      session_id()



      Comment

      • Goran Ljubej

        #4
        Re: Problem with session SID

        BLob wrote:
        [color=blue][color=green]
        >><?php echo strip_tags(SID) ; ?> does nothing, and yes I did start[/color]
        >
        > session....
        >[color=green]
        >>manual says that session id should be passed throug url as
        >>session_name= session_id but how can I found out session's name???[/color]
        >
        >
        > SID is the string you need to add when the session id is not passed via a
        > cookie.
        > As you do not need to add anything to the url when cookies are enable, SID
        > is then empty.
        > Anyway, I don't see why you need to strip_tags(SID) : it doesn't have any
        > tag.
        > I would understand a urlencode(SID) a little better, eventhough I think it
        > is not necessary.
        >
        > If you need the session name or the session id :
        > session_name()
        > session_id()
        >
        >
        >[/color]
        thanks for your explanation... so basicaly... mine SID was empty because
        i had cookies enables?
        in manual says strip_tags(SID) for some security reasons... which are
        those i don't know... thanks bro

        Comment

        • BLob

          #5
          Re: Problem with session SID

          > in manual says strip_tags(SID) for some security reasons... which are[color=blue]
          > those i don't know... thanks bro[/color]

          From the manual : "The strip_tags() is used when printing the SID in order
          to prevent XSS related attacks." But I don't understand the kind of attack
          they are talking about...


          Comment

          Working...