PHP 7 conflicts with PHP5

6 posts / 0 new
Last post
#1 Mon, 01/25/2016 - 07:37
simber

PHP 7 conflicts with PHP5

Trying to install PHP 7 now that it's available;

(on centos 7)

added repo's:

rpm -Uvh https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm
rpm -Uvh https://mirror.webtatic.com/yum/el7/webtatic-release.rpm

Then installed via:

yum install php70w php70w-opcache

Output is:

[root@host]# yum install php70w php70w-opcache
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
* base: mirrors.advancedhosters.com
* epel: mirror.symnds.com
* extras: mirror.netdepot.com
* updates: mirrors.rit.edu
* webtatic: us-east.repo.webtatic.com
Resolving Dependencies
--> Running transaction check
---> Package php70w.x86_64 0:7.0.2-1.w7 will be installed
--> Processing Dependency: php70w-common(x86-64) = 7.0.2-1.w7 for package: php70w-7.0.2-1.w7.x86_64
--> Processing Dependency: php70w-cli(x86-64) = 7.0.2-1.w7 for package: php70w-7.0.2-1.w7.x86_64
--> Processing Dependency: php70w-cli = 7.0.2-1.w7 for package: php70w-7.0.2-1.w7.x86_64
---> Package php70w-opcache.x86_64 0:7.0.2-1.w7 will be installed
--> Running transaction check
---> Package php70w-cli.x86_64 0:7.0.2-1.w7 will be installed
---> Package php70w-common.x86_64 0:7.0.2-1.w7 will be installed
--> Processing Conflict: php70w-common-7.0.2-1.w7.x86_64 conflicts php-common < 5.5.0
--> Finished Dependency Resolution
Error: php70w-common conflicts with php-common-5.4.16-36.el7_1.x86_64
You could try using --skip-broken to work around the problem
You could try running: rpm -Va --nofiles --nodigest

So the problem is : Error: php70w-common conflicts with php-common-5.4.16-36.el7_1.x86_64

How to fix this? I need both versions running simultaneously.

Mon, 01/25/2016 - 12:02
cruiskeen

You need to install an RPM of PHP 7 that is designed to co-exist with other PHP versions --- about the only one I know of that I could recommend that should work for you is the one from the Remi repo http://rpms.famillecollet.com/

I've got that successfully running on CentOS 7 along with 5.5 and 5.6

Tue, 01/26/2016 - 03:29
cognosco

I agree with above.

I used Remi repo and PHP7 seems to work perfect. This is what I did (if someone sees something bad, just say because I am not an 100% sure if it is perfect, but here it works).

yum install scl-utils
yum install https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm
yum install http://rpms.remirepo.net/enterprise/remi-release-7.rpm
yum install php70
yum install php70-php-mysqlnd
yum install php70-php-curl
yum install php70-php-simplexml
yum install php70-php-devel php70-php-gd php70-php-json php70-php-mcrypt php70-php-mbstring php70-php-opcache php70-php-pear php70-php-pecl-apcu php70-php-pecl-geoip php70-php-pecl-imagick php70-php-pecl-json-post php70-php-pecl-memcache php70-php-pecl-xmldiff php70-php-pecl-zip php70-php-pspell php70-php-soap php70-php-tidy php70-php-xml php70-php-xmlrpc

With this you have PHP7 and all important extensions running next to the other PHP versions!
If anyone sees room for improvement, then I am very interested. Would be good information on this topic.

Wed, 03/06/2019 - 20:06
Alan cladistan

yum -y install mod_php70u php70u-cli php70u-mysqlnd php70u-devel php70u-gd php70u-mcrypt php70u-mbstring php70u-xml php70u-pear

while giving above comment i'm getting error from centos 7 no package available how can i resolve this issue

alan

Thu, 03/07/2019 - 09:58
Alan cladistan

Anyone please help me to get it resolve .

I'm using centos7 and php version 5.4.16 while installing mod_php70u php70u-cli php70u-mysqlnd php70u-devel php70u-gd php70u-mcrypt php70u-mbstring php70u-xml php70u-pear getting error

no package mod_php70u available no package php70u-cli available no package php70u-mysqlnd available no package php70u-devel available

how can i get this package please help .

alan

Tue, 03/12/2019 - 22:24
applejack

For PHP 7.1, 7.2 and 7.3, I to use Remi Safe repo which runs alongside other PHP installs. It installs under /opt/remi/

http://rpms.remirepo.net/enterprise/remi-safe.repo

Then you can use

yum --enablerepo=remi-safe install php71 php71-php-mcrypt php71-php-devel php71-php-mbstring php71-php-mysqli php71-php-soap php71-php-xml php71-php-pecl-igbinary php71-php-pecl-ip2location php71-php-pecl-redis4 php71-php-intl php71-php-enchant php71-php-embedded php71-php-bcmath php71-php-process php71-php-mysql php71-php-json php71-php-dba php71-php-dbg php71-php-gd

Same applies for PHP7.2 and 7.3 apart from a few packages such as mcrypt not being available for PHP7.3 since it is out of date.

Or you can use https://www.softwarecollections.org/en/docs/ which I use for PHP 7.0. Remi tends to have updates more quickly.

You may need to enable epel repo for dependencies.

Topic locked