Online Hibernate Training just in Rs. 1000

One week online training in Hibernate ORM framework. Learn Hibernate Framework and enhance your skills. Best Online Hibernate training at 90% discount. Join Now!! Offer is valid Only for limited Period!!! Online Training

How to Install Alternative PHP Cache (APC)?

In this tutorial you will learn How to Install Alternative PHP Cache (APC) on Linux computer?


How to Install Alternative PHP Cache (APC)? Learn how to install APC on Linux machine?

The Alternative PHP Cache (APC) can be used to increase the performance of your PHP applications. The APC is a free, open source cache system for PHP. The main aim of this project is to provide the robust and scalable framework of caching in PHP. It also provides the module for storing the application in cache.

In this tutorial I will explain you how you can download and install the Alternative PHP Cache framework on your PHP installation. You will learn how to enable this in PHP configuration file?

Alternative PHP Cache installation

There are two way to install the APC.

  • From Repository of PHP distribution
  • With the help of PECL

Here are the detailed description of both ways of installation.

From Repository of PHP distribution

On the Debian and Ubuntu APC can be downloaded from its main repository. You can check it through following command:

[email protected]:~# apt-cache search apc php
php-apc - APC (Alternative PHP Cache) module for PHP 5

You can install APC using the following command:

sudo aptitude install php-apc

If you are using the Red Hat Enterprise, Centos or Fedora you can use this command  to install the APC module:

sudo yum install php-pecl-apc

Installing With the help of PECL

Now we will learn how to install using the PECL. You can install APC using following command:

$ sudo apt-get install php-pear php5-dev apache2-threaded-dev build-essential
$ sudo pecl install apc

To configure the APC module you should add following line in php.ini file:

Now restart the apache server. Now you can use the following code in PHP file and test the APC module:


More PHP Tutorials


Share on Google+Share on Google+

How to Install Alternative PHP Cache (APC)?

Posted on: January 7, 2014 If you enjoyed this post then why not add us on Google+? Add us to your Circles



Discuss: How to Install Alternative PHP Cache (APC)?  

Post your Comment

Your Name (*) :
Your Email :
Subject (*):
Your Comment (*):
  Reload Image