Session path in PHP-FPM
I am running PHP-FPM on php72.
This is the ONLY version of PHP installed on my server.
Wordpress is throwing an insane amount of errors like this:
[QUOTE]Failed to read session data: files (path: /var/cpanel/php/sessions/ea-php71)
(notice php71) So I edited /var/cpanel/userdata/user/user.com.php-fpm.yaml It looks like this now:
After that, I rebuilt and restarted: /scripts/php_fpm_config --rebuild /scripts/restartsrv_apache_php_fpm However it continues to log the error. It is still attempting to read directory php71 As a side note, on MultiPHP.ini it is set to: session.save_path = "/var/cpanel/php/sessions/ea-php72" Which I believe is irrelevant in my case, but just fyi. Where should I set the path, if not in that yaml file then? Many thanks
(notice php71) So I edited /var/cpanel/userdata/user/user.com.php-fpm.yaml It looks like this now:
_is_present: 1
php_value_session_save_path: { name: 'php_value[session.save_path]', value: "/var/cpanel/php/sessions/[% ea_php_version %]" }
After that, I rebuilt and restarted: /scripts/php_fpm_config --rebuild /scripts/restartsrv_apache_php_fpm However it continues to log the error. It is still attempting to read directory php71 As a side note, on MultiPHP.ini it is set to: session.save_path = "/var/cpanel/php/sessions/ea-php72" Which I believe is irrelevant in my case, but just fyi. Where should I set the path, if not in that yaml file then? Many thanks
-
Hi, I have found that the local user ini had the wrong path. I thought it would be irrelevant and only use the yaml conf file but apparently the .ini continues to be usd even under PHP-FPM? Can you please confirm? Many thanks! 0 -
I have found that the local user ini had the wrong path. I thought it would be irrelevant and only use the yaml conf file but apparently the .ini continues to be usd even under PHP-FPM?
Hi @bloom360, Individual PHP-FPM user pool values take precedence over changes made using the MultiPHP INI Editor options in cPanel and Web Host Manager, however you generally shouldn't have to setup a custom pool value if the option is adjustable through the INI Editor. It's also possible the syntax you are using for the custom PHP-FPM pool value is invalid, and thus isn't enabled. Can you take the following steps and let me know if it helps? 1. Revert the custom PHP-FPM YAML file for the domain back to the following:--- _is_present: 1
Then, run the following command:/scripts/php_fpm_config --rebuild
2. Using the cPanel MultiPHP INI Editor will automatically populate a php.ini file, a user.ini file, and a .htaccess file. Make sure there are no additional ini files beyond what's setup by the INI Editor within the account's home directory or below. 3. Restart Apache and PHP-FPM:/scripts/restartsrv_apache_php_fpm /scripts/restartsrv_httpd
Thank you.0
Please sign in to leave a comment.
Comments
3 comments