A big problem with SESSIONS

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • gamernaveen
    New Member
    • Oct 2007
    • 28

    #1

    A big problem with SESSIONS

    Hello everyone , am running PHP 4.
    I dont use SESSION IDs in URL.
    This is what the problem is.
    I set a session in file
    Code:
     http://vegetariancooking.mobi/index.php
    , it works fine , and displays the session too. However , when I goto
    Code:
    http://www.vegetariancooking.mobi/index.php
    , why isnt the session displaying ?
    I mean the session value ?
    Please help me , thank you so much.
  • Markus
    Recognized Expert Expert
    • Jun 2007
    • 6092

    #2
    Originally posted by gamernaveen
    Hello everyone , am running PHP 4.
    I dont use SESSION IDs in URL.
    This is what the problem is.
    I set a session in file
    Code:
     http://vegetariancooking.mobi/index.php
    , it works fine , and displays the session too. However , when I goto
    Code:
    http://www.vegetariancooking.mobi/index.php
    , why isnt the session displaying ?
    I mean the session value ?
    Please help me , thank you so much.
    No idea.

    Us seeing your code might help?

    Comment

    • dlite922
      Recognized Expert Top Contributor
      • Dec 2007
      • 1586

      #3
      Originally posted by gamernaveen
      Hello everyone , am running PHP 4.
      I dont use SESSION IDs in URL.
      This is what the problem is.
      I set a session in file
      Code:
       http://vegetariancooking.mobi/index.php
      , it works fine , and displays the session too. However , when I goto
      Code:
      http://www.vegetariancooking.mobi/index.php
      , why isnt the session displaying ?
      I mean the session value ?
      Please help me , thank you so much.
      That's how sessions work, I believe for security reasons.

      If the URL changes anywhere between the HTTP and the .COM. the session will not register.

      This is even true when switching between HTTPS and HTTP when the rest of the domain name is the same.

      Try passing the session with GET to the new URL, then store it in the session there.

      Good luck,


      -Dan

      Comment

      Working...