
Also habe ich alles PHP auf Centos 7 wie folgt entfernt:
yum remove php*
dann installiere ich das ältere PHP-Repository wie folgt
yum-config-manager --disable remi-php54
und aktivieren Sie die neue
yum-config-manager --enable remi-php72
Dann installiere ich alles was ich brauche:
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
Dann überprüfe ich die PHP-Version über die Kommandozeile
[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
Und es ist ok! Aber als ich versuchte, diese PHP-Version auf der neuen Version von Owncloud zu verwenden, die ich gerade installiert hatte, hieß es:
Also erstelle ich eine phpinfo.php-Datei, um zu überprüfen, was die Owncloud gesagt hat:
Was fehlt mir??
*** Apache-Informationen aus phpinfo.php hinzufügen
*** Liste der installierten Pakete:
[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 ~]#
Entschuldige mein Englisch.
Antwort1
Okay, danke an@GracefulRestarthabe die einfache "Lösung" gefunden:
Dieser Benutzer hat mir gezeigt, wo und worauf ich genauer achten muss. Mir fiel auf, dass ich eine alte PHP-Version in Apache geladen hatte.
[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
Also habe ich versucht (und es hat funktioniert), einfach die .conf nach .old zu verschieben. Danach konnte ich bereits die richtige PHP-Version in meiner PHPinfo sehen.