A lot of errors in php-fpm log: ERROR: Unable to set php_value 'opcache.enable'

Created:

2017-03-02 07:44:15 UTC

Modified:

2017-08-16 17:19:36 UTC

2

Was this article helpful?


Have more questions?

Submit a request

A lot of errors in php-fpm log: ERROR: Unable to set php_value 'opcache.enable'

Applicable to:

  • Plesk for Linux

There are a lot of entries like the following in /var/log/php-fpm/error.log file:

WARNING: [pool example.com] child 11485 said into stderr: "ERROR: Unable to set php_value'opcache.enable'"

WARNING: [pool example.com] child 26863 said into stderr: "NOTICE: PHP message: PHP Warning: Zend OPcache can't be temporary enabled (it may be only disabled till the end of request) in Unknown on line 0"

Cause

1. Duplicate PHP directives are defined in PHP settings that enable Opcache.

2. The setting opcache.enable can not be enabled at runtime through ini_set() , it can only be disabled. Trying to enable it in a script generates a warning.

Resolution

Remove the code that enables Opcache or the duplicate directive opcache.enable=1 in Plesk > Domains > example.com > Websites & Domains > PHP Settings > Additional directives

Instructions to properly enable Opcahe via Plesk can be found in KB article #115000935049 .

Have more questions? Submit a request
Please sign in to leave a comment.