tristansilkstream
New Pleskian
- Server operating system version
- Ubuntu 24.04.2 LTS
- Plesk version and microupdate number
- 18.0.71 #2
I have applications that are sensitive to warnings in addition to errors and will fail a request if a warning is found. When running my scripts on PHP FPM handlers, there is an error relating to enabling opcache that is breaking my scripts output.
This is the error dumped from a PHP script:
array(4) { ["type"]=> int(2) ["message"]=> string(89) "Zend OPcache can't be temporary enabled (it may be only disabled till the end of request)" ["file"]=> string(7) "Unknown" ["line"]=> int(0) }
You can also find it in the error log: /var/log/plesk-php84-fpm/error.log
I recently set up a new server with Plesk Obsidian 18.0.71 Update 2 and installed my software under a new subscription running PHP 8.4 FPM. Dedicated and shared PHP FPM are affected. FastCGI is not affected.
I have set up a clean install of Plesk with a subscription showing the error which I can give Plesk staff access to.
The issue seems to happen since Plesk Obsidian 18.0.70
https://docs.plesk.com/release-notes/obsidian/change-log/#plesk-18070
I believe this is the specific change that has caused this problem:
"(Plesk for Linux) It is no longer possible to bypass the default PHP performance settings in PHP-FPM handlers using the .user.ini settings file or the PHP ini_set() command. The default PHP performance settings should be optimal for most websites, and changing the settings could impact the websites’ performance."
It looks like Plesk is creating two config files per domain and both set opcache.enable = 1 which seems to cause the issue.
For shared PHP FPM, the two files would be:
/var/www/vhosts/system/domain-name-example.com/etc/php.ini
opcache.enable = 1
/opt/plesk/php/8.4/etc/php-fpm.d/domain-name-example.com.conf
php_admin_value[opcache.enable] = 1
For dedicated, I think the FPM pool conf file is in a different location.
In previous versions of Plesk, we don't have the FPM conf file. This has only just started appearing recently especially for new subscriptions being set up.
This is the error dumped from a PHP script:
array(4) { ["type"]=> int(2) ["message"]=> string(89) "Zend OPcache can't be temporary enabled (it may be only disabled till the end of request)" ["file"]=> string(7) "Unknown" ["line"]=> int(0) }
You can also find it in the error log: /var/log/plesk-php84-fpm/error.log
I recently set up a new server with Plesk Obsidian 18.0.71 Update 2 and installed my software under a new subscription running PHP 8.4 FPM. Dedicated and shared PHP FPM are affected. FastCGI is not affected.
I have set up a clean install of Plesk with a subscription showing the error which I can give Plesk staff access to.
The issue seems to happen since Plesk Obsidian 18.0.70
https://docs.plesk.com/release-notes/obsidian/change-log/#plesk-18070
I believe this is the specific change that has caused this problem:
"(Plesk for Linux) It is no longer possible to bypass the default PHP performance settings in PHP-FPM handlers using the .user.ini settings file or the PHP ini_set() command. The default PHP performance settings should be optimal for most websites, and changing the settings could impact the websites’ performance."
It looks like Plesk is creating two config files per domain and both set opcache.enable = 1 which seems to cause the issue.
For shared PHP FPM, the two files would be:
/var/www/vhosts/system/domain-name-example.com/etc/php.ini
opcache.enable = 1
/opt/plesk/php/8.4/etc/php-fpm.d/domain-name-example.com.conf
php_admin_value[opcache.enable] = 1
For dedicated, I think the FPM pool conf file is in a different location.
In previous versions of Plesk, we don't have the FPM conf file. This has only just started appearing recently especially for new subscriptions being set up.