Multiple versions of PHP on VPS - How do I set it up?

CBG

Active Member
Apr 23, 2010
39
2
58
cPanel Access Level
Root Administrator
Hi,

I have a cPanel/WHM VPS which currently has PHP 5.3.x installed.
I would like to add PHP 5.4.x and PHP 5.5.x, that can be enabled via .htacess on a per folder setup.

Can anyone give me a guide on how to install PHP 5.4.x and PHP 5.5.x along side PHP 5.3.x.

The default would be PHP 5.3.x

Can someone give me a guide, as I would like to do it myself, but never done it before and would like to know how to update it etc...


I have the following installed on PHP at this time:

Code:
Configure Command
'./configure' '--disable-fileinfo' '--enable-bcmath' '--enable-calendar' '--enable-ftp' '--enable-gd-native-ttf' '--enable-libxml' '--enable-magic-quotes' '--enable-mbstring' '--enable-pdo=shared' '--enable-soap' '--enable-sockets' '--enable-zip' '--prefix=/usr' '--with-curl=/opt/curlssl/' '--with-freetype-dir=/usr' '--with-gd' '--with-gettext' '--with-imap=/opt/php_with_imap_client/' '--with-imap-ssl=/usr' '--with-jpeg-dir=/usr' '--with-kerberos' '--with-libdir=lib64' '--with-libexpat-dir=/usr' '--with-libxml-dir=/opt/xml2' '--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-pcre-regex=/opt/pcre' '--with-pdo-mysql=shared' '--with-pdo-sqlite=shared' '--with-pic' '--with-png-dir=/usr' '--with-pspell' '--with-sqlite=shared' '--with-tidy=/opt/tidy/' '--with-xmlrpc' '--with-xpm-dir=/usr' '--with-zlib' '--with-zlib-dir=/usr'
The phpinfo has the following Configuration headers:

Code:
bcmath
calendar
cgi-fcgi
Core
ctype
curl - With SSL
date
dom
ereg
filter
ftp
gd
gettext
hash
iconv
imap
json
libxml
mbstring
mcrypt
mysql
mysqli
openssl
pcre
PDO
pdo_mysql
pdo_sqlite
Phar
posix
pspell
Reflection
session
SimpleXML
soap
sockets
SourceGuardian
SPL
SQLite
sqlite3
standard
suhosin
tidy
tokenizer
xml
xmlreader
xmlrpc
xmlwriter
Zend Guard Loaders
zip
zlib
ionCube Loader
 

000

Well-Known Member
Jun 3, 2008
549
30
78
I ended up using NT PHP Selector by Nixtree
And how to we can install Extensions as
MySQLI
FileInfo
PgSQL
Etc...

NixTree no setup PHP with this libraries PHP.

How is possible have this in the others versions of PHP ?
 

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,880
2,268
463
How is possible have this in the others versions of PHP ?
Have you consulted with the developers of that software application to see if there are any special requirements for enabling PHP modules?

Thank you.