View Full Version : PHP5, eAccelerator configuration question.
priceline
05-23-2009, 08:19 AM
I am currently using PHP5, apache latest version.
Just installed litespeed standard edition, which is using PHP4.
Can you provide details on how I can configure?
1. Use PHP5 instead of PHP4
2. Configure my sites to use Litespeeed (disable apache)
3. Configure eAccelerator
I gone through some documentation, but all these are to download the latest php and configure. I already have one installed, so looking for instructions to use php5. Same as with eAccelerator (it is already configured for apache).
I want to see the performance differences before completely switching to litespeed. I took the performance measurements via apache's ab tool, so I will compare it to litespeed.
Thanks,
Edit: I installed WHM plugin also if it makes any difference.
priceline
05-23-2009, 08:50 AM
I went through Actions-->Compile PHP-->Build PHP5-->Checked eAccelerator-->Build PHP5
but when i go to phpinfo.php, it still shows as php4.4.9
Edit: okay after i restarted the server, it picked up latest version.
edit2: I switched to litespeed on WHM, but the page is not displaying.. any additional settings needed?
I followed the instructions at:
http://bobcares.com/index.php/blog/?p=114 (section 3)
auser
05-23-2009, 10:32 AM
I went through Actions-->Compile PHP-->Build PHP5-->Checked eAccelerator-->Build PHP5
but when i go to phpinfo.php, it still shows as php4.4.9
check your "Script Handler" setting:
http://www.litespeedtech.com/docs/webserver/config/scripthandler/
to configure lsphp5 to handle .php/.php5, lsphp4 to handle .php4 etc.
priceline
05-23-2009, 11:14 AM
I think it is something to do with listener.. how do i specify litespeed to listen to port 80?
auser
05-23-2009, 11:30 AM
what's your settings on Server-->External App now?
Since you're in WHM/cPanel environment, the listener setting could be empty.
priceline
05-23-2009, 11:34 AM
LSAPI App lsphp4 uds://tmp/lshttpd/lsphp4.sock View Edit Delete
LSAPI App lsphp5 uds://tmp/lshttpd/lsphp5.sock View Edit Delete
priceline
05-23-2009, 11:36 AM
When i click on Build matching PHP, I have this message:
Apache php configuration has more options that are not available or different in lsphp:
--disable-pdo --enable-bcmath --enable-calendar --enable-ftp --enable-gd-native-ttf --enable-libxml --enable-zip --prefix=/usr/local --with-curl=/opt/curlssl/ --with-freetype-dir=/usr --with-gettext --with-imap=/opt/php_with_imap_client/ --with-imap-ssl=/usr --with-jpeg-dir=/usr --with-kerberos --with-libxml-dir=/opt/xml2/ --with-mcrypt=/opt/libmcrypt/ --with-mysql=/usr --with-mysql-sock=/var/lib/mysql/mysql.sock --with-mysqli=/usr/bin/mysql_config --with-openssl=/usr --with-openssl-dir=/usr --with-png-dir=/usr --with-ttf --with-xpm-dir=/usr --with-zlib-dir=/usr
auser
05-23-2009, 11:47 AM
LSAPI App lsphp4 uds://tmp/lshttpd/lsphp4.sock View Edit Delete
LSAPI App lsphp5 uds://tmp/lshttpd/lsphp5.sock View Edit Delete
the setting is ok. so go ahead to set "Script Handler" as mentioned before, will resolve one of the problems:"when go to phpinfo.php, it still shows as php4.4.9", it will show php 5.x.x
priceline
05-23-2009, 11:59 AM
the setting is ok. so go ahead to set "Script Handler" as mentioned before, will resolve one of the problems:"when go to phpinfo.php, it still shows as php4.4.9", it will show php 5.x.x
It is showing php5.x.x after i restarted the server., but the following configuration settings are suspicious:
Server API LiteSpeed
Virtual Directory Support disabled
Configuration File (php.ini) Path /usr/local/lsws/lsphp5/lib
Loaded Configuration File (none)
Scan this dir for additional .ini files (none)
additional .ini files parsed (none)
These are the settings for script handler:
php5 LiteSpeed API [Server Level]: lsphp5 Edit Delete
php4 LiteSpeed API [Server Level]: lsphp4 Edit Delete
php LiteSpeed API [Server Level]: lsphp5 Edit Delete
Or can you help in Yahoo/hotmail IM?
mistwang
05-23-2009, 03:22 PM
You can copy your current php.ini to /usr/local/lsws/lsphp5/lib.
Or, you can rebuild PHP5 by setting "Install Path Prefix" to "/usr/local", assuming apache php uses php.ini under /usr/local/lib/ directory.
priceline
05-23-2009, 04:07 PM
I copied the correct file, still doesn't work. After changing these, what should be the port now for litespeed?
I dont see any proper step by step documentation.. Read through various documentation, now get to the point that I dont know what I am doing..
I am probably giving up.. unless someone point me to the right direction..
Edit:
Not sure what I did, but seems to be responding now.. But my drupal site is not working, complaining that jQuery is undefined.. when i switch to Apache, site work fine.
Edit2: when i disable CSS and Javascript compression, it work randomly.. but not consistent.