PHP APC (Alternative PHP Cache) is a framework which speeds up PHP applications by storing the result of compiled PHP programs in the memory a.k.a. caching. The apc.php file is available in the APC package if downloaded as source from the APC page of the PECL website, but if you have installed it from the Linux repository by using the command yum install php-apc or apt-get install php-apc this file will not be available. I have extracted the apc.php file from the APC source downloaded from the PECL website and it is available for download here.
Download apc.php (12KB)
Extract this file and upload it to your document root, access it from your browser and you will see a page similar to the following.
To access the “System Cache Entries” and “User Cache Entries” a password has to be set, this will be used for doing a HTTP Basic Authentication just like using a htpasswd file. Edit the following lines in the apc.php file
defaults('ADMIN_USERNAME','apc'); defaults('ADMIN_PASSWORD','password');
Editing the first line is optional but only if the string “password” is changed to something else in the second line will authentication work. Authentication can also be disabled by editing the following line.
defaults('USE_AUTHENTICATION',1);
Change the 1 to 0 and authentication will be disabled but use this with caution as it could allow unauthorized access.
Leave a Reply