Welcome to the JaguarPC Community
JaguarPC
Sales: (888) 338-5261
Support: (888)-551-3050
Results 1 to 2 of 2

This is a discussion on Sessions failing at a regular basis. in the Shared & Semi-Dedicated forum
Hey, I keep getting this error once in while on my site: Fatal error: session_start(): Failed to initialize storage module: user (path: /tmp) in /home/killbord/public_html/thisnthat.php ...

  1. #1
    Smo
    Smo is offline
    JPC Addict
    Join Date
    Nov 2002
    Location
    Finland
    Posts
    218

    Sessions failing at a regular basis.

    Hey,
    I keep getting this error once in while on my site:

    Fatal error: session_start(): Failed to initialize storage module: user (path: /tmp) in /home/killbord/public_html/thisnthat.php on line 2

    Is there anything I can do about it. or do I have to notify thechsupport everytime?

    would something like:

    PHP Code:
    if (session_start()) {
       
    //do smething
    } else {
       
    // don't run any user features.



    [edit]
    The error only occures for short moments (few mins) once in a while (every few days)

  2. #2
    Jag Veteran
    Join Date
    Sep 2002
    Posts
    650
    Quote Originally Posted by Smo
    Is there anything I can do about it. or do I have to notify thechsupport everytime?
    Actually, both
    Server should allow write access to /tmp at all times, so what you experience is server misconfiguration and should be handled by support.

    You can, however, modify PHP code so that it won't rely on /tmp directory to store session data. In order to do that, either call session_save_path("/some/directory") where /some/directory is world writeable directory under your account or use .htaccess file to modify value of session.save_path setting.

    For more information check session-save-path doc and Session Handling Functions.
    Hope that helps.

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
  •