Multiple PHP Versions?

Currently have Virtualmin running on CentOS Linux 6.6 with PHP Version 5.3.3 would like to have multiple php versions available is it possible to install PHP Version 5.2.x via Yum etc, if so how?

Lol, it’s the first result in Google ^^

https://www.virtualmin.com/documentation/web/multiplephp

Yeah I saw that, so I know its possible to run multiple versions, it was more about getting the older php 5.2.x installed and seen by vitualmin?

Actually further to this I have managed to get php5.2 installed (see below) however virtualmin is only seeing the original php 5.3.3 it’s not offering 5.2 as an option for vhosts, how do I get webmin/virtualmin to recognise?

/usr/local/php52/bin/php -v

PHP 5.2.17 (cli) (built: Dec 13 2014 11:26:20)
Copyright © 1997-2010 The PHP Group
Zend Engine v2.2.0, Copyright © 1998-2010 Zend Technologies

Mmm, I installed php 5.2.17 on my ubuntu server 14.04.

I compiled it, and I created a symlink to something like: ln -s /path/to/bin/php52 /opt/rh/php52/root/usr/bin/

I rechecked my config and that was it.

Howdy,

Yeah it’s trickier attempting to install PHP 5.2 on CentOS, as there aren’t existing packages for it the way there are for some of the newer PHP versions.

The way to do it is to manually install/compile it the way Arvi89 described.

-Eric

Thanks for this, the symlink has worked I can now select php 5.2 do have another issue now though which is that need to have additional modules and these won’t install see below do I need to add additional repos?

PHP module mysql is required …
Installing package php52-php-mysql …
Installing package(s) with command yum -y install php52-php-mysql …
Loaded plugins: fastestmirror
Setting up Install Process
Loading mirror speeds from cached hostfile

Howdy,

When you compiled/installed PHP 5.2, it should have built a number of modules along with that. It may just be a matter of making sure PHP is loading those modules.

In your config file for PHP 5.2, make sure it includes lines for loading all the PHP modules you wish to use, with lines such as “extension=mysql.so”.

-Eric