PHP 5.4 as Software Collection
+
Par Remi le lundi 1 septembre 2014, 10:26 - HowTo - Lien permanent
RPM of PHP 5.4, are available in remi repository for Fedora 19, 20, 21 and Enterprise Linux 6, 7 (RHEL, CentOS, ...) in a fresh new Software Collection (php54) allowing its installation beside the system version.
As I strongly believe in SCL potential to provide a simple way to allow installation of various versions simultaneously, and as I think it is useful to offer this feature to allow developers to test their applications, especially to check compatibility with this old version, but very common on enterprise systems, and to allow sysadmin to prepare a migration or simply to use this version for some specific application, I decide to create this new SCL.
Installation :
yum --enablerepo=remi install php54
To be noticed:
- as the SCL is independant from the system, and doesn't alter it, this SCL is available in remi repository
- installation is under the /opt/remi tree
- the Apache module, php54-php, is available, but of course, only one mod_php can be used (so you have to disable or uninstall any other, the one provided by the default "php" package still have priority)
- the FPM service (php54-php-fpm) is available, it listens on default port 9000, so you have to change the configuration if you want to use various FPM services simultaneously.
- the php54 command give a simple access to this new version, however the scl command is still the recommended way.
- PECL extensions are also available.
- only x86_64, no plan for other arch.
- this collection is not compatible with RHSCL 1.1 (so you need to choose your provider and take all packages from the same place).
Also read other entries about SCL.
$ scl enable php54 'php -v'
PHP 5.4.32 (cli) (built: Aug 31 2014 20:02:48)
Copyright (c) 1997-2014 The PHP Group
Zend Engine v2.4.0, Copyright (c) 1998-2014 Zend Technologies
with Zend OPcache v7.0.3, Copyright (c) 1999-2014, by Zend Technologie
So Fedora 19/20 users are now able to simply run the 3 maintained versions of PHP simultaneously, 5.4, 5.5 (system) and 5.6 (SCL).
As always, your feedback is welcome, a SCL dedicated forum is open.
Commentaires
Starting with version 5.4.33, pure PHP system libraries are now available in the default include_path.
Also available for upcoming Fedora 22