{"id":42,"date":"2015-02-19T13:49:39","date_gmt":"2015-02-19T13:49:39","guid":{"rendered":"http:\/\/eliteservermanagement.com\/issues\/?p=42"},"modified":"2022-05-02T12:01:51","modified_gmt":"2022-05-02T12:01:51","slug":"how-to-install-zend-opcache-on-php-5-3-or-5-4","status":"publish","type":"post","link":"https:\/\/eliteservermanagement.com\/issues\/how-to-install-zend-opcache-on-php-5-3-or-5-4\/","title":{"rendered":"How to Install Zend OPCache on PHP 5.3 OR 5.4"},"content":{"rendered":"<h2>Installing Zend OPCache on PHP 5.3 or 5.4<\/h2>\n<p>1. Login to SSH on your server<\/p>\n<p>2. Type the following commands:<\/p>\n<p>cd \/usr\/local\/src<br \/>\nwget http:\/\/pecl.php.net\/get\/ZendOpcache<br \/>\n# to get the latest (master) build do the following instead:<br \/>\n# wget https:\/\/github.com\/zendtech\/ZendOptimizerPlus\/archive\/master.zip<br \/>\ntar xvfz ZendOpcache<br \/>\ncd zendopcache-7.x.x<br \/>\nphpize<br \/>\nwhereis php-config<br \/>\n# set the path below<br \/>\n.\/configure &#8211;with-php-config=\/usr\/local\/bin\/php-config<br \/>\nmake<br \/>\nmake install<\/p>\n<p>3. Wait for the installation to complete. At the end it will tell you the location it has placed the file opcache.so. Ensure you have this location to your clipboard.<\/p>\n<p>4. Type: nano \/usr\/local\/lib\/php.ini<\/p>\n<p>5. Scroll down until you find the listing extension_dir = &#8220;\/usr\/local\/lib\/php\/extensions\/no-debug-non-zts-XXXXXXXX&#8221;<\/p>\n<p>6. Paste this in on a new line (make sure you replace the INSTALL LOCATION with the correct location from step 3):<\/p>\n<p>zend_extension=\/INSTALL LOCATION\/opcache.so<br \/>\nopcache.enable=1<br \/>\nopcache.enable_cli=1<br \/>\nopcache.memory_consumption=128<br \/>\nopcache.interned_strings_buffer=8<br \/>\nopcache.max_accelerated_files=4000<br \/>\nopcache.revalidate_freq=60<br \/>\nopcache.fast_shutdown=1<br \/>\nIf xcache is installed, you should also comment all the xcache lines by putting a ; in front of them.<br \/>\n5. Press Ctrl O to save the file<\/p>\n<p>6. Press Ctrl X to exit<\/p>\n<p>7. Type: service httpd restart<\/p>\n<p>8. Type: php -v<\/p>\n<p>9. This should show you that Zend OPcache is enabled.<\/p>\n<p>PHP 5.4.3 (cli) (built: Jan 12 2014 20:27:27)&amp;nbsp;<br \/>\nCopyright (c) 1997-2013 The PHP Group<br \/>\nZend Engine v2.5.0, Copyright (c) 1998-2013 Zend Technologies<br \/>\n&amp;nbsp; &amp;nbsp; with Zend OPcache v7.0.3-dev, Copyright (c) 1999-2013, by Zend Technologies<\/p>\n<p>If it does not and gives an error about wrong version of the Zend API then you specified the incorrect PHP location in step 2. Go back to step 2 and when you type phpize, use the alternative location for php in your configure script.<\/p>\n<p>by-<\/p>\n<p><strong>eLite Server Management<\/strong><\/p>\n<p>We Specialize In <a href=\"https:\/\/eliteservermanagement.com\/cpanel-server-management-services\/\">cPanel Server Management Services<\/a><br \/>\nAffordable 24\/7 Technical Support Company<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Installing Zend OPCache on PHP 5.3 or 5.4 1. Login to SSH on your server 2. Type the following commands: cd \/usr\/local\/src wget http:\/\/pecl.php.net\/get\/ZendOpcache # to get the latest (master) build do the following instead: # wget https:\/\/github.com\/zendtech\/ZendOptimizerPlus\/archive\/master.zip tar xvfz ZendOpcache cd zendopcache-7.x.x phpize whereis php-config # set the path below .\/configure &#8211;with-php-config=\/usr\/local\/bin\/php-config make make [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":[],"categories":[12],"tags":[],"aioseo_notices":[],"jetpack_featured_media_url":"","_links":{"self":[{"href":"https:\/\/eliteservermanagement.com\/issues\/wp-json\/wp\/v2\/posts\/42"}],"collection":[{"href":"https:\/\/eliteservermanagement.com\/issues\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/eliteservermanagement.com\/issues\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/eliteservermanagement.com\/issues\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/eliteservermanagement.com\/issues\/wp-json\/wp\/v2\/comments?post=42"}],"version-history":[{"count":2,"href":"https:\/\/eliteservermanagement.com\/issues\/wp-json\/wp\/v2\/posts\/42\/revisions"}],"predecessor-version":[{"id":257,"href":"https:\/\/eliteservermanagement.com\/issues\/wp-json\/wp\/v2\/posts\/42\/revisions\/257"}],"wp:attachment":[{"href":"https:\/\/eliteservermanagement.com\/issues\/wp-json\/wp\/v2\/media?parent=42"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/eliteservermanagement.com\/issues\/wp-json\/wp\/v2\/categories?post=42"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/eliteservermanagement.com\/issues\/wp-json\/wp\/v2\/tags?post=42"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}