Ok, here is what I did to install the Alternative PHP Cache (APC) on a Mac Mini Server running 10.6.4:
*First I installed X11 (not sure if this is necessary) and Xcode. This enables me to compile.*
*Then I installed PCRE because APC needs it to compile properly:*
Thanks go here for this part:
http://www.kevinworthington.com/nginx-mac-os-snow-leopard-2-minutes/
// ssh into your server as root
// Make a work directory on the root directory of your drive.
mkdir -p /SourceCache
// Go into that directory.
cd /SourceCache
// Download the new software.
curl -O
ftp://ftp.csx.cam.ac.uk/pub/software/programming/pcre/pcre-8.01.tar.gz
// Uncompress it.
tar xzf pcre-8.01.tar.gz
// Go into the new directory.
cd pcre-8.01
// Prepares for compiling?
./configure --prefix=/usr/local
make
make install
*Then I compiled APC:*
Thanks go to pterobyte for leading me in the right direction for this part.
// Go back to the work directory.
cd /SourceCache
// Download APC.
curl -O
http://pecl.php.net/get/APC-3.1.3p1.tgz
// Uncompress it.
tar xzf APC-3.1.3p1.tgz
// Go the the appropriate directory.
cd /SourceCache/APC-3.1.3p1/
// Make the files appropriate for PHP compiling (I think that's what this does).
phpizeConfiguring
// Compile it for a snow leopard server 64 bit intel system. This should be one line, no returns.
MACOSX
DEPLOYMENTTARGET=10.6 CFLAGS="-arch x86_64 -g -Os -pipe -no-cpp-precomp" CCFLAGS="-arch x86_64 -g -Os -pipe" CXXFLAGS="-arch x86_64 -g -Os -pipe" LDFLAGS="-arch x86_64 -bind
atload" ./configure
make
make install
// If everything worked properly add this line to your /etc/php.ini file.
extension=/usr/lib/php/extensions/no-debug-non-zts-20090626/apc.so
// restart apache.
sudo apachectl graceful
Then test a phpinfo.php file and search for APC. If it shows up it's working!
Please post if I missed or am misstating something.