Running CentOS + Apache + PHP + MySQL
running yum list installed *php*
gives me this:
newrelic-php5-common.noarch 4.23.4.113-1 @newrelic
php.x86_64 5.3.3-46.el6_6 @updates
php-cli.x86_64 5.3.3-46.el6_6 @updates
php-common.x86_64 5.3.3-46.el6_6 @updates
php-devel.x86_64 5.3.3-46.el6_6 @updates
php-gd.x86_64 5.3.3-46.el6_6 @updates
php-mysql.x86_64 5.3.3-46.el6_6 @updates
php-pdo.x86_64 5.3.3-46.el6_6 @updates
php-pear.noarch 1:1.9.4-4.el6 @base
php-pecl-apcu.x86_64 4.0.4-1.el6 @epel
php-pecl-zendopcache.x86_64 7.0.3-1.el6 @epel
php54.x86_64 2.0-1.el6 @centos-sclo-rh
php54-php.x86_64 5.4.40-4.el6 @centos-sclo-rh
php54-php-cli.x86_64 5.4.40-4.el6 @centos-sclo-rh
php54-php-common.x86_64 5.4.40-4.el6 @centos-sclo-rh
php54-php-gd.x86_64 5.4.40-4.el6 @centos-sclo-rh
php54-php-mbstring.x86_64 5.4.40-4.el6 @centos-sclo-rh
php54-php-mysqlnd.x86_64 5.4.40-4.el6 @centos-sclo-rh
php54-php-pdo.x86_64 5.4.40-4.el6 @centos-sclo-rh
php54-php-process.x86_64 5.4.40-4.el6 @centos-sclo-rh
php54-php-xml.x86_64 5.4.40-4.el6 @centos-sclo-rh
php54-runtime.x86_64 2.0-1.el6 installed
running php -v
gives me this:
PHP 5.4.40 (cli) (built: Aug 30 2016 13:52:21)
running pecl install imagick
gives me this:
pecl/imagick requires PHP (version >= 5.4.0), installed version is 5.3.3
The context is that I'm running a php script through apache that uses Imagick; it worked until I upgraded PHP (from 5.3.3 to 5.4.4), where it tells me PHP Fatal error: Class 'Imagick' not found in blah/blah/blah
.
So, I would like to get rid of php 5.3.3, but would also like to understand the ridiculous mess of wiring of everything to everything else that's going on.
So, more precisely: What do I need to do to get imagick installed and used by apache + php 5.4.4?
bonus questions:
- I noticed the php 5.4 binaries (?) all have the prefix php54, yet the 5.3 versions are just 'php'. Am I supposed to delete the old 'php' version and then alias all the php54 stuff to just php?
- Is there some universal 'php' construct that declares the system wide "I'm the default php, use me"?
- Does
pear
andpecl
need to be reinstalled through php 5.4?