Install APC on Mac OSX

First download [http://www.pcre.org/](http://www.pcre.org/) and install like following.<p /><div style="margin-left:40px;">$./configure

$make $sudo make install

After that download APC 3.1.6 from http://pecl.php.net/package/APC ( don't download 3.1.9. It can't be use on Mac ). Now, you can install.

$phpize $CFLAGS='-O3 -fno-common -arch i386 -arch x86_64 -g -Os' LDFLAGS='-O3 -arch i386 -arch x86_64' CXXFLAGS='-O3 -fno-common -arch i386 -arch x86_64 -g -Os' $./configure –disable-dependancy-tracking –disable-shared -enable-static $make
after that you will get apc.so in modules folder. You need to check your php extension folder from phpinfo(). And then copy apc.so to extension folder. My php extension folder is /usr/lib/php/extensions/no-debug-non-zts-20090626/. So, I did like following.

$sudo cp modules/apc.so /usr/lib/php/extensions/no-debug-non-zts-20090626/
now, open the php.ini and add

extension=apc.so
and then save it.

restart the apache

$sudo apachectl restart
Done all. Now, check your phpinfo().

comments powered byDisqus