PHP5, eAccelerator configuration question.

Discussion in 'Install/Configuration' started by priceline, May 23, 2009.

  1. priceline

    priceline New Member

    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.
  2. priceline

    priceline New Member

    I compile PHP5, but still shows PHP4 in php.ini

    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)
    Last edited: May 23, 2009
  3. auser

    auser Super Moderator

    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.
    Last edited: May 23, 2009
  4. priceline

    priceline New Member

    It doesnt give what to do

    I think it is something to do with listener.. how do i specify litespeed to listen to port 80?
  5. auser

    auser Super Moderator

    what's your settings on Server-->External App now?

    Since you're in WHM/cPanel environment, the listener setting could be empty.
  6. priceline

    priceline New Member

    I have these two

    LSAPI App lsphp4 uds://tmp/lshttpd/lsphp4.sock View Edit Delete
    LSAPI App lsphp5 uds://tmp/lshttpd/lsphp5.sock View Edit Delete
  7. priceline

    priceline New Member

    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
  8. auser

    auser Super Moderator

    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
  9. priceline

    priceline New Member

    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?
    Last edited: May 23, 2009
  10. mistwang

    mistwang LiteSpeed Staff

    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.
  11. priceline

    priceline New Member

    I am not sure what I am doing..

    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.
    Last edited: May 24, 2009

Share This Page