Forum Moderators: coopster

Message Too Old, No Replies

eAccelerator Not Loading. Not compiling Correctly?

         

danchristopher

5:12 pm on Apr 12, 2010 (gmt 0)

10+ Year Member



I am using Freebsd 6.1 and PHP 5.2.9, and I am having a heck of a time getting eAccelerator to load on my server! I hope this is the right section to post this, I'm not sure if there is a better server-configuration for this post to live in.

Anyways, I've been through the regular compile-from-source tutorial a few times now and it doesn't seem to be working. When I run php -v I get this:

PHP Startup: Unable to load dynamic library './php/extensions/no-debug-zts-20060613/eaccelerator.so' - Cannot open "./php/extensions/no-debug-zts-20060613/eaccelerator.so" in Unknown on line 0
PHP 5.2.9 (cli) (built: Apr 22 2009 13:36:10)
Copyright (c) 1997-2009 The PHP Group
Zend Engine v2.2.0, Copyright (c) 1998-2009 Zend Technologies


I ran "make test" in the installation directory and get a similar warning:


Build complete.
Don't forget to run 'make test'.

PHP Warning: PHP Startup: Unable to load dynamic library './php/extensions/no-debug-zts-20060613/eaccelerator.so' - Cannot open "./php/extensions/no-debug-zts-20060613/eaccelerator.so" in Unknown on line 0
bogus test name tests/



Here is my php.ini eAccelerator configuration, pasted at the end of the .ini file:

extension="php/extensions/no-debug-zts-20060613/eaccelerator.so"
eaccelerator.shm_size="32"
eaccelerator.cache_dir="/var/cache/eaccelerator"
eaccelerator.enable="1"
eaccelerator.optimizer="1"
eaccelerator.check_mtime="1"
eaccelerator.debug="0"
eaccelerator.filter=""
eaccelerator.shm_max="0"
eaccelerator.shm_ttl="3600"
eaccelerator.shm_prune_period="0"
eaccelerator.shm_only="0"


I'm pretty that is the correct address for the file -- my php.ini lives in /usr/local/lib and the absolute path to the .so file is /usr/local/lib/php/extensions/no-debug-zts-20060613

.I really want to get this running on my server, I hope you can help! Thanks!
-Daniel

Frank_Rizzo

8:37 pm on Apr 12, 2010 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



in your php.ini file look for

extension_dir=

this is probably not tying up with the

extension="php/ ...

line you have there.

A quick fix would be to copy eacclerator.so into the extension_dir location.

And don't forget that each time you make a change in php.ini you have to restart apache.

danchristopher

12:30 am on Apr 13, 2010 (gmt 0)

10+ Year Member



Hey Frank, thanks for the reply. I copied that file into the extension_dir, and changed the .ini link appropriately. eAccelerator loaded and worked great for about 20 minutes! Now I'm getting the same error again:

PHP Warning: PHP Startup: Unable to load dynamic library './eaccelerator.so' - Cannot open "./eaccelerator.so" in Unknown on line 0
PHP 5.2.9 (cli) (built: Apr 22 2009 13:36:10)
Copyright (c) 1997-2009 The PHP Group
Zend Engine v2.2.0, Copyright (c) 1998-2009 Zend Technologies


I would expect it start up fine and work for 20 minutes again, but now I'm restarting apache and it wont load eAccelerator anymore. It's almost as if the file gets corrupted or something. Or maybe the cache just gets full? I cleared out the cache directory and it didn't seem to help.

danchristopher

12:39 am on Apr 13, 2010 (gmt 0)

10+ Year Member



I tried overwriting the eaccelerator file with a fresh copy and it worked again for a little while and then the same story: wont load eaccelerator.so.

This is so bizarre! Is it possible the file gets corrupted or something?