Try this:
APC 3.0.10 on OS X (intel)
1) download/expand PHP 5.1.2
2) cd into php-5.1.2/sapi
3) download and expand lhttp://www.litespeedtech.com/lsapi/litespeed-1.9.tgz into the "sapi" folder of php source.
4) in php source directory, do
Code:
touch ac*
./buildconf --force
5) Configure/Compile php
Code:
'./configure' '--prefix=/xingwww/php5' '--with-litespeed' '--with-config-file-path=../conf'
make
make install
6) Replace the lsphp binary (backup first) in /lswsinstall/fcgi-bin/lsphp with
/xingwww/php5/sapi/litespeed/php.
7) Download/Expand APC from http://pecl.php.net/package/APC . In APC source dir do:
Code:
/xingwww/php5/bin/phize
./configure --enable-apc--mmap --with-php-config=/xingwww/php5/bin/php-config
make
make install
Using --enable-apc --enable-apc-shm will give errors on os x.
8) Configure /lswsinstall/conf/php.ini
Code:
extension=apc.so
include_path = ".:/xingwww/php5"
;extension_dir = ./
Setting above size=4 (4MB) gives errors right now. Also make sure that extension_dir is commented out.
9) Critical for OS X. By default, OS X kernel does not allow shared memory segments over 4MB. So right now, apc.so wil fail to load with some "can't load null" error.
edit or make /etc/sysctl.conf if doesn't exist already with following values:
Code:
kern.sysv.shmmax=134217728
kern.sysv.shmmin=1
kern.sysv.shmmni=32
kern.sysv.shmseg=8
kern.sysv.shmall=32768
10) Reboot to get the kernel sysctl values updated and enjoy APC on OS X with LiteSpeed PHP LSAPI. =)
That's it.