The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

PHP Session Errors

Discussion in 'General Discussion' started by tmellon, Oct 5, 2004.

  1. tmellon

    tmellon Well-Known Member

    Joined:
    Aug 15, 2001
    Messages:
    64
    Likes Received:
    0
    Trophy Points:
    6
    Location:
    Sarasota, FL
    I hope someone can help me out with that... I'm stumped.

    I've searched on the board - done suggested things, but a client of mine is still getting session error problems.

    TMP is secured. I even disabled abled it, umounted tmp, mounted it again, and resecured it. Still session errors.

    /tmp is chmod'ed to 777

    php.ini is pointing to /tmp

    Still errors.

    I've never had any problems with php sessions until about a week ago. Seems it started doing it after a recompile of apache/php. I didn't change anything that I normally compile with it when I update it (and before it worked fine).

    On a simple session test, we get:
    I'm recompiling apache right now, nothing new/nothing different, but I doubt it will fix it.

    Anyone have any suggestions - maybe I might've missed something - or maybe suggest something else that hasn't been said on the board?

    Thanks in advance!
     
  2. tmellon

    tmellon Well-Known Member

    Joined:
    Aug 15, 2001
    Messages:
    64
    Likes Received:
    0
    Trophy Points:
    6
    Location:
    Sarasota, FL
    Anyone??

    Thanks in advance!
     
  3. kran

    kran Well-Known Member

    Joined:
    Jul 5, 2003
    Messages:
    74
    Likes Received:
    0
    Trophy Points:
    6
    Location:
    Colombia
    cPanel Access Level:
    Root Administrator
    Any one found a solution?

    I´m still having this problem any help?
     
  4. chirpy

    chirpy Well-Known Member

    Joined:
    Jun 15, 2002
    Messages:
    13,475
    Likes Received:
    20
    Trophy Points:
    38
    Location:
    Go on, have a guess
    Make sure that your /tmp directory is chmod 1777 as it needs the sticky bit set.
     
  5. richy

    richy Well-Known Member

    Joined:
    Jun 30, 2003
    Messages:
    276
    Likes Received:
    1
    Trophy Points:
    16
    Looks to be like a PHP coding issue.

    Have you got the following as your file:
    PHP:
    --- File start ---
     
    <?php
    (with a blank line at the start)
    or
    PHP:
    --- File start ---
    <?php
    (with the PHP start tag being the absolute first thing in the file - no spaces, line breaks etc etc)

    If it's the first one, a character (in this case a newline/line break) is being sent out before the SessionCookie which breaks the protocol (as the SessionCookie is sent out as a header line and the header lines cannot be sent out after any other characters are sent).

    If this isn't the case, then please upload/post the smallest snippet of code you can replicate this problem on for us to take a look at.
     
    #5 richy, Nov 26, 2004
    Last edited: Nov 26, 2004
  6. generaltso

    generaltso Member

    Joined:
    Jun 21, 2004
    Messages:
    17
    Likes Received:
    0
    Trophy Points:
    1
    Pretty sure this is a coding issue, nothing to do with cPanel.
     
Loading...

Share This Page