APC on cpanel

This articles show How to install the PHP APC Extension on cpanel


The best way to install APC on cpanel server is from source because the pecl installation many times fails with compilation errors ..

What is PECL?


PECL is a repository for PHP Extensions, providing a directory of all known extensions and hosting facilities for downloading and development of PHP extensions.

Official website : http://pecl.php.net/

Download page : http://pecl.php.net/package/APC

1 )  SSH your server as root

cd /usr/src/

wget http://pecl.php.net/get/APC-3.1.3.tgz

tar zxvf APC-3.1.3.tgz

cd APC-3.1.3

locate php-config

It use to be in /usr/bin/php-config

php-config file is to add the existing php configuration with apc.

phpize

Next step is to compile APC with the following modules enabled

./configure –enable-apc –enable-apc-mmap –with-apxs –with-php-config=/usr/bin/php-config

make

make test

make install

Locate the php.ini file by

php -i | grep php.ini

Output :

Configuration File (php.ini) Path => /usr/local/lib
Loaded Configuration File => /usr/local/lib/php.ini

vi  /usr/local/lib/php.ini

and add this

extension=” apc.so”

Restart apache :

service httpd restart

Create an info.php page in any of your domain and make sure that you are able to see the apc module listing.

apc

Tags :  Installing APC with cpanel  ,  APC on cpanel ,  APC with cpanel