2

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?

markratledge
  • 519
  • 5
  • 13
  • 26

1 Answers1

1

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.

xperator
  • 457
  • 2
  • 12
  • 24
  • 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