How to Enable Admin Script of APC on PHP

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

Your email address will not be published. Required fields are marked *

A world leading hosting company that provides fully-managed innovative and secure solutions, suitable for hosting small to medium-sized websites

Built on the best available technologies combined with Google Cloud for strong redundancy and application availability. Backed by skilled experts to address web security threats, a devops team to create advanced custom security solutions, and 24/7 sysadmins to watch over the platform. This powerful, hands-on approach makes your sites faster, safer, and easier to manage. Starting from only $3.95/mo.


* up to 30 days money back guarantee