我的Web服务器(Centos7上的Apache)无法加载已安装的PHP版本。php -v
说我运行的是PHP 8.1.16
,但是Apache总是加载PHP 7.2
,但是我现在运行的是V7.4。
不知道,但在夜间更新例程中,以下软件包已更新:
php-pear.noarch 1:1.10.13-5.el7.remi remi-php72
然而,我无法找到任何安装的PHP版本,但只有这一个:/etc/httpd/modules/librh-php72-php7.so
,它也被我的配置文件conf.modules.d/15-rh-php72-php.conf
引用。
我已经花了很多时间来查找PHP安装,但是只找到了上面提到的那个。
超出sudo yum list installed | grep php
命令:
gd3php.x86_64 2.3.3-7.el7.remi @remi-safe
oniguruma5php.x86_64 6.9.8-1.el7.remi @remi-safe
php.x86_64 8.1.16-1.el7.remi @remi-php81
php-bcmath.x86_64 8.1.16-1.el7.remi @remi-php81
php-cli.x86_64 8.1.16-1.el7.remi @remi-php81
php-common.x86_64 8.1.16-1.el7.remi @remi-php81
php-devel.x86_64 8.1.16-1.el7.remi @remi-php81
php-fedora-autoloader.noarch 1.0.1-2.el7 @epel
php-fpm.x86_64 8.1.16-1.el7.remi @remi-php81
php-gd.x86_64 8.1.16-1.el7.remi @remi-php81
php-gmp.x86_64 8.1.16-1.el7.remi @remi-php81
php-intl.x86_64 8.1.16-1.el7.remi @remi-php81
php-kolab-net-ldap3.noarch 1.0.7-2.el7 @epel
php-ldap.x86_64 8.1.16-1.el7.remi @remi-php81
php-mbstring.x86_64 8.1.16-1.el7.remi @remi-php81
php-mysqlnd.x86_64 8.1.16-1.el7.remi @remi-php81
php-pdo.x86_64 8.1.16-1.el7.remi @remi-php81
php-pear.noarch 1:1.10.13-5.el7.remi @remi-php72
php-pear-Auth-SASL.noarch 1.0.6-5.el7 @epel
php-pear-Mail-Mime.noarch 1.10.2-1.el7 @epel
php-pear-Net-IDNA2.noarch 0.1.1-10.el7 @epel
php-pear-Net-LDAP2.noarch 2.1.0-1.el7 @epel
php-pear-Net-SMTP.noarch 1.7.3-1.el7 @epel
php-pear-Net-Sieve.noarch 1.3.4-4.el7 @epel
php-pear-Net-Socket.noarch 1.0.14-1.el7 @epel
php-pecl-imagick-im6.x86_64 3.7.0-1.el7.remi.8.1 @remi-php81
php-pecl-mcrypt.x86_64 1.0.5-1.el7.remi.8.1 @remi-php81
php-pecl-zip.x86_64 1.21.1-1.el7.remi.8.1 @remi-php81
php-process.x86_64 8.1.16-1.el7.remi @remi-php81
php-pspell.x86_64 8.1.16-1.el7.remi @remi-php81
php-sodium.x86_64 8.1.16-1.el7.remi @remi-php81
php-xml.x86_64 8.1.16-1.el7.remi @remi-php81
php72.x86_64 2.0-1.el7.remi @remi-safe
php72-php-cli.x86_64 7.2.34-16.el7.remi @remi-safe
php72-php-common.x86_64 7.2.34-16.el7.remi @remi-safe
php72-php-fpm.x86_64 7.2.34-16.el7.remi @remi-safe
php72-php-gd.x86_64 7.2.34-16.el7.remi @remi-safe
php72-php-json.x86_64 7.2.34-16.el7.remi @remi-safe
php72-php-mbstring.x86_64 7.2.34-16.el7.remi @remi-safe
php72-php-mysqlnd.x86_64 7.2.34-16.el7.remi @remi-safe
php72-php-opcache.x86_64 7.2.34-16.el7.remi @remi-safe
php72-php-pdo.x86_64 7.2.34-16.el7.remi @remi-safe
php72-php-xml.x86_64 7.2.34-16.el7.remi @remi-safe
php72-php-xmlrpc.x86_64 7.2.34-16.el7.remi @remi-safe
php72-runtime.x86_64 2.0-1.el7.remi @remi-safe
php74.x86_64 1.0-3.el7.remi @remi-safe
php74-php-cli.x86_64 7.4.33-4.el7.remi @remi-safe
php74-php-common.x86_64 7.4.33-4.el7.remi @remi-safe
php74-php-json.x86_64 7.4.33-4.el7.remi @remi-safe
php74-runtime.x86_64 1.0-3.el7.remi @remi-safe
rh-php72.x86_64 1-2.el7 @centos-sclo-rh
rh-php72-php.x86_64 7.2.24-1.el7 installed
rh-php72-php-cli.x86_64 7.2.24-1.el7 installed
rh-php72-php-common.x86_64 7.2.24-1.el7 installed
rh-php72-php-gd.x86_64 7.2.24-1.el7 installed
rh-php72-php-intl.x86_64 7.2.24-1.el7 installed
rh-php72-php-json.x86_64 7.2.24-1.el7 installed
rh-php72-php-mbstring.x86_64 7.2.24-1.el7 installed
rh-php72-php-mysqlnd.x86_64 7.2.24-1.el7 installed
rh-php72-php-opcache.x86_64 7.2.24-1.el7 installed
rh-php72-php-pdo.x86_64 7.2.24-1.el7 installed
rh-php72-php-pear.noarch 1:1.10.5-1.el7 @centos-sclo-rh
rh-php72-php-pecl-apcu.x86_64 5.1.12-1.el7 @centos-sclo-rh
rh-php72-php-process.x86_64 7.2.24-1.el7 installed
rh-php72-php-xml.x86_64 7.2.24-1.el7 installed
rh-php72-php-zip.x86_64 7.2.24-1.el7 installed
rh-php72-runtime.x86_64 1-2.el7 @centos-sclo-rh
sclo-php72-php-pecl-igbinary.x86_64 2.0.8-1.el7 @centos-sclo-sclo
sclo-php72-php-pecl-imagick.x86_64 3.4.4-3.el7 @centos-sclo-sclo
sclo-php72-php-pecl-redis4.x86_64 4.3.0-1.el7 @centos-sclo-sclo
1条答案
按热度按时间k97glaaz1#
明白了。
卸载所有php版本,只安装
php
-而不是任何phpXX
变体。*.conf
文件指向modules/libphp7.so
(这是已安装的php
包的模块。谢谢!