Install multiple versions of PHP 5

6 posts / 0 new
Last post
#1 Wed, 04/13/2011 - 12:57
dvb

Install multiple versions of PHP 5

Is there any posibility to run multiple versions of php 5?

I'm asking this because one of my clients require php 5.3, so I need 5.3 together with the regular php version (5.1 on CentOS). I must also enable the regular version since there are many scripts that are incompatible with php 5.3

I've already seen Choosing PHP versions - Posted 2010-10-08 20:36 by rrhode

If you're asking why it's important to add php 5.3, let's look on the following list of scripts that require php 5.3 as a minimum requirement (ordered by name) :

Doctrine 2.0
FuelPHP
ImpressPages
Lithium
Moodle 2.1
osCommerce 3
PeecFW
phpbb 4
Pimcore
RedBeanPHP 1.3.2
Symfony 2.0
X-Payments
Yii 2.0
Zen Cart 1.5
Zend Framework 2.0

Drupal 7 like many more scripts recommend php 5.3, and be sure that this list will get larger and larger in the near future, as more hosting companies will enable 5.3

Personally I see this as an opportunity for virtualmin to prove it's superiority over cPanel, that's also doesn't support 5.3 as of now.

Furthermore, according to php.net, php 5.2 reached not only EOL, but also EOS.

[22-Jul-2010] This release marks the end of the active support for PHP 5.2. Following this release the PHP 5.2 series will receive no further active bug maintenance. Security fixes for PHP 5.2 might be published on a case by cases basis. All users of PHP 5.2 are encouraged to upgrade to PHP 5.3. [16-Dec-2010] The PHP development team would like to announce the immediate availability of PHP 5.2.16. This release marks the end of support for PHP 5.2.

And of course, last but not least, php 5.3 introduce new features and better performance.

Wed, 04/13/2011 - 13:13
andreychek

Is there any posibility to run multiple versions of php 5?

Unfortunately not... not easily anyhow :-)

The problem is because all the PHP packages have their binaries are in the same locations.

When PHP4 was still in use, Virtualmin supported using PHP4 and PHP5 on the same server -- but that was because both PHP versions were designed to work side-by-side.

And even then, the setup was tricky enough to support that it was a Pro-only feature, it wasn't available in the free Virtualmin GPL.

If you're asking why it's important to add php 5.3

Well, no one's asking why PHP 5.3 is important... and Virtualmin supports using PHP 5.3 (which is available in the new CentOS 5.6 update). But, we aren't likely to see any kind of support for running PHP 5.x versions side-by-side.

Because of that, the best compromise I can offer is to use PHP 5.2 from the bleeding edge repository for the time being, and then migrate to PHP 5.3 once all the web apps you're using support it. Details on setting up the bleeding edge repo are here:

http://www.virtualmin.com/documentation/system/bleed

Wed, 04/13/2011 - 17:10
dvb

Thank you for your fast reply.

well, 5.2 doesn't help me here so I have no choice but to upgrade to php53, and that what I've done:

service httpd stop
yum remove php*
yum install php53*
service httpd start

It was fast and easy.

If any client will have problems I'll need to move him to another server

If there is ANY possible way to get more than one version of PHP 5, I would like to hear the procedure

Wed, 04/13/2011 - 17:18
andreychek

It's possible to do it, it just requires manually compiling and installing PHP, along with some changes to the Virtual Server after it's setup. That came up in this other thread here:

https://www.virtualmin.com/node/17809

Fri, 04/15/2011 - 15:01
Locutus

Interestingly enough, for Ubuntu 10.04 it's exactly the other way round - its default is PHP 5.3, and at some point I needed PHP 5.1 for a while in addition. :)

After quite some fiddling, I decided to set up a second virtual machine on my ESXi host for those few people who needed 5.1 back then. Right now, they have all moved to 5.3.

Thu, 05/25/2017 - 07:39
The BHA

I have an issue where I curenly have two versions of php and tghe 5 version is 5.6.25 when moodle from the install script wants the later 5.6.4 I can not find how to upgrade thus easily or in such a way I know I can access the earlier v4 side by side.

Topic locked