SitePoint Sponsor

User Tag List

Results 1 to 4 of 4

Thread: session problem

  1. #1
    SitePoint Addict aniltc's Avatar
    Join Date
    Nov 2006
    Location
    INDIA
    Posts
    399
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Angry session problem

    hi all

    Every time when i am using seeions.My url showing following way

    script.php?PHPSESSID=322fe03120041e6c5285480a4fbf1037

    I don't want to see " ?PHPSESSID=322fe03120041e6c5285480a4fbf1037"

    How can i disable this.but i have to use sessions with cookies or without

    is it possible? if ,how?

    please help me

  2. #2
    I meant that to happen silver trophybronze trophy Raffles's Avatar
    Join Date
    Sep 2005
    Location
    Tanzania
    Posts
    4,662
    Mentioned
    2 Post(s)
    Tagged
    0 Thread(s)
    This is probably because you're doing session_start() after outputting HTML. If you do it like that, you can't use cookies any more so propagating the session ID via the URL is the only way.

    Try doing session_start() before anything is outputted to the browser.

  3. #3
    SitePoint Addict pkSML's Avatar
    Join Date
    Aug 2006
    Location
    Ohio
    Posts
    230
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by W3C
    PHP provides a fallback mechanism. If it discovers that cookies are not accepted by the client, it rewrites every link on the page to include that token in a query string. I believe this used to be enabled by default... It can be turned by on by setting the session.trans_sid directive.
    Source: http://www.w3.org/QA/2005/04/php-session


    In PHP 5, I see this value in my php.ini file as session.use_trans_sid = 0
    -Stephen

    Get a LitlURL to this page!

  4. #4
    SitePoint Addict aniltc's Avatar
    Join Date
    Nov 2006
    Location
    INDIA
    Posts
    399
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Thumbs up session.trans_sid =0

    so if i am using session.trans_sid =0 will solve this problem


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •