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 :

[root@centos63 ~]# mkdir /var/www/html/apc

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

[root@centos63 ~]# cp /usr/share/doc/php-pecl-apc-*/apc.php /var/www/html/apc

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

[root@centos63 ~]# vi /var/www/html/apc/apc.conf.php
# set any username

# set any password


4. Create new file name apc.conf :

[root@centos63 ~]# 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 :

[root@centos63 ~]# /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