• Our team is looking to connect with folks who use email services provided by Plesk, or a premium service. If you'd like to be part of the discovery process and share your experiences, we invite you to complete this short screening survey. If your responses match the persona we are looking for, you'll receive a link to schedule a call at your convenience. We look forward to hearing from you!
  • The BIND DNS server has already been deprecated and removed from Plesk for Windows.
    If a Plesk for Windows server is still using BIND, the upgrade to Plesk Obsidian 18.0.70 will be unavailable until the administrator switches the DNS server to Microsoft DNS. We strongly recommend transitioning to Microsoft DNS within the next 6 weeks, before the Plesk 18.0.70 release.
  • The Horde component is removed from Plesk Installer. We recommend switching to another webmail software supported in Plesk.

Bug: Migrate site from 9.x to 10.x, subdomains can't use PHP session with FastCGI

bluik

Basic Pleskian
I had a server running the latest 9.x series Plesk.
I migrated a site with several (20) subdomains to latest Plesk 10.x with FastCGI turned on.

All subdomains cannot use PHP sessions.
It seems to be some kind of bug concerning only the migrated subdomains.
If I create a simple test file (sess.php) /var/www/vhosts/example.com/httpdocs:
<?
session_start();
?>
And run it under the main domain (http://example.com/sess.php), it works - no errors at error_log.
If I then move this same test file (sess.php) to one of the migrated subdomains, say /var/www/vhosts/example.com/subdomains/test/httpdocs and try to run it (http://test.example.com/sess.php) it does not work, unable to write to /var/lib/php/sessions. I even chmod 777 this directory for testing but it does not help.

Errors:

[Mon Aug 01 07:16:27 2011] [warn] [client 192.0.2.1 mod_fcgid: stderr: PHP Warning: session_start(): open(/var/lib/php/session/sess_ko4dsk6kjrav9f28m1pbuo8um6, O_RDWR) failed: Permission denied (13) in /var/www/vhosts/example.com/subdomains/test/httpdocs/sess.php on line 2
[Mon Aug 01 07:16:27 2011] [warn] [client 192.0.2.1] mod_fcgid: stderr: PHP Warning: Unknown: open(/var/lib/php/session/sess_ko4dsk6kjrav9f28m1pbuo8um6, O_RDWR) failed: Permission denied (13) in Unknown on line 0
[Mon Aug 01 07:16:27 2011] [warn] [client 192.0.2.1] mod_fcgid: stderr: PHP Warning: Unknown: Failed to write session data (files). Please verify that the current setting of session.save_path is correct (/var/lib/php/session) in Unknown on line 0

What to do? I have tons of sites I need to migrate to Plesk 10, and most of them are using Joomla. So it would be a great hassle to move them manually to different directories (need to reconfig Joomla a lot).


EDIT:
Seems the problem is missing custom php.ini. The main site in conf/<long random number string created by PMM>_httpd.include has the following:

SetEnv PP_CUSTOM_PHP_INI /var/www/vhosts/tst.khmerdev.com/etc/php.ini

<IfModule mod_fcgid.c>
FcgidInitialEnv PP_CUSTOM_PHP_INI /var/www/vhosts/tst.khmerdev.com/etc/php.ini
</IfModule>

But any subdomain does not.
This means subdomains created with Plesk (not migrated) have the same problem. I am cross-posting this to "Troubleshooting" forum also.
 
Last edited:
Back
Top