• 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

php as fastCGI or Apache module / session handling problems

janl

New Pleskian
Hi,

I have a freshly set up plesk 11 on Centos. I have currently migrated websites over from other systems.
With the standard Plesk setting "run PHP as: FastCGI Application" it turned out that I could not log in any php-application (e.g. phpmyadmin).
After entering user credentials it would just jump back to the login page again without any error message, be it correct credentials or wrong.

I thought it might be file privileges for the php session handler. The setting is as follows:

/etc/php.ini as well as /var/www/vhosts/DOMAIN/etc/php.ini:
session.save_path = "/var/lib/php/session"

and that directory is "755". I have now set it to 777 and it works... but only for phpmyadmin. Strange enough, for the clients typo3 installation (a php CMS) it doesn't:

> 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, referer: http://XXX/typo3/index.php

How can that be: how can a script not save to a directory which is 777?

And why is even the Plesk default configuration:
- FastCGI
- /var/lib/session =755, belonging to: root:apache
not working at all for no script at all? Does FastCGI not run as "apache"?

Can anyone share a light on this?


Edit:
I have switched over to the third option: "run PHP as CGI application".
Now sessions work with typo3 as well. It just creates a file in /var/lib/session just as it should.
But why?!?! Can anyone explain this?

Is it advisable to stay on "CGI" instead of "FastCGI" or are there severe e.g. security implications?
 
Last edited:
Back
Top