Get your server issues fixed by our experts for a price starting at just 25 USD/Hour. Click here to register and open a ticket with us now!

Author Topic: Installing Alternative PHP Cache (APC) on Server  (Read 13103 times)

0 Members and 1 Guest are viewing this topic.


  • Guest
Installing Alternative PHP Cache (APC) on Server
« on: April 06, 2014, 07:03:02 pm »
Installing APC on your Virtual Private Server

The APC-Alternative PHP Cache is a free, open, and robust framework that is responsible for caching and optimization of PHP.

Steps to Install APC on your web server:

Step i – You must be logged in as root to proceed with installing APC on your server

Step ii – You must then download the APC

Code: [Select]
eg : wget

Step iii – Having done that, you are then required to extract it over your Web Hosting UK server:

Code: [Select]
   tar -xzf APC-3.0.15.tgz

    cd APC*

Step iv – Look for the PHP location by running the below command :

Code: [Select]
which php
You must remember the location displayed in the result.

Step v – Now you need to proceed with creating the configuration files using the below command :

Code: [Select]
Step vi – Now the APC need to be compiled over the server :

Code: [Select]
  ./configure –enable-apc –enable-apc-mmap –with-apxs –with-php-config=/usr/local/bin/php-config
    make install

Note : You must install the APC in the php.ini file

Step vii – Run the below command to find the php.ini over the server :

Code: [Select]
php -i | grep php.ini
Step viii – Amend php.ini by adding APC extension, as stated below :

Code: [Select]
vi /usr/local/Zend/etc/php.ini
Step ix – Add the following to the php.ini file :

Code: [Select]

Step x – Finally, you must restart Apache using the below command :

Code: [Select]
service httpd restart
Thank you,