1 (edited by Rob206 2017-01-29 18:46:12)

Topic: Mixed folders after update to PHP 7.1.1

Hello,

On January, 6th I installed a new Centos 7 server with PHP 7.
I added the repositories epel and remi, then installed Apache, MySQL and PHP modules

yum install httpd mod_ssl mariadb-server php
yum install php-gd php-mysqlnd ...

Everything works fine!

On January, 20th I ran

yum update

and everything was updated to PHP 7.1.1 without errors

Today I wanted to install a new module with

yum install php-imap

which produced

---> Package php-imap.x86_64 0:5.4.16-7.el7 will be installed
--> Processing Dependency: php(zend-abi) = 20100525-64 for package: php-imap-5.4.16-7.el7.x86_64
--> Processing Dependency: php(api) = 20100412-64 for package: php-imap-5.4.16-7.el7.x86_64
--> Finished Dependency Resolution
Error: Package: php-imap-5.4.16-7.el7.x86_64 (epel)
           Requires: php(api) = 20100412-64
           Installed: php-common-7.1.1-2.el7.remi.x86_64 (@remi-php71)
               php(api) = 20160303-64
           Available: php-common-5.4.16-42.el7.x86_64 (base)
               php(api) = 20100412-64
           Available: php-common-7.1.0-1.el7.remi.x86_64 (remi-php71)
               php(api) = 20160303-64
Error: Package: php-imap-5.4.16-7.el7.x86_64 (epel)
           Requires: php(zend-abi) = 20100525-64
           Installed: php-common-7.1.1-2.el7.remi.x86_64 (@remi-php71)
               php(zend-abi) = 20160303-64
           Available: php-common-5.4.16-42.el7.x86_64 (base)
               php(zend-abi) = 20100525-64
           Available: php-common-7.1.0-1.el7.remi.x86_64 (remi-php71)
               php(zend-abi) = 20160303-64
 You could try using --skip-broken to work around the problem
 You could try running: rpm -Va --nofiles --nodigest

so I used

yum install php71-php-imap

After installation the module was not loaded. I found that during this installation (and possibly also PHP update last week) everything was installed into "/etc/opt/remi/php71" and now there are two php.ini files

/etc/php.ini
/etc/opt/remi/php71/php.ini

Some (I guess the updated) modules exist twice, e.g. for curl

/opt/remi/php71/root/usr/lib64/php/modules/curl.so
/usr/lib64/php/modules/curl.so

Also there is a complete "root"-like folder structure inside

root@server:/opt/remi/php71/root # ls -la
total 60
dr-xr-xr-x 15 root root 4096 Jan 29 16:52 .
dr-xr-xr-x  3 root root 4096 Jan 29 16:52 ..
lrwxrwxrwx  1 root root    7 Jan 29 16:52 bin -> usr/bin
dr-xr-xr-x  2 root root 4096 Nov 29 14:48 boot
drwxr-xr-x  2 root root 4096 Nov 29 14:48 dev
drwxr-xr-x  2 root root 4096 Nov 29 14:48 home
lrwxrwxrwx  1 root root    7 Jan 29 16:52 lib -> usr/lib
lrwxrwxrwx  1 root root    9 Jan 29 16:52 lib64 -> usr/lib64
drwxr-xr-x  2 root root 4096 Nov 29 14:48 media
drwxr-xr-x  2 root root 4096 Nov 29 14:48 mnt
drwxr-xr-x  2 root root 4096 Nov 29 14:48 opt
dr-xr-xr-x  2 root root 4096 Nov 29 14:48 proc
dr-xr-x---  2 root root 4096 Nov 29 14:48 root
drwxr-xr-x  3 root root 4096 Jan 29 16:52 run
lrwxrwxrwx  1 root root    8 Jan 29 16:52 sbin -> usr/sbin
drwxr-xr-x  2 root root 4096 Nov 29 14:48 srv
drwxr-xr-x  2 root root 4096 Nov 29 14:48 sys
drwxrwxrwt  2 root root 4096 Nov 29 14:48 tmp
drwxr-xr-x 13 root root 4096 Jan 29 16:52 usr

What went wrong here? Did I miss some important setting during update of PHP? Was it wrong to use "php71-php-imap"?
Can I remove the files in "/etc/opt/remi" and "/opt/remi"? Or do they need to be manually moved after each update?

I'm still learning so this is very confusing...
Thanks in advance for any kind help!

Re: Mixed folders after update to PHP 7.1.1

If you use php from remi-php71, you must also used  php-imap from this repo which doesn't seems enabled in your output.
php71-php-imap is a different package, designed for parallel installation.

As explained in the Wizard instructions, link in the top of this page.

Desktop: Fedora 25 x86_64 + rpmfusion + remi-test + remi-dev
Laptop:  Fedora 24 x86_64 + remi (SCL only)
Hosting Server: CentOS 6.8 x86_64 + EPEL + remi + remi-php70

3 (edited by Rob206 2017-01-29 19:08:43)

Re: Mixed folders after update to PHP 7.1.1

Thanks, things are getting a little clearer now...

yum repolist

base/7/x86_64                                                                              CentOS-7 - Base
epel/x86_64                                                                                Extra Packages for Enterprise Linux 7 - x86_64
extras/7/x86_64                                                                            CentOS-7 - Extras
mariadb                                                                                    MariaDB
remi-php71                                                                                 Remi's PHP 7.1 RPM repository for Enterprise Linux 7 - x86_64
remi-safe                                                                                  Safe Remi's RPM repository for Enterprise Linux 7 - x86_64
updates/7/x86_64                                                                           CentOS-7 - Updates 

I followed your great wizard, but I still get

yum install php-imap

Loaded plugins: fastestmirror, priorities
Loading mirror speeds from cached hostfile
 * base: centosmirror.netcup.net
 * epel: mirrors.n-ix.net
 * extras: mirror.softaculous.com
 * remi-php71: mirror.23media.de
 * remi-safe: mirror.23media.de
 * updates: mirror.softaculous.com
488 packages excluded due to repository priority protections
Resolving Dependencies
--> Running transaction check
---> Package php-imap.x86_64 0:5.4.16-7.el7 will be installed
--> Processing Dependency: php(zend-abi) = 20100525-64 for package: php-imap-5.4.16-7.el7.x86_64
--> Processing Dependency: php(api) = 20100412-64 for package: php-imap-5.4.16-7.el7.x86_64
--> Finished Dependency Resolution
Error: Package: php-imap-5.4.16-7.el7.x86_64 (epel)
           Requires: php(api) = 20100412-64
           Installed: php-common-7.1.1-2.el7.remi.x86_64 (@remi-php71)
               php(api) = 20160303-64
           Available: php-common-5.4.16-42.el7.x86_64 (base)
               php(api) = 20100412-64
           Available: php-common-7.1.0-1.el7.remi.x86_64 (remi-php71)
               php(api) = 20160303-64
Error: Package: php-imap-5.4.16-7.el7.x86_64 (epel)
           Requires: php(zend-abi) = 20100525-64
           Installed: php-common-7.1.1-2.el7.remi.x86_64 (@remi-php71)
               php(zend-abi) = 20160303-64
           Available: php-common-5.4.16-42.el7.x86_64 (base)
               php(zend-abi) = 20100525-64
           Available: php-common-7.1.0-1.el7.remi.x86_64 (remi-php71)
               php(zend-abi) = 20160303-64
 You could try using --skip-broken to work around the problem
 You could try running: rpm -Va --nofiles --nodigest

The same thing also happens for "yum install php-mcrypt"
Does this mean that these modules are not available for PHP 7.1.1.?

Re: Mixed folders after update to PHP 7.1.1

> Loaded plugins: fastestmirror, priorities
> 488 packages excluded due to repository priority protections

Disable the "priorities" plugins.

Desktop: Fedora 25 x86_64 + rpmfusion + remi-test + remi-dev
Laptop:  Fedora 24 x86_64 + remi (SCL only)
Hosting Server: CentOS 6.8 x86_64 + EPEL + remi + remi-php70

Re: Mixed folders after update to PHP 7.1.1

Excellent - that did the trick!

Thanks for taking the time to answer my questions, I really learned a lot!
Have a nice day :-)

Re: Mixed folders after update to PHP 7.1.1

smile

Desktop: Fedora 25 x86_64 + rpmfusion + remi-test + remi-dev
Laptop:  Fedora 24 x86_64 + remi (SCL only)
Hosting Server: CentOS 6.8 x86_64 + EPEL + remi + remi-php70