PHP eAccelerator with FCGId

3 posts / 0 new
Last post
#1 Wed, 03/26/2008 - 09:44
PlayGod

PHP eAccelerator with FCGId

Hi,

I'm running eAccelerator on my server, and it's caching scripts for the virtual servers running PHP as apache under mod_php. However, for the sites/virtualservers running PHP as owner under FCGId, eAccelerator is not caching scripts.

I know it should work, I have seen several references to it being possible & optimal:

http://www.interworx.com/forums/showpost.php?p=8343&postcount=3

http://support.tigertech.net/fastcgi#3

Any advice on what I need to do to make it work.

Apparently if there is a version mismatch between the version of PHP eaccelerator was compiled for & the reported version, the scripts of fcgid enabled virtual servers will not be cached:

http://eaccelerator.net/ticket/252

versions: eAccelerator 0.9.5.2 [shm:mmap_anon sem:fcntl] PHP 5.1.6 [ZE 2.1.0] Using apache2handler on Linux vacantserver.net 2.6.18-53.1.13.el5 #1 SMP Tue Feb 12 13:01:45 EST 2008 i686

Fri, 03/28/2008 - 04:02
PlayGod

Partially solved: I found a Wordpress cache that utilizes eAccelerator instead of normal WP Cache. It seems to be working well.

http://neosmart.net/dl.php?id=13

Mon, 03/31/2008 - 20:10 (Reply to #2)
PlayGod

Solved, had to compile eAccellerator from source because it does not support shared memory or sessions by default.

Download package to a temp folder.
wget http://eaccelerator.net/wiki/Release-0.9.5.2

(note -- you must have gcc and php-devel installed to compile from source -- they are easy to find as RPMs)

(note -- PHP_PREFIX is the path to your shared /bin)

export PHP_PREFIX="/usr"
$PHP_PREFIX/bin/phpize
./configure -enable-eaccelerator=shared -with-php-config=$PHP_PREFIX/bin/php-config -with-eaccelerator-shared-memory -with-eaccelerator-sessions -with-eaccelerator-content-caching -with-eaccelerator-debug -with-libdir=/usr/lib/php/modules/ -exec-prefix=/usr
make
make install
make test
service httpd restart

Topic locked