• If you are still using CentOS 7.9, it's time to convert to Alma 8 with the free centos2alma tool by Plesk or Plesk Migrator. Please let us know your experiences or concerns in this thread:
    CentOS2Alma discussion

How to Install Zend_Opcache for PHP 5.4 for plesk Magneto store

steveb

New Pleskian
Hi all,

I'm a newbie to plesk so still getting used to the environment.

I'm trying to get zend-opcache correctly installed for PHP 5.4 in the Plesk 12.5 environment.

Magento CE 1.9.2.4 requires PHP 5.4 and has functonality for Zend Opcache. It looks like Opcache is included with Plesk 12.5 for PHP 5.6 and higher - but not the earlier versions which use Xcache.

Any ideas on best practices i should follow to install this so it works with PHP 5.4?

I confirmed that opcache-7.0.5 (the latest release) works with PHP 5.4 via the PECL site, and seeing this was already in the yumdb library on my server, my thought was to simply copy the following files

from...

/opt/plesk/php/5.6/etc/php.d/10-opcache.ini
/opt/plesk/php/5.6/lib64/php/modules/opcache.so

to ...

/opt/plesk/php/5.4/etc/php.d/10-opcache.ini
/opt/plesk/php/5.4/lib64/php/modules/opcache.so

and then edited the 10-opcache.ini file so it was fully enabled.

I then restarted the server (pretty drastic, but want to make sure things go reloaded) to see if things came up correctly.

The phpinfo() file indicates 10-opcache.ini is getting loaded, but none of the settings are taking as i don't think the opcache module is starting or getting installed or ???? The module settings are not showing in the bottom portion of the phpinfo() file like Xcache was - which i disabled.

Any thoughts on how to proceed are appreciated....
 
Hi steveb,
you should use something like...


Code:
/opt/plesk/php/5.4/bin/pecl install zendopcache

Regards

Lloyd
 
Last edited:
Thanks for the replies. Solved the problem.

As I'm using CENTOS, I used...

/opt/plesk/php/5.4/bin/pecl install zendopcache

and placed the module specific .ini file here

/opt/plesk/php/5.4/etc/php.d/opcache.ini

Also, thanks for the suggestion re. using php 5.6 for Magento, I'm using CE 1.9.2.4. so will give it a try.

Thanks again!
 
Back
Top