eAccelerator Installation Problem

tolisgr

Verified User
Joined
Jan 28, 2009
Messages
22
Hello,

I installed eaccelerator on my server with update.script,
then I added at php configuration file these lines (as mentioned at update.script):
Code:
zend_extension="/usr/local/lib/php/extensions/no-debug-non-zts-20060613/eaccelerator.so"
eaccelerator.shm_size="32"
eaccelerator.cache_dir="/tmp/eaccelerator"
eaccelerator.enable="1"
eaccelerator.optimizer="1"
eaccelerator.check_mtime="1"
eaccelerator.debug="0"
eaccelerator.filter=""
eaccelerator.shm_max="0"
eaccelerator.shm_ttl="0"
eaccelerator.shm_prune_period="0"
eaccelerator.shm_only="0"
eaccelerator.compress="1"
eaccelerator.compress_level="9"


When I check if it runs with methods mentioned here :
http://www.eaccelerator.net/wiki/TroubleShooting
nothings seems positive that eaccelerator works.
The php -v command in shell returns the following warning:

Code:
PHP Warning:  PHP Startup: Unable to load dynamic library './usr/local/lib/php/extensions/no-debug-non-zts-20060613/eaccelerator.so' - ./usr/local/lib/php/extensions/no-debug-non-zts-20060613/eaccelerator.so: cannot open shared object file: No such file or directory in Unknown on line 0
PHP 5.2.8 (cli) (built: Feb  1 2009 18:37:35)
Copyright (c) 1997-2008 The PHP Group
Zend Engine v2.2.0, Copyright (c) 1998-2008 Zend Technologies

I did not find any similar case or a solution.
Please help me to make eaccelerator work. Thank you for reading my post.
 
Is eaccelerator.so missing?

From your copy/paste, it should be in this directory:

Code:
/usr/local/lib/php/extensions/no-debug-non-zts-20060613

Also, did you recompile PHP at all? Try recompiling eaccelerator again.
 
Last edited:
Thank you for your reply,

eaccelerator.so does exist at
Code:
/usr/local/lib/php/extensions/no-debug-non-zts-20060613

I did not recompile php at all (I'm running suphp installed with custombuild) , and I'm not exactly sure how to do it.
I reinstalled eaccelerator with update.script but I get the same warning again.
 
You didn't mention suPHP ;)

AFAIK, eaccelerator (and memcache, etc.) do not work under suPHP.
 
Thank you for your reply,

eaccelerator.so does exist at
Code:
/usr/local/lib/php/extensions/no-debug-non-zts-20060613

I did not recompile php at all (I'm running suphp installed with custombuild) , and I'm not exactly sure how to do it.
I reinstalled eaccelerator with update.script but I get the same warning again.
locate eaccelerator.so
and use your full link to eaccelerator.so

Wael
 
:( is there any other software like eAccelerator I could use under suPHP?
 
I inserted at php configuration the following:
Code:
extension="/usr/local/lib/php/extensions/no-debug-non-zts-20060613/eaccelerator.so"
eaccelerator.shm_size="32"
eaccelerator.cache_dir="/tmp/eaccelerator"
eaccelerator.enable="1"
eaccelerator.optimizer="1"
eaccelerator.check_mtime="1"
eaccelerator.debug="0"
eaccelerator.filter=""
eaccelerator.shm_max="0"
eaccelerator.shm_ttl="0"
eaccelerator.shm_prune_period="0"
eaccelerator.shm_only="0"
eaccelerator.compress="1"
eaccelerator.compress_level="9"

Then I restarted httpd service and php-v returns now this:
Code:
PHP Warning:  PHP Startup: Unable to load dynamic library '/usr/local/php5/lib/php/extensions/no-debug-non-zts-20060613//usr/local/lib/php/extensions/no-debug-non-zts-20060613/eaccelerator.so' - /usr/local/php5/lib/php/extensions/no-debug-non-zts-20060613//usr/local/lib/php/extensions/no-debug-non-zts-20060613/eaccelerator.so: cannot open shared object file: No such file or directory in Unknown on line 0
PHP 5.2.8 (cli) (built: Feb  1 2009 18:37:35)
Copyright (c) 1997-2008 The PHP Group
Zend Engine v2.2.0, Copyright (c) 1998-2008 Zend Technologies

I can't understand why php reads wrong the path to eaccelerator.so!?
 
Last edited:
For an opcode optimizer and/or cacher to work, the PHP routines need to be persistent.
This can be achieved by using:
- mod_php instead of CGI (with or without suPHP or suexec, it doesn't matter)
or
- FastCGI (configured to run X php-cgi processes and keep them serving without respawning)
and
- an Apache2 threading MPM (like worker, not prefork)

If you are using suPHP, it means that you are using CGI without FastCGI. eAccellerator, XCache, APC, memcache... none of those will give you any real benefit.
It's like teaching your cat how to flush the toilet, then buying a new cat every time :) sorry, I can't come up with a better example. Must feed the cat.
 
Last edited:
The example with the cat explained everything :)
Thank you all for your replies
 
Back
Top