Setting up PECL-APC on Lighttpd and Gentoo
Since I’m using Slicehost for my VPS hosting, and I’m cheap, I only have 256 megs of ram to work with. I run lighttpd, which then forces me to use php-cgi (via fastcgi) as the php executable. All of this is then running on Gentoo.
Anyway, what I’m getting to is how to setup PECL-APC (php accelerator / bytecode cache) on this platform.
Turns out all the scary messages in FAQs saying APC doesn’t work with CGI interfaces don’t apply to the fast-cgi implementation that Lighttpd uses.
emerge -uDv php5/pecl-apc
And then you’re done.
Hopefully my rambling was enough to get you going. To tweak, go check out /etc/php/php5-cgi/ext/apc.ini
Also, to verify this whole thing, you need a phpinfo() page… like:
<?php phpinfo(); ?>
Leave a Reply