Installing and enabling APC Cache under Mac OS X 10.7.3 (default php)

Go To StackoverFlow.com

3

After switching to a new mac at work, I tried to install APC as I need it in some of my projects.

I tried using PECL installation, everything seemed fine, I enabled it in my php.ini.

After that, I tried to use a APC function but still where getting that APC was enabled, looking my phpinfo().

Then I decided to fetch the latest apc source and buil them myself.

Problem seems to be the same, APC is said enabled on my phpinfo, but is not in fact enabled (getting errors when calling apc functions on my code).

Does someone have an idea about this issue ?

Thanks,

Ludovic.

EDIT : It seems like it's working in CLI but not through apache...

Here is my apache config for APC :

; Enable APC
extension=apc.so
apc.enabled = 1
apc.enable_cli = 1
2012-04-04 17:59
by Kiryaka
What are the errors you are getting on the running code? Are you using something like MAMP or Zend Server - Daniel Ribeiro 2012-04-04 18:05


0

EDIT : It seems like it's working in CLI but not through apache...

It probably means that you have two different php.ini files. One for the CLI, and one for Apache.

Did you modify the one specified in phpinfo() ?

2012-04-04 18:04
by Pierre-Olivier
I strongly belived that Mac Os X was using only the php.ini inside /etc/php.ini ! In fact, phpinfo() indicates /usr/local/php5-20120203-085139/lib/php.ini. Thanks for your help, I was kinda becoming crazy with this one - Kiryaka 2012-04-04 18:08
Ads