• If you are still using CentOS 7.9, it's time to convert to Alma 8 with the free centos2alma tool by Plesk or Plesk Migrator. Please let us know your experiences or concerns in this thread:
    CentOS2Alma discussion

[PPP-17456] PHP-Sessions not working in 12.5.30 Update #1

fliegerhermi

Regular Pleskian
Hi everyone.

I installed a fresh install of Plesk 12.5 on a Debian-Jessie Openvz-Node.
After I configured everything a migrated a subscription using Plesk Migration Manager.

The only problem: Sessions don't work anymore. I switched from FastCGI via Apache (5.5) to FPM via Nginx (5.5). Same problem.
Different php-versions: Same issue.

The phpinfo shows sessions enabled and /var/lib/php5 as save-path.

Anyone having an idea?
No error-mesages in the logfile of the subscription.

Thanks!
 
Sure. PHP is working, but php sessions don't.
So my software is working until I want to login using sessions which doesn't work anymore.

Little test-script for people encountering the same problem:
PHP:
<?php
// Start Session
session_start();
// Show banner
echo '<b>Session Support Checker</b><hr />';
// Check if the page has been reloaded
if(!isset($_GET['reload']) OR $_GET['reload'] != 'true') {
   // Set the message
   $_SESSION['MESSAGE'] = 'Session support enabled!<br />';
   // Give user link to check
   echo '<a href="?reload=true">Click HERE</a> to check for PHP Session Support.<br />';
} else {
   // Check if the message has been carried on in the reload
   if(isset($_SESSION['MESSAGE'])) {
      echo $_SESSION['MESSAGE'];
   } else {
      echo 'Sorry, it appears session support is not enabled, or you PHP version is to old. <a href="?reload=false">Click HERE</a> to go back.<br />';
   }
}
?>

This results in the error (Sorry, it appears....) in my case. What elso do you need?
 
Another issue (maybe they belong together): After reboot I get 502 Bad Gateway. I have to switch to php-fastcgi and then back to php-fpm to get the site back online.

I isolated the problem I think:
After an update today there is a working php-version. 5.6.12.

PHP 5.4 FPM Nginx: no sessions
PHP 5.4 FPM Apache: no sessions
PHP 5.4 Fastcgi: no sessions
PHP 5.6.13 FPM Nginx: no sessions
PHP 5.6.13 FPM Apache: no sessions

PHP 5.6.12 FastCGI: sessions working ok

I looked into the phpinfo()
The working fastcgi info has a session path: /var/lib/php5/sessions while all the others have /var/lib/php/
I think this is a bug in the configuration of plesks php.ini files. The session can't be stored and that's why it is not working!
 
Last edited:
Problem solved!
IgorG I think this is a bug that should be corrected in the installer!

I changed the save_path of the sessions to:
Code:
session.save_path = "/var/lib/php5/sessions"

under global settings->PHP-Settings and than for every PHP-Version.
I hope that this is not going to be an issue some day.
 
Hi @fliegerhermi,

We confirm that it's bug in Plesk 12.5. The issue has number PPP-17456 in out internal tracker. It'll be fixed in the nearest microupdates.

Thank you for reporting.
 
Back
Top