SitePoint Sponsor

User Tag List

Results 1 to 3 of 3

Hybrid View

  1. #1
    SitePoint Member
    Join Date
    Dec 2005
    Posts
    15
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    PHP Warning: session_start() - not sure why

    Hi all,

    I'm trying to fix a problem with a site which uses sessions. I keep seeing this error in the error log:

    Code:
    PHP Warning: session_start(): open(/tmp/sess_6d5f9217920bb7a27c7108fec4587a20, O_RDWR) failed: Permission denied (13) in /home/public_html/includes/inc.php on line 1697

    inc.php is the main site include, which is included on every page. The session handling bit looks like this:

    Code:
    if ($ss != "")
    {
      session_id($ss);
    }
    
    session_start();
    The variable $ss is used to pass the session id between the http: and https: sections of the site.

    Any idea as to why I'm getting this warning?

    Sessions are being created fine for both http and https.

    The only other possibly relevant bit of info is that it's set to use_only_cookies.

    Happy to provide more info if necessary.

    TIA

  2. #2
    reads the ********* Crier silver trophybronze trophy longneck's Avatar
    Join Date
    Feb 2004
    Location
    Tampa, FL (US)
    Posts
    9,854
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    the user that you server is running as doesn't have the proper rights to the /tmp/ directory.

  3. #3
    SitePoint Member
    Join Date
    Dec 2005
    Posts
    15
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by longneck View Post
    the user that you server is running as doesn't have the proper rights to the /tmp/ directory.
    Hi Longneck,

    But that's the puzzling thing - if this were the case, sessions would never be started. In fact, sessions work perfectly well on this server. Most of the time session files are created and destroyed just fine.


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
  •