{"id":3095,"date":"2013-06-01T09:34:02","date_gmt":"2013-06-01T09:34:02","guid":{"rendered":"http:\/\/blog.shineservers.com\/?p=187"},"modified":"2013-06-01T09:34:02","modified_gmt":"2013-06-01T09:34:02","slug":"how-to-install-php-apc-in-whmcpanel","status":"publish","type":"post","link":"https:\/\/www.shineservers.com\/2013\/06\/01\/how-to-install-php-apc-in-whmcpanel\/","title":{"rendered":"How to install PHP-APC in WHM\/cPanel"},"content":{"rendered":"<p>&nbsp;<\/p>\n<p>If you are trying to install APC are not able to using the WHM PECL installer then try this. APC needs to be installed from source so these instructions assume you have root access to the server using a client like putty.<\/p>\n<p>login to server as root and run the following commands:<\/p>\n<p>&nbsp;<\/p>\n<blockquote>\n<pre>cd ~ \nmkdir setups\ncd setups \nwget http:\/\/pecl.php.net\/get\/APC-3.1.5.tgz \ntar -xvf APC-3.1.5.tgz \ncd APC-3.1.5\nphpize\n.\/configure --enable-apc --enable-apc-mmap --with-apxs --with-php config=\/usr\/local\/bin\/php-config\nmake<\/pre>\n<\/blockquote>\n<p>&nbsp;<\/p>\n<pre>\nIf you face any kind of error like :- \n\n<\/pre>\n<pre>In file included from \/usr\/local\/src\/APC-3.1.5\/apc.c:38:\n\/usr\/include\/php\/ext\/pcre\/php_pcre.h:29:18: error: pcre.h: No such file or directory\nIn file included from \/usr\/local\/src\/APC-3.1.5\/apc.c:38:\n\/usr\/include\/php\/ext\/pcre\/php_pcre.h:45: error: expected '=', ',', ';', 'asm' or '__attribute__' before '*' token\n\/usr\/include\/php\/ext\/pcre\/php_pcre.h:46: error: expected '=', ',', ';', 'asm' or '__attribute__' before '*' token\n\/usr\/include\/php\/ext\/pcre\/php_pcre.h:52: error: expected specifier-qualifier-list before 'pcre'\n\/usr\/local\/src\/APC-3.1.5\/apc.c:362: error: expected specifier-qualifier-list before 'pcre'\n\/usr\/local\/src\/APC-3.1.5\/apc.c: In function 'apc_regex_compile_array':\n\/usr\/local\/src\/APC-3.1.5\/apc.c:419: error: 'apc_regex' has no member named 'preg'\n\/usr\/local\/src\/APC-3.1.5\/apc.c:419: error: 'apc_regex' has no member named 'preg'\n\/usr\/local\/src\/APC-3.1.5\/apc.c:420: error: 'apc_regex' has no member named 'nreg'\n\/usr\/local\/src\/APC-3.1.5\/apc.c:420: error: 'apc_regex' has no member named 'nreg'\n\/usr\/local\/src\/APC-3.1.5\/apc.c: In function 'apc_regex_match_array':\n\/usr\/local\/src\/APC-3.1.5\/apc.c:452: error: 'apc_regex' has no member named 'preg'\n\/usr\/local\/src\/APC-3.1.5\/apc.c:452: error: 'apc_regex' has no member named 'preg'\n\/usr\/local\/src\/APC-3.1.5\/apc.c:453: error: 'apc_regex' has no member named 'nreg'\n\/usr\/local\/src\/APC-3.1.5\/apc.c:453: error: 'apc_regex' has no member named 'nreg'\nmake: *** [apc.lo] Error 1\nThen you need to install pcre and make sure you do this from the \/ directory or it will not install.<\/pre>\n<div>\n<blockquote>\n<pre>yum install pcre-devel<\/pre>\n<\/blockquote>\n<\/div>\n<pre>Again do:<\/pre>\n<div>\n<blockquote>\n<pre>make<\/pre>\n<\/blockquote>\n<\/div>\n<pre>If no errors then do:<\/pre>\n<div>\n<blockquote>\n<pre>make install<\/pre>\n<\/blockquote>\n<\/div>\n<pre>update php.ini through WHM PHP Configuration Editor. Switch to Advanced and find Section:Core Directive:extension and add this to the end of the list:<\/pre>\n<div>\n<blockquote>\n<pre>, apc.so<\/pre>\n<\/blockquote>\n<\/div>\n<pre>Then restart apache and your done. the phpinfo function should show that APC is installed\n \nHope this helps someone.<\/pre>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>&nbsp; If you are trying to install APC are not able to using the WHM PECL installer then try this. APC needs to be installed from source so these instructions assume you have root access to the server using a client like putty. login to server as root and run the following commands: &nbsp; cd [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"inline_featured_image":false,"_jetpack_memberships_contains_paid_content":false,"footnotes":""},"categories":[58],"tags":[99],"class_list":["post-3095","post","type-post","status-publish","format-standard","hentry","category-cpanel-control-panel","tag-how-to-install-php-apc-in-whmcpanel"],"acf":[],"aioseo_notices":[],"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/www.shineservers.com\/wp-json\/wp\/v2\/posts\/3095","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.shineservers.com\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.shineservers.com\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.shineservers.com\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.shineservers.com\/wp-json\/wp\/v2\/comments?post=3095"}],"version-history":[{"count":0,"href":"https:\/\/www.shineservers.com\/wp-json\/wp\/v2\/posts\/3095\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.shineservers.com\/wp-json\/wp\/v2\/media?parent=3095"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.shineservers.com\/wp-json\/wp\/v2\/categories?post=3095"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.shineservers.com\/wp-json\/wp\/v2\/tags?post=3095"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}