- Plesk Onyx for Linux
Unable to change OS PHP Handler to Plesk PHP FPM handler in Domains > example.com > PHP Settings - message of successfully applied changes is displayed, however, Domains > example.com > PHP Settings > View the phpinfo() still shows OS PHP handler.
Plesk was upgraded from 17.5.3 to 17.8.11.
Dist-upgrade from Debian 8 to 9 or from Ubuntu 14 to 16 was performed.
Debian 8 PHP packages are left in the system:
# dpkg -l | grep php5
ii libapache2-mod-php5 5.6.36+dfsg-0+deb8u1 amd64 server-side, HTML-embedded scripting language (Apache 2 module)
ii php5-cgi 5.6.36+dfsg-0+deb8u1 amd64 server-side, HTML-embedded scripting language (CGI binary)
ii php5-cli 5.6.36+dfsg-0+deb8u1 amd64 command-line interpreter for the php5 scripting language
ii php5-common 5.6.36+dfsg-0+deb8u1 amd64 Common files for packages built from the php5 source
This is Plesk bug with ID PPPM-9085, which will be fixed in future updates.
As a workaround:
Connect to the server via SSH
Stop php5 service:
# service php5-fpm stop
Remove configuration files of the PHP handler for the domain:
# rm -rf /etc/php5/fpm/pool.d/example.com
or for all websites:
# rm -rf /etc/php5/fpm/pool.d/*
Recreate PHP configuration of the domain by changing its PHP handler (for example Plesk PHP 7.2 FPM):
# plesk bin site -u example.com -php_handler_id plesk-php72-fpm
or for all domains:
# for domain in `plesk bin site -l`; do plesk bin site -u $domain -php_handler_id plesk-php72-fpm; done
Note: list of PHP handlers can be found with the following command:
# plesk bin php_handler --list