Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'm trying to install APC on CentOS 5.8 with PHP 5.2.17. I ran the dependancies, which weren't needed, and then

pecl install apc

and after a whole bunch of stuff, got:

Build process completed successfully Installing '/usr/local/lib/php/extensions/no-debug-non-zts-20060613/' Installing '/usr/local/include/php/ext/apc/apc_serializer.h' install ok: channel:// Extension apc enabled in php.ini

But, I restarted apache, but APC doesn't show up in phpinfo

enter image description here

and there was no apc extension added to php.ini

Can I simply add to php.ini? And if so, where in the file itself?

share|improve this question
up vote 1 down vote accepted

In the same phpinfo page, search for php.ini or simple look for "Loaded Configuration File"

Then you can see a path. edit that file and add your extension.

It can be just anywhere in the file itself. I suggest looking for Extension comments in php.ini file and add your extension below them.

share|improve this answer
Thanks, this should work fine. But in my case, the problem was that the server was running suPHP, and APC isn't compatible with that. I had to isntall xcache. – markratledge May 17 '12 at 21:23

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.