1

So, I'm removed all php on Centos 7 like this:

yum remove php*

then I'm install shut down the older php repository like this

yum-config-manager --disable remi-php54

and enable the new one

yum-config-manager --enable remi-php72

Then I install all I need:

  yum install php php-mbstring php-gd php-mcrypt php-pear php-pspell php-pdo php-xml php-mysqlnd php-process php-pecl-zip php-xml php-intl php-zip php-zlib

Then I check the php version via command line

[root@nube-preprod-clon ~]# php -v
PHP 7.2.29 (cli) (built: Mar 17 2020 11:36:18) ( NTS )
Copyright (c) 1997-2018 The PHP Group
Zend Engine v3.2.0, Copyright (c) 1998-2018 Zend Technologies

And it's ok!But when I try to use this php version on the new version of owncloud I just installed it said:

enter image description here

So I crear a phpinfo.php file to check what the owncloud said:

enter image description here

What I am missing??

*** adding apache info from phpinfo.php enter image description here

*** list of installed packages:

[root@nube-preprod-clon ~]# rpm -qa | grep http
httpd24-runtime-1.1-18.el7.x86_64
httpd24-httpd-tools-2.4.27-8.el7.1.x86_64
httpd-2.4.6-80.el7.centos.1.x86_64
httpd24-libnghttp2-1.7.1-6.el7.x86_64
httpd-tools-2.4.6-80.el7.centos.1.x86_64
httpd24-httpd-2.4.27-8.el7.1.x86_64
[root@nube-preprod-clon ~]# rpm -qa | grep php
php-pdo-7.0.33-19.el7.remi.x86_64
php-pear-1.10.10-4.el7.remi.noarch
php-mbstring-7.0.33-19.el7.remi.x86_64
php-json-7.0.33-19.el7.remi.x86_64
php-cli-7.0.33-19.el7.remi.x86_64
php-xml-7.0.33-19.el7.remi.x86_64
php-process-7.0.33-19.el7.remi.x86_64
php-mcrypt-7.0.33-19.el7.remi.x86_64
php-mysqlnd-7.0.33-19.el7.remi.x86_64
php-pspell-7.0.33-19.el7.remi.x86_64
php-pecl-zip-1.18.1-1.el7.remi.7.0.x86_64
php-gd-7.0.33-19.el7.remi.x86_64
php-common-7.0.33-19.el7.remi.x86_64
php-fedora-autoloader-1.0.1-2.el7.noarch
php-intl-7.0.33-19.el7.remi.x86_64
php-7.0.33-19.el7.remi.x86_64
[root@nube-preprod-clon ~]# 

Sorry about my english.

  • 2
    From your post, it appears you are running PHP through Apache. Have you made sure the Apache PHP module is running the correct version? – GracefulRestart Mar 19 at 20:14
  • 1
    Please show the output of grep -Rn libphp /etc/httpd/conf.modules.d. Make sure you are only loading the PHP7 module. – GracefulRestart Mar 19 at 22:38
1

OK thanks to @GracefulRestart found the simple "solution":

This user showed me where to look and what to look at more precisely I noticed that I had loading an old version of php in apache.

[root@nube-preprod-clon ~]# grep -Rn libphp /etc/httpd/conf.modules.d
/etc/httpd/conf.modules.d/10-php55-php.conf:6:    LoadModule php5_module modules/libphp55-php5.so
/etc/httpd/conf.modules.d/15-php.conf:9:    LoadModule php7_module modules/libphp7.so
/etc/httpd/conf.modules.d/15-php.conf:16:    LoadModule php7_module modules/libphp7-zts.so

So I tried (and it worked) just move the .conf to .old, after that I could already see the correct version of php in my phpinfo.

enter image description here

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.