bloom360

Active Member
Feb 23, 2015
28
4
3
cPanel Access Level
Root Administrator
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:

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:

Code:
_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
 

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,904
2,218
463
Hello @bloom360,

Can you upload a PHPINFO file to the document root of the website and let us know what shows up for the session.save_path, PHP version, and Server API values? We document how to do this on step two of the following resource:

Tutorial - Managing php.ini directives with PHP-FPM

Thank you.
 

bloom360

Active Member
Feb 23, 2015
28
4
3
cPanel Access Level
Root Administrator
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!
 

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,904
2,218
463
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:

Code:
---
_is_present: 1
Then, run the following command:

Code:
/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:

Code:
/scripts/restartsrv_apache_php_fpm
/scripts/restartsrv_httpd
Thank you.