Help with 5.2.5 and eaccelerator

#1
Hello All,
I am trying to make the switch to LS and I keep running into problems after installing eaccelerator. I can successfully get PHP 5.2.5 working but after I add the folllowing to the php.ini file located at /lsws/php/ I get a 503 error

extension="eaccelerator.so"
eaccelerator.shm_size="64"
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="0"
eaccelerator.shm_prune_period="0"
eaccelerator.shm_only="0"
eaccelerator.compress="1"
eaccelerator.compress_level="9"
eaccelerator.allowed_admin_path="/home/paul/public_html/thefamilygarrison/public/control.php"

Can anyone help? I used the web interface to configure php with eaccel so my install dir should be default for lsws. I am new to this and a little confused as to what to try next?

Thanks so much
 

mistwang

LiteSpeed Staff
#2
My guess is that the eaccelerator extension is missing or does not match the PHP version for some reason, please follow our trouble shooting steps in our PHP tutorial in our wiki.
 
#3
Trouble shooting

If you LiteSpeed PHP setup give 503 errors, you may have PHP configuration problem, usually it is because the version of a loadable module does not match the PHP version used. You need to recompile the loadable module to fix it.

Some trouble shooting techniques:

*
check lsws/logs/stderr.log and lsws/logs/error.log.
*
try to start the lsphp binary with matching user id with command like

sudo -u nobody ./lsphp5 -i

*
compare the phpinfo() page to a working installation, sometimes, due to permission problem, php configuration files cannot be fully loaded.
*
strace/truss/ktrace a lsphp process, it shows all the system calls made by the process.


Is this what you are talking about?

How would it be a different version if I used the web interface to compile?
 
#4
Okay so I completely uninstalled and reinstalled. After setting up my virtual host (which worked with default php4 installed) I used the web interface to compile php5.2.5 and eaccelerator. Upon pulling up php.info I still saw php version 4 so I copied php.ini from /lsws/php/ to /lsws/lsphp5/lib and editing the api app definition command to lsphp-5.2.5 then the 5.2.5 version showed. Upon trying to browse my site I just get a completely blank page now?

Any ideas, thanks so much
 

mistwang

LiteSpeed Staff
#5
maybe the PHP 5 build does not have all required modules to run your PHP script, please check error.log and stderr.log.
Do a "strace" on the PHP process if still no clue.
 
#6
Okay I figured it out after about 12 hours of my brain hurting!

I will recount the steps that I took to install from scratch for others as I have a feeling it will be confusing for newbies like me.

1. install lsws
2. Follow installation directions from wiki (here)
2.5. using php.info note the version numbers and esp. the extension_dir!
3. Follow instructions for installing eaccelerator (by the way the latest version as of this post is 0.9.5.2) At the end of the process do NOT choose the zend extension to place in php.ini LINK
4. copy eaccelerator.so from the ea/modules dir to the extension dir noted above.

Obviously this part that was confusing me was the extension not being in the proper place. After a restart it all worked straight off!

Hope this saves someone else some time
 

mistwang

LiteSpeed Staff
#7
Thanks for the update.
The extension should have been installed into <your_php_prefix>/lib/php/extensions/no-debug-non-zts-20060613/
 
Top