We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 25132
    • 129 Posts
    Help! Since this morning, I a getting error messages on my website. At the top, it says:

    Warning: session_start() [function.session-start]: open(/tmp/sessions/sess_c3026a1fd99e89152dd6005f43e996f3, O_RDWR) failed: No such file or directory (2) in ......... /config.inc.php on line 60


    Further down its:

    « MODx Parse Error »
    MODx encountered the following error while attempting to parse the requested resource:
    « PHP Parse Error »

    PHP error debug
    Error: Unknown: open(/tmp/sessions/sess_c3026a1fd99e89152dd6005f43e996f3, O_RDWR) failed: No such file or directory (2)
    Error type/ Nr.: Warning - 2
    File: Unknown
    Line: 0

    Parser timing
    MySQL: 0.0042 s (0 Requests)
    PHP: 0.0295 s
    Total: 0.0337 s



    Based on a post I found in the forums, I called my host you advised me as follows:

    Issues with sessions are often due to the /tmp folder being used to store your session files. You shouldn’t use the default /tmp to store sessions as it is highly insecure due to being world-readable.

    Instead, here’s an alternative method:
    - FTP to your web space root directory, where you should see /web and /logs
    - Create a new folder called _SESSIONS
    - CHMOD the folder to 770
    - In your scripts, before calling session_start(), add the following lines:

    $doc_root = preg_replace("\/web$", "", $_SERVER["DOCUMENT_ROOT"]);
    ini_set("session.save_path", "$doc_root/_SESSIONS/");

    This will then set the sessions to be saved in _SESSIONS in your hosting space, safely outside the /web directly and only accessible through your scripts. For this technique to work without causing permission problems, all of your sites session enabled files must be uploaded using the same FTP account.


    I don’t have this problem with any of the other sites that are hosted on the same account, so I don’t get it?! I’m not a programmer, so I am very reluctant to start playing around with scripts etc. I didn’t make any changes to the site prior to this happening. Can anybody give me any advice about this?