Installing APC (Alternate PHP Cache) on cPanel (Obsolete)


Note: We are no longer running APC in most cases.

Requirements:

php running in FCGI mode.

WHM version 11.3x+ (due to pecl updates)

Optional and recommended:

php running in DSO

mod_ruid2 insatlled.

 

Installing APC on cPanel is fairly simple.

In WHM - Software - Module Installer Choose PECL

Search for APC and Install. You may need to restart httpd for this to take effect. Additionally, FGCI or DSO is needed for APC to function properly.  IF you use DSO - run mod_ruid2 as well.

In WHM - Service Configuration - Configure PHP and suExec. Select which option you want, either FCGI or DSO.

 

In php.ini (/usr/local/lib/php.ini) - add the following: - check to see if apc.php is already added.  If so, disregard the extension reference.

 

extension="apc.so"
apc.ttl=0
apc.stat=0
apc.shm_size=96M
apc.cache_by_default=0
apc.filters="+public_html"

 

Drop the attached apc.php file into your site root, and verify function.  You should see more than 1(hit) /1(miss)

Additionally, create a clearapc.php - with a passoword and set an hourly cron to run it.

 

 

Attached files: apc-phpcheck.zip

Last update:
2014-11-18 17:37
Author:
Admin
Revision:
1.5
Average rating:0 (0 Votes)

You cannot comment on this entry

Chuck Norris has counted to infinity. Twice.