How to Enable Admin Script of APC on PHP

Share this Article :

On the previous post, i had shows how to enable APC with PHP on CentOS 6.3. This post will covers the steps to enable admin script of APC. The Alternative PHP Cache (APC) is a free, open, and robust framework for caching and optimizing PHP intermediate code. It’s an PECL extension which shares the packaging and distribution system with its sister, PEAR.

1. Create directory apc on document root :

[[email protected] ~]# mkdir /var/www/html/apc

2. Copy apc.php from php-pecl-apc folder to document root :

[[email protected] ~]# cp /usr/share/doc/php-pecl-apc-*/apc.php /var/www/html/apc

3. Create new file name apc.conf.php :

[[email protected] ~]# vi /var/www/html/apc/apc.conf.php
# set any username

# set any password


4. Create new file name apc.conf :

[[email protected] ~]# vi /etc/httpd/conf.d/apc.conf
<Directory /var/www/html/apc>
   Order Deny,Allow
   Deny from all
   Allow from
# IP address you allow


5. Restart Apache httpd :

[[email protected] ~]# /etc/rc.d/init.d/httpd restart
Stopping httpd:                                            [  OK  ]
Starting httpd:                                            [  OK  ]

6. Navigate the browser to http://servername/apc/apc.php and it will shown as below :

Leave a Reply