php on cpanel server

Discussion in 'PHP' started by anewday, Mar 16, 2008.

  1. anewday

    anewday Moderator

    My existing server with all my websites has cpanel 11, mysql 4,1, and php 4.4.7 installed. If I'm installing litespeed and PHP 5 LSAPI for the first time, can I use the existing php on the server or do I need to recompile? If the latter, will it conflict with the one already installed? I lost the link to the instructions on how to compile it via the GUI. Please advise. Thank you.
    Last edited: Mar 16, 2008
  2. mistwang

    mistwang LiteSpeed Staff

    You need to recompile, install it to a different directory, it will not conflict with existing installation. It is recommended to keep cPanel installation and LSAPI installation in sync.

    So, upgrade your cPanel installation to PHP5, then build Litespeed PHP with similar configuration parameters.
  3. mistwang

    mistwang LiteSpeed Staff

    The instruction for the GUI is in the wiki of compiling PHP and cPanel+LiteSpeed.
  4. anewday

    anewday Moderator

    Is it ok if I leave my Cpanel PHP at 4.4.7 and install LSAPHP 5 for Litespeed in a different directory? Thank you.
  5. mistwang

    mistwang LiteSpeed Staff

    You can do that, this two will not interfere with each other. However, you may have compatibility issue as some PHP script written for 4.4.7 which may not work that well under PHP 5, it has nothing to do with LiteSpeed.
    I think you should at least upgrade cPanel PHP to 4.4.8, and install LSAPI php 4.4.8 as well, after everything working properly, start to convert your site from PHP 4 to PHP 5 one by one. LiteSpeed can run both PHP 4 & 5 at the same time.
  6. anewday

    anewday Moderator

    Ok, below is a confusing on the wiki.

    You said I can just install Litespeed + LSAPI PHP and leave cPanel PHP alone. And mixing different version should be ok, right?
    Last edited: Mar 17, 2008
  7. mistwang

    mistwang LiteSpeed Staff

    Yes, it is OK. That statement is based on the assumption that you install cPanel PHP and LiteSpeed PHP to the same location.
  8. anewday

    anewday Moderator

    Ok, thanks a lot for the clarification. Great support here. :)
  9. anewday

    anewday Moderator

    Hi,

    Can you tell me which configure parameters won't work with build PHP 5.25 in the GUI?

    Code:
    '--prefix=/usr/local'
    '--with-xml'
    '--enable-bcmath'
    '--enable-calendar'
    '--with-curl'
    '--enable-exif'
    '--with-swf=/usr/local/flash'
    '--enable-ftp'
    '--with-gd'
    '--with-jpeg-dir=/usr/local'
    '--with-png-dir=/usr'
    '--with-xpm-dir=/usr/X11R6'
    '--with-gettext'
    '--enable-magic-quotes'
    '--with-mysqli'
    '--with-mysql=/usr'
    '--with-openssl'
    '--enable-discard-path'
    '--with-pear'
    '--enable-sockets'
    '--enable-track-vars'
    '--with-ttf'
    '--with-freetype-dir=/usr'
    '--enable-gd-native-ttf'
    '--enable-wddx'
    '--with-xmlrpc'
    '--with-zip'
    '--with-zlib'
    
    Also, why isn't --with-litespeed included in the default configure parameters? Also, how do I enable PHP 5 only for my websites? I see that PHP4 and PHP5 are installed by default. Thanks for your help.
    Last edited: Mar 20, 2008
  10. mistwang

    mistwang LiteSpeed Staff

    --with-litespeed will be added automatically by the GUI tool.
    If you want to install PHP to a different directory that cPanel does, you should remove '--prefix=/usr/local'.
    All the configuration parameter should work, if it does not, just build PHP in cPanel with similar configuration, cPanel will fix all dependencies.
  11. Lucas

    Lucas New Member

    But wouldn't that configure it for Apache and not litespeed?
  12. mistwang

    mistwang LiteSpeed Staff

    It is to let cPanel fix all dependencies, after running cPanel easyApache, you need to build lsphp from the web admin again.
  13. Lucas

    Lucas New Member

    Won't the dependencies be removed if not manually added to the web admin?

    I also don't understand why I had fixed the mysql on the php compilation on the admin and now it is asking for it again. I guess every time cpanel updates you need to do this?
    Last edited: May 1, 2008

Share This Page