Setting up APC w/ Custom Configs outside of H-Sphere

Setting up APC w/ Custom Configs outside of H-Sphere

To set up APC outside of H-Sphere is actually fairly simple to do, you just need to create the following file (ensuring that Zend and APC are turned off in H-Sphere CP under P.Servers):

/hsphere/local/config/httpd2/php5/php.d/apc.ini

and populate it with the below (at a minimum):

extension="apc.so"
apc.enabled=1


You can optionally change the default memory limit (32MB) to whatever you want by adding the following line:

apc.shm_size="memory-value-here-in-megabytes"

Then reload Apache for the changes to take effect:

service httpd reload

You will also need to chattr the file immutable so H-Sphere doesn't touch it:

chattr +i apc.ini

Note: This *may* break other customizations done to the environment -- so, you'll have to be careful.