Topic: Errors trying to upgrade from PHP 5.6 to PHP 7.2. Need help.

Hi all,

I am trying to upgrade to PHP 7 from PHP 5.6 on my Lunix Centos system:
  CentOS Linux release 7.6.1810 (Core)

I follow the wizard steps but I get several messages about a package requirement like:
Error: Package: php56u-pecl-jsonc-1.3.10-2.ius.centos7.x86_64 (@ius)
           Requires: php(api) = 20131106-64
etc.

Please give me some directions on how to solve this?



Full output below :

[root@hosting peter]# php -v
PHP 5.6.39 (cli) (built: Dec  6 2018 15:01:24) 
Copyright (c) 1997-2016 The PHP Group
Zend Engine v2.6.0, Copyright (c) 1998-2016 Zend Technologies
[root@hosting peter]# yum update
Loaded plugins: fastestmirror, langpacks, replace
Loading mirror speeds from cached hostfile
 * base: centos.mirror.transip.nl
 * epel: ams.edge.kernel.org
 * extras: mirror.hostnet.nl
 * ius: mirror.amsiohosting.net
 * remi-php70: remi.mirrors.cu.be
 * remi-php71: remi.mirrors.cu.be
 * remi-php72: remi.mirrors.cu.be
 * remi-safe: remi.mirrors.cu.be
 * rpmforge: mirror.nl.leaseweb.net
 * updates: mirror.denit.net
 * webtatic: uk.repo.webtatic.com
Resolving Dependencies
--> Running transaction check
---> Package php.x86_64 0:7.2.15-1.el7.remi will be obsoleting
--> Processing Dependency: libargon2.so.0()(64bit) for package: php-7.2.15-1.el7.remi.x86_64
---> Package php-cli.x86_64 0:7.2.15-1.el7.remi will be obsoleting
---> Package php-common.x86_64 0:7.2.15-1.el7.remi will be obsoleting
--> Processing Dependency: php-json(x86-64) = 7.2.15-1.el7.remi for package: php-common-7.2.15-1.el7.remi.x86_64
---> Package php-gd.x86_64 0:7.2.15-1.el7.remi will be obsoleting
--> Processing Dependency: gd-last(x86-64) >= 2.1.1 for package: php-gd-7.2.15-1.el7.remi.x86_64
--> Processing Dependency: libgd.so.3()(64bit) for package: php-gd-7.2.15-1.el7.remi.x86_64
---> Package php-gmp.x86_64 0:7.2.15-1.el7.remi will be obsoleting
---> Package php-imap.x86_64 0:7.2.15-1.el7.remi will be obsoleting
---> Package php-mbstring.x86_64 0:7.2.15-1.el7.remi will be obsoleting
---> Package php-mysqlnd.x86_64 0:7.2.15-1.el7.remi will be obsoleting
---> Package php-odbc.x86_64 0:7.2.15-1.el7.remi will be obsoleting
---> Package php-pdo.x86_64 0:7.2.15-1.el7.remi will be obsoleting
---> Package php-pear.noarch 1:1.10.8-1.el7.remi will be obsoleting
--> Processing Dependency: php-composer(fedora/autoloader) for package: 1:php-pear-1.10.8-1.el7.remi.noarch
---> Package php-pecl-mcrypt.x86_64 0:1.0.2-2.el7.remi.7.2 will be obsoleting
---> Package php-pgsql.x86_64 0:7.2.15-1.el7.remi will be obsoleting
---> Package php-process.x86_64 0:7.2.15-1.el7.remi will be obsoleting
---> Package php-snmp.x86_64 0:7.2.15-1.el7.remi will be obsoleting
---> Package php-xml.x86_64 0:7.2.15-1.el7.remi will be obsoleting
---> Package php-xmlrpc.x86_64 0:7.2.15-1.el7.remi will be obsoleting
---> Package php56u.x86_64 0:5.6.39-1.ius.centos7 will be obsoleted
---> Package php56u-cli.x86_64 0:5.6.39-1.ius.centos7 will be obsoleted
---> Package php56u-common.x86_64 0:5.6.39-1.ius.centos7 will be obsoleted
--> Processing Dependency: php(api) = 20131106-64 for package: php56u-pecl-jsonc-1.3.10-2.ius.centos7.x86_64
Package php56w-common is obsoleted by php-common, but obsoleting package does not provide for requirements
--> Processing Dependency: php(zend-abi) = 20131226-64 for package: php56u-pecl-jsonc-1.3.10-2.ius.centos7.x86_64
Package php56w-common is obsoleted by php-common, but obsoleting package does not provide for requirements
---> Package php56u-gd.x86_64 0:5.6.39-1.ius.centos7 will be obsoleted
---> Package php56u-gmp.x86_64 0:5.6.39-1.ius.centos7 will be obsoleted
---> Package php56u-imap.x86_64 0:5.6.39-1.ius.centos7 will be obsoleted
---> Package php56u-mbstring.x86_64 0:5.6.39-1.ius.centos7 will be obsoleted
---> Package php56u-mcrypt.x86_64 0:5.6.39-1.ius.centos7 will be obsoleted
---> Package php56u-mysqlnd.x86_64 0:5.6.39-1.ius.centos7 will be obsoleted
---> Package php56u-odbc.x86_64 0:5.6.39-1.ius.centos7 will be obsoleted
---> Package php56u-pdo.x86_64 0:5.6.39-1.ius.centos7 will be obsoleted
---> Package php56u-pear.noarch 1:1.10.5-1.ius.centos7 will be obsoleted
--> Processing Dependency: php56u-pear for package: php56u-pecl-jsonc-1.3.10-2.ius.centos7.x86_64
--> Processing Dependency: php56u-pear for package: php56u-pecl-jsonc-1.3.10-2.ius.centos7.x86_64
---> Package php56u-pgsql.x86_64 0:5.6.39-1.ius.centos7 will be obsoleted
---> Package php56u-process.x86_64 0:5.6.39-1.ius.centos7 will be obsoleted
---> Package php56u-snmp.x86_64 0:5.6.39-1.ius.centos7 will be obsoleted
---> Package php56u-xml.x86_64 0:5.6.39-1.ius.centos7 will be obsoleted
---> Package php56u-xmlrpc.x86_64 0:5.6.39-1.ius.centos7 will be obsoleted
--> Running transaction check
---> Package gd-last.x86_64 0:2.2.5-5.el7.remi will be installed
--> Processing Dependency: libwebp.so.4()(64bit) for package: gd-last-2.2.5-5.el7.remi.x86_64
---> Package libargon2.x86_64 0:20161029-2.el7 will be installed
---> Package php-fedora-autoloader.noarch 0:1.0.0-1.el7 will be installed
---> Package php-json.x86_64 0:7.2.15-1.el7.remi will be installed
---> Package php56u-common.x86_64 0:5.6.39-1.ius.centos7 will be obsoleted
--> Processing Dependency: php(api) = 20131106-64 for package: php56u-pecl-jsonc-1.3.10-2.ius.centos7.x86_64
Package php56w-common is obsoleted by php-common, but obsoleting package does not provide for requirements
--> Processing Dependency: php(zend-abi) = 20131226-64 for package: php56u-pecl-jsonc-1.3.10-2.ius.centos7.x86_64
Package php56w-common is obsoleted by php-common, but obsoleting package does not provide for requirements
---> Package php56u-pear.noarch 1:1.10.5-1.ius.centos7 will be obsoleted
--> Processing Dependency: php56u-pear for package: php56u-pecl-jsonc-1.3.10-2.ius.centos7.x86_64
--> Processing Dependency: php56u-pear for package: php56u-pecl-jsonc-1.3.10-2.ius.centos7.x86_64
--> Running transaction check
---> Package libwebp.x86_64 0:0.3.0-7.el7 will be installed
---> Package php56u-common.x86_64 0:5.6.39-1.ius.centos7 will be obsoleted
--> Processing Dependency: php(api) = 20131106-64 for package: php56u-pecl-jsonc-1.3.10-2.ius.centos7.x86_64
Package php56w-common is obsoleted by php-common, but obsoleting package does not provide for requirements
--> Processing Dependency: php(zend-abi) = 20131226-64 for package: php56u-pecl-jsonc-1.3.10-2.ius.centos7.x86_64
Package php56w-common is obsoleted by php-common, but obsoleting package does not provide for requirements
---> Package php56u-pear.noarch 1:1.10.5-1.ius.centos7 will be obsoleted
--> Processing Dependency: php56u-pear for package: php56u-pecl-jsonc-1.3.10-2.ius.centos7.x86_64
--> Processing Dependency: php56u-pear for package: php56u-pecl-jsonc-1.3.10-2.ius.centos7.x86_64
--> Finished Dependency Resolution
Error: Package: php56u-pecl-jsonc-1.3.10-2.ius.centos7.x86_64 (@ius)
           Requires: php(api) = 20131106-64
           Removing: php56u-common-5.6.39-1.ius.centos7.x86_64 (@ius)
               php(api) = 20131106-64
           Obsoleted By: php-common-7.2.15-1.el7.remi.x86_64 (remi-php72)
               php(api) = 20170718-64
           Available: php-common-5.4.16-46.el7.x86_64 (base)
               php(api) = 20100412-64
           Available: php-common-7.0.33-1.el7.remi.x86_64 (remi-php70)
               php(api) = 20151012-64
           Available: php-common-7.0.33-2.el7.remi.x86_64 (remi-php70)
               php(api) = 20151012-64
           Available: php-common-7.1.25-2.el7.remi.x86_64 (remi-php71)
               php(api) = 20160303-64
           Available: php-common-7.1.26-1.el7.remi.x86_64 (remi-php71)
               php(api) = 20160303-64
           Available: php-common-7.2.14-1.el7.remi.x86_64 (remi-php72)
               php(api) = 20170718-64
           Available: php55w-common-5.5.38-1.w7.x86_64 (webtatic)
               php(api) = 20121113-64
           Available: php56w-common-5.6.39-1.w7.x86_64 (webtatic)
               php(api) = 20131106-64
           Available: php56w-common-5.6.40-1.w7.x86_64 (webtatic)
               php(api) = 20131106-64
           Available: php70w-common-7.0.33-1.w7.x86_64 (webtatic)
               php(api) = 20151012-64
           Available: php71u-common-7.1.25-1.ius.centos7.x86_64 (ius)
               php(api) = 20160303-64
           Available: php71u-common-7.1.25-2.ius.centos7.x86_64 (ius)
               php(api) = 20160303-64
           Available: php71u-common-7.1.26-1.ius.centos7.x86_64 (ius)
               php(api) = 20160303-64
           Available: php71w-common-7.1.25-1.w7.x86_64 (webtatic)
               php(api) = 20160303-64
           Available: php71w-common-7.1.26-1.w7.x86_64 (webtatic)
               php(api) = 20160303-64
           Available: php72u-common-7.2.13-1.ius.centos7.x86_64 (ius)
               php(api) = 20170718-64
           Available: php72u-common-7.2.13-2.ius.centos7.x86_64 (ius)
               php(api) = 20170718-64
           Available: php72u-common-7.2.14-1.ius.centos7.x86_64 (ius)
               php(api) = 20170718-64
           Available: php72w-common-7.2.13-1.w7.x86_64 (webtatic)
               php(api) = 20170718-64
           Available: php72w-common-7.2.14-1.w7.x86_64 (webtatic)
               php(api) = 20170718-64
Error: Package: php56u-pecl-jsonc-1.3.10-2.ius.centos7.x86_64 (@ius)
           Requires: php56u-pear
           Removing: 1:php56u-pear-1.10.5-1.ius.centos7.noarch (@ius)
               php56u-pear = 1:1.10.5-1.ius.centos7
           Obsoleted By: 1:php-pear-1.10.8-1.el7.remi.noarch (remi-php70)
               Not found
Error: Package: php56u-pecl-jsonc-1.3.10-2.ius.centos7.x86_64 (@ius)
           Requires: php(zend-abi) = 20131226-64
           Removing: php56u-common-5.6.39-1.ius.centos7.x86_64 (@ius)
               php(zend-abi) = 20131226-64
           Obsoleted By: php-common-7.2.15-1.el7.remi.x86_64 (remi-php72)
               php(zend-abi) = 20170718-64
           Available: php-common-5.4.16-46.el7.x86_64 (base)
               php(zend-abi) = 20100525-64
           Available: php-common-7.0.33-1.el7.remi.x86_64 (remi-php70)
               php(zend-abi) = 20151012-64
           Available: php-common-7.0.33-2.el7.remi.x86_64 (remi-php70)
               php(zend-abi) = 20151012-64
           Available: php-common-7.1.25-2.el7.remi.x86_64 (remi-php71)
               php(zend-abi) = 20160303-64
           Available: php-common-7.1.26-1.el7.remi.x86_64 (remi-php71)
               php(zend-abi) = 20160303-64
           Available: php-common-7.2.14-1.el7.remi.x86_64 (remi-php72)
               php(zend-abi) = 20170718-64
           Available: php55w-common-5.5.38-1.w7.x86_64 (webtatic)
               php(zend-abi) = 20121212-64
           Available: php56w-common-5.6.39-1.w7.x86_64 (webtatic)
               php(zend-abi) = 20131226-64
           Available: php56w-common-5.6.40-1.w7.x86_64 (webtatic)
               php(zend-abi) = 20131226-64
           Available: php70w-common-7.0.33-1.w7.x86_64 (webtatic)
               php(zend-abi) = 20151012-64
           Available: php71u-common-7.1.25-1.ius.centos7.x86_64 (ius)
               php(zend-abi) = 20160303-64
           Available: php71u-common-7.1.25-2.ius.centos7.x86_64 (ius)
               php(zend-abi) = 20160303-64
           Available: php71u-common-7.1.26-1.ius.centos7.x86_64 (ius)
               php(zend-abi) = 20160303-64
           Available: php71w-common-7.1.25-1.w7.x86_64 (webtatic)
               php(zend-abi) = 20160303-64
           Available: php71w-common-7.1.26-1.w7.x86_64 (webtatic)
               php(zend-abi) = 20160303-64
           Available: php72u-common-7.2.13-1.ius.centos7.x86_64 (ius)
               php(zend-abi) = 20170718-64
           Available: php72u-common-7.2.13-2.ius.centos7.x86_64 (ius)
               php(zend-abi) = 20170718-64
           Available: php72u-common-7.2.14-1.ius.centos7.x86_64 (ius)
               php(zend-abi) = 20170718-64
           Available: php72w-common-7.2.13-1.w7.x86_64 (webtatic)
               php(zend-abi) = 20170718-64
           Available: php72w-common-7.2.14-1.w7.x86_64 (webtatic)
               php(zend-abi) = 20170718-64
 You could try using --skip-broken to work around the problem
 You could try running: rpm -Va --nofiles --nodigest
[root@hosting peter]#

Re: Errors trying to upgrade from PHP 5.6 to PHP 7.2. Need help.

Disable webtatic (and perhaps ius), which raise this issue.

Desktop: Fedora 29 x86_64 + rpmfusion + remi-test + remi-dev
Laptop:  Fedora 30 x86_64 + rpmfusion + remi (SCL only)
Hosting Server: CentOS 6.10 x86_64 with EPEL, remi, remi-php72 and remi-php72-test

Re: Errors trying to upgrade from PHP 5.6 to PHP 7.2. Need help.

Thanks for you quick reply!

Can you help my on how to do that?

Sorry, Linux novice here.

Re: Errors trying to upgrade from PHP 5.6 to PHP 7.2. Need help.

Permanent solution:  yum remove webtatic-release ius-release

Or disabling the repo: yum-config-manager --disable webtatic; yum-config-manager --disable ius

Desktop: Fedora 29 x86_64 + rpmfusion + remi-test + remi-dev
Laptop:  Fedora 30 x86_64 + rpmfusion + remi (SCL only)
Hosting Server: CentOS 6.10 x86_64 with EPEL, remi, remi-php72 and remi-php72-test

Re: Errors trying to upgrade from PHP 5.6 to PHP 7.2. Need help.

I removed the repository:
yum remove webtatic-release ius-release

But now I get:

Error: Package: php56u-pecl-jsonc-1.3.10-2.ius.centos7.x86_64 (@ius)
           Requires: php56u-pear
           Removing: 1:php56u-pear-1.10.5-1.ius.centos7.noarch (@ius)
               php56u-pear = 1:1.10.5-1.ius.centos7
           Obsoleted By: 1:php-pear-1.10.8-1.el7.remi.noarch (remi-php70)
               Not found
Error: Package: php56u-pecl-jsonc-1.3.10-2.ius.centos7.x86_64 (@ius)
           Requires: php(api) = 20131106-64
           Removing: php56u-common-5.6.39-1.ius.centos7.x86_64 (@ius)
               php(api) = 20131106-64
           Obsoleted By: php-common-7.2.15-1.el7.remi.x86_64 (remi-php72)
               php(api) = 20170718-64
           Available: php-common-5.4.16-46.el7.x86_64 (base)
               php(api) = 20100412-64
           Available: php-common-7.0.33-1.el7.remi.x86_64 (remi-php70)
               php(api) = 20151012-64
           Available: php-common-7.0.33-2.el7.remi.x86_64 (remi-php70)
               php(api) = 20151012-64
           Available: php-common-7.1.25-2.el7.remi.x86_64 (remi-php71)
               php(api) = 20160303-64
           Available: php-common-7.1.26-1.el7.remi.x86_64 (remi-php71)
               php(api) = 20160303-64
           Available: php-common-7.2.14-1.el7.remi.x86_64 (remi-php72)
               php(api) = 20170718-64
Error: Package: php56u-pecl-jsonc-1.3.10-2.ius.centos7.x86_64 (@ius)
           Requires: php(zend-abi) = 20131226-64
           Removing: php56u-common-5.6.39-1.ius.centos7.x86_64 (@ius)
               php(zend-abi) = 20131226-64
           Obsoleted By: php-common-7.2.15-1.el7.remi.x86_64 (remi-php72)
               php(zend-abi) = 20170718-64
           Available: php-common-5.4.16-46.el7.x86_64 (base)
               php(zend-abi) = 20100525-64
           Available: php-common-7.0.33-1.el7.remi.x86_64 (remi-php70)
               php(zend-abi) = 20151012-64
           Available: php-common-7.0.33-2.el7.remi.x86_64 (remi-php70)
               php(zend-abi) = 20151012-64
           Available: php-common-7.1.25-2.el7.remi.x86_64 (remi-php71)
               php(zend-abi) = 20160303-64
           Available: php-common-7.1.26-1.el7.remi.x86_64 (remi-php71)
               php(zend-abi) = 20160303-64
           Available: php-common-7.2.14-1.el7.remi.x86_64 (remi-php72)
               php(zend-abi) = 20170718-64
You could try using --skip-broken to work around the problem
You could try running: rpm -Va --nofiles --nodigest

Re: Errors trying to upgrade from PHP 5.6 to PHP 7.2. Need help.

remove this package (php56u-pecl-jsonc) and install php-json after the update.

Desktop: Fedora 29 x86_64 + rpmfusion + remi-test + remi-dev
Laptop:  Fedora 30 x86_64 + rpmfusion + remi (SCL only)
Hosting Server: CentOS 6.10 x86_64 with EPEL, remi, remi-php72 and remi-php72-test

Re: Errors trying to upgrade from PHP 5.6 to PHP 7.2. Need help.

NOTICE: don't enable remi-php70 and remi-php71 and remi-php72, but only the one providing the version you want.

Desktop: Fedora 29 x86_64 + rpmfusion + remi-test + remi-dev
Laptop:  Fedora 30 x86_64 + rpmfusion + remi (SCL only)
Hosting Server: CentOS 6.10 x86_64 with EPEL, remi, remi-php72 and remi-php72-test

8 (edited by peterweter 2019-02-22 14:33:24)

Re: Errors trying to upgrade from PHP 5.6 to PHP 7.2. Need help.

I removed php 5.6.
Now I dont have any PHP on my running webserver!

I only want PHP 7.2.

What do I do now to get php 7.2??

Please help!

Re: Errors trying to upgrade from PHP 5.6 to PHP 7.2. Need help.

Follow the Wizard instructions....

And install php-xxx where xxx is the name of the SAPI or extensions you need
(simply: the list of removed packages)

Desktop: Fedora 29 x86_64 + rpmfusion + remi-test + remi-dev
Laptop:  Fedora 30 x86_64 + rpmfusion + remi (SCL only)
Hosting Server: CentOS 6.10 x86_64 with EPEL, remi, remi-php72 and remi-php72-test

Re: Errors trying to upgrade from PHP 5.6 to PHP 7.2. Need help.

Now I get a PHP file download in stead of the website when opening a URL.

What could be wrong?

Re: Errors trying to upgrade from PHP 5.6 to PHP 7.2. Need help.

Looks like you have not installed any SAPI for the web server

Either:

* mod_php (provided byt the "php" package), which works out of the box for Apache HTTP server

* php-fpm, which need some configuration, but work with all web server (lighttp, nginx, Apache HTTP server)

Ex: https://developers.redhat.com/blog/2017 … tion-tips/


Please: rpm -qa php\*

Desktop: Fedora 29 x86_64 + rpmfusion + remi-test + remi-dev
Laptop:  Fedora 30 x86_64 + rpmfusion + remi (SCL only)
Hosting Server: CentOS 6.10 x86_64 with EPEL, remi, remi-php72 and remi-php72-test

Re: Errors trying to upgrade from PHP 5.6 to PHP 7.2. Need help.

Thanks but I restored a backup from the night before to solve my problem.

My plan for next time is to add PHP7.2 beside PHP5.6 and gradually switch over to PHP72.

I have to research how to configure that.

Re: Errors trying to upgrade from PHP 5.6 to PHP 7.2. Need help.

If you want "multiple" versions, you need Software Collections, and have to use FPM.

This is described in various article in my blog (SCL tag), and summarized in https://developers.redhat.com/blog/2017 … tion-tips/

Desktop: Fedora 29 x86_64 + rpmfusion + remi-test + remi-dev
Laptop:  Fedora 30 x86_64 + rpmfusion + remi (SCL only)
Hosting Server: CentOS 6.10 x86_64 with EPEL, remi, remi-php72 and remi-php72-test

Re: Errors trying to upgrade from PHP 5.6 to PHP 7.2. Need help.

I did a PHP72 install without removing PHP56 and I am going to follow your tip on https://developers.redhat.com/blog/2017 … tion-tips/

rpm -qa php\*
php72-php-common-7.2.15-1.el7.remi.x86_64
php56u-snmp-5.6.39-1.ius.centos7.x86_64
php56u-mysqlnd-5.6.39-1.ius.centos7.x86_64
php56u-cli-5.6.39-1.ius.centos7.x86_64
php56u-gmp-5.6.39-1.ius.centos7.x86_64
php56u-xml-5.6.39-1.ius.centos7.x86_64
php72-runtime-2.0-1.el7.remi.x86_64
php72-2.0-1.el7.remi.x86_64
php56u-pear-1.10.5-1.ius.centos7.noarch
php56u-gd-5.6.39-1.ius.centos7.x86_64
php56u-xmlrpc-5.6.39-1.ius.centos7.x86_64
php56u-pgsql-5.6.39-1.ius.centos7.x86_64
php56u-mbstring-5.6.39-1.ius.centos7.x86_64
php56u-common-5.6.39-1.ius.centos7.x86_64
php72-php-cli-7.2.15-1.el7.remi.x86_64
php56u-pecl-jsonc-1.3.10-2.ius.centos7.x86_64
php56u-5.6.39-1.ius.centos7.x86_64
php56u-imap-5.6.39-1.ius.centos7.x86_64
php56u-mcrypt-5.6.39-1.ius.centos7.x86_64
php56u-pdo-5.6.39-1.ius.centos7.x86_64
php56u-process-5.6.39-1.ius.centos7.x86_64
php72-php-json-7.2.15-1.el7.remi.x86_64
php56u-odbc-5.6.39-1.ius.centos7.x86_64