1. Please take a little time for this simple survey! Thank you for participating!
    Dismiss Notice
  2. Dear Pleskians, please read this carefully! New attachments and other rules Thank you!
    Dismiss Notice
  3. Dear Pleskians, I really hope that you will share your opinion in this Special topic for chatter about Plesk in the Clouds. Thank you!
    Dismiss Notice

Problem session

Discussion in 'Plesk 11.x for Linux' started by JoseSPAIN, Jan 27, 2013.

  1. JoseSPAIN

    JoseSPAIN Basic Pleskian

    14
    85%
    Joined:
    Oct 3, 2011
    Messages:
    44
    Likes Received:
    0
    Hello, I have found that when I try to log into a website that I have in my plesk server shows me this error:

    Warning: Unknown: open (/ var/lib/php/session/sess_cat709qkqakrjf9u3367hi0l53, O_RDWR) failed: Permission denied (13) in Unknown on line 0 Warning: Unknown: Failed to write session data (files). Please verify the current setting of That session.save_path is correct (/ var / lib / php / session) in Unknown on line 0

    Do you know how to fix it?
     
  2. Faris Raouf

    Faris Raouf Silver Pleskian Plesk Guru

    31
    30%
    Joined:
    Mar 15, 2009
    Messages:
    667
    Likes Received:
    17
    Please see http://kb.parallels.com/en/7056 (although only Plesk 9 and 10 Plesk are mentioned, I think this applies to 11 as well)

    We do see this issue happening on some systems. It is usually caused because the user that php runs as (same as ftp username) when using php_fascgi instead of mod_php does not have access to the default session storage directory (/var/lib/php/session).

    *IF* this is the cause in your case, you can resolve it by following the KB. However, let me simplify it slightly:

    1) Create a directory in the "private" directory that already exists within the domain's directory structure. e.g.
    mkdir /var/www/vhosts/domain.tld/private/session

    2) Chown the directory so that it belongs to the ftp username and psacln group. e.g. if the ftp username is yourftpuser then you'd do this:
    chown yourftpuser.psacln /var/www/vhosts/domain.tld/private/session

    3) Secure the directory a little bit
    chmod 700 /var/www/vhosts/domain.tld/private/session

    All the above is as outlined in Step 3 of the KB.

    Next, change the php settings for the domain. You can do this via Websites & Domains tab -> Show advanced options -> Website Scripting and Security -> PHP settings tab.

    Scroll down a bit and find session.save_path. Change from Default to Enter Custom value and then enter EITHER
    {WEBSPACEROOT}/private/session
    OR
    /var/www/vhosts/domain.tld/private/session

    Click on OK.
    Examine /var/www/vhosts/domain.tld/etc/php.ini to confirm that your change has been written and that the path is correct.
    You may need to restart apache but this should not be needed.

    Try doing what you did before and see if the session errors have gone.

    But please confirm that the cause of your issue is as outlined in the KB before continuing. It could be a permissions or ownership issue with your main sessions directory.

    Note that the above has the safe effect as step 4 in the KB but is done in a different way. If one way doesn't work, try the other. Use phpinfo() to check what session save path is for the running site if you need to troubleshoot.
     
Loading...