Skip to content

Instantly share code, notes, and snippets.

@zonia3000
Created June 29, 2017 07:53
Show Gist options
  • Save zonia3000/c2f234c9bcde8dcae5e445be0c8487ab to your computer and use it in GitHub Desktop.
Save zonia3000/c2f234c9bcde8dcae5e445be0c8487ab to your computer and use it in GitHub Desktop.
CentOS 7: install new Apache/httpd PHP module without removing older PHP installation.

I wanted to switch from PHP 5.4 to PHP 5.6 without remove the older version from the machine.

yum install http://rpms.remirepo.net/enterprise/remi-release-7.rpm
yum install yum-utils
yum-config-manager --enable remi-php56
yum update
yum install php56 php56-php

In /etc/httpd/conf.modules.d you now should have 2 different files for configuring PHP: 10-php56-php.conf 10-php.conf Rename the oldest and restart the server.

mv 10-php.conf 10-php.conf.no
service httpd restart
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment