Applicable to:
- Plesk 12.5 for Linux
- Plesk 10.x for Linux
- Plesk 11.x for Linux
Symptoms
PHP update was installed by the weekly Plesk update task. After that, PHP scripts cannot manage session objects on sites that are configured to run PHP as CGI or FastCGI.
Cause
The PHP upgrade reset ownership settings and permissions on the
/var/lib/php/session
directory to their default values, preventing FTP users of domains from creating files in the directory. Since CGI and FastCGI PHP scripts run based on the privileges of FTP users, this causes problems for scripts that try to create session objects.
The issue has been fixed in Plesk 11.0.9 Micro-Update #42 .
Resolution
Install the latest Plesk micro-updates.
As a workaround, set proper permissions and ownership on
/var/lib/php/session
:
# chmod 1733 /var/lib/php/session
# chown root:root /var/lib/php/session
Additional information
Permissions on /var/lib/php/session/ are changed after PHP update in Plesk 12.5
Comments
6 comments
Hello, I did all that, still not succeeding in creating a session file.
CentOS 6.9 (Final)
Plesk Onyx Version 17.8.11 Update #6, last updated on April 26
PHP 7.1.16 FastCGI
session.save_path /var/lib/php/session
stat /var/lib/php/session | grep Access
Access: (1733/drwx-wx-wt) Uid: ( 0/ root) Gid: ( 0/ root)
ls -ld /var/lib/php/session
drwx-wx-wt 2 root root 462848 Apr 26 18:06 /var/lib/php/session
mod_fcgid: stderr: PHP Warning: session_start(): open(/var/lib/php/session/sess_736dr8b0bkoi75v7kf6ggt30t7, O_RDWR) failed: Permission denied (13)
So I am rather clueless, will be grateful for any advice
Sorry forgot to mention that under PHP 5.3.3 mod_php session_start() works fine...
@Manfred
Hello!
Usually, the steps above or from this article resolve such issues.
Additional investigation is required. As I can see, you have already created a ticket, please, expect an update there.
Ok, thanks for your prompt reply. I assume my problem is somewhere near this issue:
https://support.plesk.com/hc/en-us/articles/115000781549-How-to-configure-Apache-to-process-PHP-code-inside-of-html-file
Anyway the solution is a bit unclear so I will test it when I find some spare time.
@Manfred
Hello!
Let us know in case you will have questions after testing.
@Manfred
Please note that the article https://support.plesk.com/hc/en-us/articles/115000781549-How-to-configure-Apache-to-process-PHP-code-inside-of-html-file was updated with the simplified solution.
Feel free to leave comments in case you will have additional questions.
Please sign in to leave a comment.