{"id":526,"date":"2021-07-05T09:30:21","date_gmt":"2021-07-05T09:30:21","guid":{"rendered":"https:\/\/ownwebservers.com\/kb\/?p=526"},"modified":"2021-07-05T09:51:54","modified_gmt":"2021-07-05T09:51:54","slug":"installing-alternative-php-cache-apc-on-server","status":"publish","type":"post","link":"https:\/\/ownwebservers.com\/kb\/installing-alternative-php-cache-apc-on-server\/","title":{"rendered":"Installing Alternative PHP Cache (APC) on Server"},"content":{"rendered":"<h2>Let&#8217;s see how to installing APC on your <a title=\"Virtual Private Server\" href=\"https:\/\/ownwebservers.com\/vps-cloud-server\/\"><strong>Virtual Private Server<\/strong><\/a><\/h2>\n<p>The\u00a0<strong>APC-Alternative PHP Cache<\/strong> is a free, open, and robust framework which is responsible for caching and optimization of the PHP.<\/p>\n<h2><em><strong>Following are steps to Install APC on your web server<\/strong><\/em><\/h2>\n<p><strong>Step 1<\/strong>\u00a0\u2013 You must be logged in as root to proceed with installing APC on your server<\/p>\n<p><strong>Step 2<\/strong>\u00a0\u2013 You must then download the APC<\/p>\n<blockquote><p>wget http:\/\/pecl.php.net\/package\/APC<\/p><\/blockquote>\n<p>eg :\u00a0wget http:\/\/pecl.php.net\/get\/APC-3.0.15.tgz<\/p>\n<p><strong>Step 3<\/strong>\u00a0\u2013 Having done that, you are then required to extract it over your\u00a0<a title=\"web hosting UK\" href=\"https:\/\/ownwebservers.com\/\">Web Hosting UK<\/a>\u00a0server:<\/p>\n<blockquote><p>tar -xzf APC-3.0.15.tgz<\/p>\n<p>cd APC*<\/p><\/blockquote>\n<p><strong>Step 4<\/strong>\u00a0\u2013 Look for the PHP location by running the below command :<\/p>\n<blockquote><p>which php<\/p><\/blockquote>\n<p>You must remember the location displayed in the result.<\/p>\n<p><strong>Step 5<\/strong>\u00a0\u2013 Now you need to proceed with creating the configuration files using the below command :<\/p>\n<blockquote><p>phpize<\/p><\/blockquote>\n<p><strong>Step 6<\/strong>\u00a0\u2013 Now the APC need to be compiled over the server :<\/p>\n<blockquote><p>.\/configure \u2013enable-apc \u2013enable-apc-mmap \u2013with-apxs \u2013with-php-config=\/usr\/local\/bin\/php-config<br \/>\nmake<br \/>\nmake install<\/p><\/blockquote>\n<p><strong>Note :<\/strong>\u00a0You must install the APC in the php.ini file<\/p>\n<p><strong>Step 7<\/strong>\u00a0\u2013 Run the below command to find the php.ini over the server :<\/p>\n<blockquote><p>php -i | grep php.ini<\/p><\/blockquote>\n<p><strong>Step 8<\/strong>\u00a0\u2013 Amend php.ini by adding APC extension, as stated below :<\/p>\n<blockquote><p>vi \/usr\/local\/Zend\/etc\/php.ini<\/p><\/blockquote>\n<p><strong>Step 9 \u2013 <\/strong>Add the following to the php.ini file :<\/p>\n<blockquote><p>apc.shm_segments=1<br \/>\napc.optimization=0<br \/>\napc.shm_size=128<br \/>\napc.ttl=7200<br \/>\napc.user_ttl=7200<br \/>\napc.num_files_hint=1024<br \/>\napc.mmap_file_mask=\/tmp\/apc.XXXXXX<br \/>\napc.enable_cli=1<\/p><\/blockquote>\n<p><strong>Step 10 \u2013 <\/strong>Finally, you must restart Apache using the below command :<\/p>\n<blockquote><p>service httpd restart<\/p><\/blockquote>\n<p>If you need any help regrading these , please feel free to contact our technical support department via. 24\u00d77 Live Chat or raise a ticket through our helpdesk.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Let&#8217;s see how to installing APC on your Virtual Private Server The\u00a0APC-Alternative PHP Cache is a free, open, and robust framework which is responsible for caching and optimization of the PHP. Following are steps to Install APC on your web server Step 1\u00a0\u2013 You must be logged in as root to proceed with installing APC [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[24],"tags":[],"class_list":["post-526","post","type-post","status-publish","format-standard","hentry","category-web-hosting"],"_links":{"self":[{"href":"https:\/\/ownwebservers.com\/kb\/wp-json\/wp\/v2\/posts\/526","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/ownwebservers.com\/kb\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/ownwebservers.com\/kb\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/ownwebservers.com\/kb\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/ownwebservers.com\/kb\/wp-json\/wp\/v2\/comments?post=526"}],"version-history":[{"count":5,"href":"https:\/\/ownwebservers.com\/kb\/wp-json\/wp\/v2\/posts\/526\/revisions"}],"predecessor-version":[{"id":531,"href":"https:\/\/ownwebservers.com\/kb\/wp-json\/wp\/v2\/posts\/526\/revisions\/531"}],"wp:attachment":[{"href":"https:\/\/ownwebservers.com\/kb\/wp-json\/wp\/v2\/media?parent=526"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/ownwebservers.com\/kb\/wp-json\/wp\/v2\/categories?post=526"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/ownwebservers.com\/kb\/wp-json\/wp\/v2\/tags?post=526"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}