Cannot disable the opcache PHP extension

Created:

2017-02-15 10:15:50 UTC

Modified:

2017-08-19 03:09:07 UTC

0

Was this article helpful?


Have more questions?

Submit a request

Cannot disable the opcache PHP extension

Applicable to:

  • Plesk Onyx for Linux

Note: This article has the reference to the issue with the fix available:

  • #PPPM-5769 "Plesk administrator could not disable the “opcache” PHP extension."
    Fixed in:
Please consider updating your server:

Symptoms

It is impossible to disable the opcache PHP extension in Plesk

1. Go to the Tools & Settings > PHP-Settings

2. Choose any PHP version

3. Deselect opcache and press OK .

4. Go to the same PHP version again.

opcache stays selected.

Cause

This is Plesk bug with ID #PPPM-5769 which is planned to be fixed in future Plesk updates.

Resolution

1. Login to the Plesk server via SSH and get the list of 10-opcache.ini files with the following commands:

# cd /
# find ./* -name 10-opcache.ini

The listing example:

./opt/plesk/php/7.1/etc/php.d/10-opcache.ini
./opt/plesk/php/5.6/etc/php.d/10-opcache.ini
./opt/plesk/php/7.0/etc/php.d/10-opcache.ini

2. Open 10-opcache.ini file for the needed PHP version. As for example in case of PHP 7.0 edit the following file:

/opt/plesk/php/7.0/etc/php.d/10-opcache.ini

3. Comment the following string in the aforementioned file:

; zend_extension=opcache.so

After that, opcache.so PHP extension can be enabled or disabled in the Plesk GUI for the affected PHP version.

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