Take the 2-minute tour ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

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/apc.so' Installing '/usr/local/include/php/ext/apc/apc_serializer.h' install ok: channel://pecl.php.net/APC-3.1.9 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 extension=apc.so to php.ini? And if so, where in the file itself?

share|improve this question

1 Answer 1

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. –  songdogtech May 17 '12 at 21:23

Your Answer

 
discard

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.