php on cpanel server

anewday

Well-Known Member
#1
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:

mistwang

LiteSpeed Staff
#2
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.
 

mistwang

LiteSpeed Staff
#5
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.
 

anewday

Well-Known Member
#6
Ok, below is a confusing on the wiki.

Just remember to upgrade both LiteSpeed PHP and Apache mod_php later together if you want to keep both LiteSpeed and Apache work properly. Mixing different version of PHP together may break you PHP installation.
You said I can just install Litespeed + LSAPI PHP and leave cPanel PHP alone. And mixing different version should be ok, right?
 
Last edited:

anewday

Well-Known Member
#9
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:

mistwang

LiteSpeed Staff
#10
--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
--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.
But wouldn't that configure it for Apache and not litespeed?
 
#13
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:
Top