• Our team is looking to connect with folks who use email services provided by Plesk, or a premium service. If you'd like to be part of the discovery process and share your experiences, we invite you to complete this short screening survey. If your responses match the persona we are looking for, you'll receive a link to schedule a call at your convenience. We look forward to hearing from you!
  • We are looking for U.S.-based freelancer or agency working with SEO or WordPress for a quick 30-min interviews to gather feedback on XOVI, a successful German SEO tool we’re looking to launch in the U.S.
    If you qualify and participate, you’ll receive a $30 Amazon gift card as a thank-you. Please apply here. Thanks for helping shape a better SEO product for agencies!
  • The BIND DNS server has already been deprecated and removed from Plesk for Windows.
    If a Plesk for Windows server is still using BIND, the upgrade to Plesk Obsidian 18.0.70 will be unavailable until the administrator switches the DNS server to Microsoft DNS. We strongly recommend transitioning to Microsoft DNS within the next 6 weeks, before the Plesk 18.0.70 release.
  • The Horde component is removed from Plesk Installer. We recommend switching to another webmail software supported in Plesk.

Issue Cannot enable opcache

John S.

New Pleskian
I cannot enable opcache for PHP 5.5.38, phpinfo() shows

Zend OPcache
Opcode Caching Disabled
Optimization Disabled

I tried three options with no success:

1. Switching opchache On in Domain->PHP Settings
2. Adding PHP directives directly on the same PHP settings page:
Code:
opcache.enable=1
opcache.memory_consumption=128
opcache.max_accelerated_files=4000
opcache_revalidate_freq = 240

3. Adding the above directives into php ini files in

/opt/plesk/php/5.5/etc

or

/var/www/vhosts/system/mydomaincom/etc

The same result - opcacne is not enabled and shows as disabled in phpinfo().

Note. Enabling opcache works perfectly find for PHP 7. Why cannot I enable it for PHP 5.5?

What am I doing wrong?

Thanks
 
Last edited:
Check that in file /opt/plesk/php/5.5/etc/php.d/10-opcache.ini you have:

opcache.enable=1
 
Check that in file /opt/plesk/php/5.5/etc/php.d/10-opcache.ini you have:

opcache.enable=1
Thanks Igor! It is working now!!!

I still cannot enable any installed pecl extensions except for PHP 5.4.45, but it is a different story.
 
Check that in file /opt/plesk/php/5.5/etc/php.d/10-opcache.ini you have:

opcache.enable=1

Ah, thanks. We are setting up a new server (created Feb 2019) with a handful of PHP 5.5 sites. Apparently the default in that file is to have it off? I've not edited it. All other versions have it commented out:

# grep opcache.enable= /opt/plesk/php/*/etc/php.d/10-opcache.ini
/opt/plesk/php/5.5/etc/php.d/10-opcache.ini: opcache.enable=0
/opt/plesk/php/5.6/etc/php.d/10-opcache.ini:; opcache.enable=1
/opt/plesk/php/7.1/etc/php.d/10-opcache.ini:; opcache.enable=1
/opt/plesk/php/7.2/etc/php.d/10-opcache.ini:; opcache.enable=1
/opt/plesk/php/7.3/etc/php.d/10-opcache.ini:; opcache.enable=1

# ll /opt/plesk/php/*/etc/php.d/10-opcache.ini
-rw-r--r-- 1 root root 4567 Sep 1 2017 /opt/plesk/php/5.5/etc/php.d/10-opcache.ini
-rw-r--r-- 1 root root 4599 Jan 10 23:10 /opt/plesk/php/5.6/etc/php.d/10-opcache.ini
-rw-r--r-- 1 root root 4829 Mar 10 22:22 /opt/plesk/php/7.1/etc/php.d/10-opcache.ini
-rw-r--r-- 1 root root 4829 Mar 10 23:14 /opt/plesk/php/7.2/etc/php.d/10-opcache.ini
-rw-r--r-- 1 root root 4829 Mar 10 23:14 /opt/plesk/php/7.3/etc/php.d/10-opcache.ini

It looks like commenting out that "opcache.enable=0" line is sufficient to let opcache work in PHP 5.5, if the domain's PHP Settings have it set to On.
 
@SteveITS Perhaps "opcache.enable=0" is due to the fact that it appeared exactly from PHP version 5.5, where it was an as experimental feature not included by default.
In fact, it is a very bad idea to use such old and EOLed PHP versions for projects.
 
Back
Top