PHP eAccelerator with FCGId

PlayGod

Member
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. (not listed in the cache via control.php)

I've installed the eAccelerator plugin on a Wordpress 2.5 and a 2.3.3 site with the same results... not broken, but apparently not caching.

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 CentOS 5 2.6.18-53.1.13.el5
i686
 
Solved, had to compile eAccellerator from source because it does not support shared memory or sessions by default.

I'm running CentOS 5 / Red Hat EL 5 -- so the pathing below is for that system in default installation.

Download package to a temp folder.
wget the appropriate package from 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
 
Last edited:
Glad you got it fixed, and thanks for sharing the steps you took to resolve the problem!
 
Back
Top