【问题标题】:After installing php 7.2.1 on CentOS 6.9, directadmin says php 7.2.1 is installed but apache is still using older version of php在 CentOS 6.9 上安装 php 7.2.1 后,directadmin 说已安装 php 7.2.1 但 apache 仍在使用旧版本的 php
【发布时间】:2018-06-24 21:15:45
【问题描述】:

我在 CentOS 6.9 上安装了 php-7.2.1,# php -vdirectadmin 都说它是 7.2.1。 directadmin 中的 系统信息 窗口显示:

Apache 2.4.29   Running
DirectAdmin 1.52.1  Running
Exim 4.87   Running
MySQL 5.5.31    Running
Named 9.8.2rc1  Running
sshd    Running
dovecot 2.2.25 (7be1766)    Running
pure-ftpd 1.0.42    Running
Php 7.2.1   Installed

然而 apache 仍在使用之前安装的 php 版本 php-fpm56

如何让 apache 使用较新的 php 版本?在尝试安装较新的软件包之前,我应该删除以前安装的 php-fpm56 软件包吗?

【问题讨论】:

  • 试试吧。正常情况下,配置不会被删除,所以如果删除 php-fpm56 导致问题,你可以重新安装它。但是,是的,这可能是问题所在:php -v 仅列出了 PHP 的 CLI 版本,而不是您的网络服务器使用的版本
  • 谢谢!我需要更新 directadmin 的 custombuild 中的一些选项。现在网络服务器使用正确的 php 版本。

标签: php apache centos6 php-7.2


【解决方案1】:

更新你的 php-fpm

yum install php72w-fpm

然后重启你的 Apache

sevice httpd restart

【讨论】:

    猜你喜欢
    • 2015-07-22
    • 2015-09-08
    • 2014-03-13
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2019-01-06
    • 2017-05-27
    • 1970-01-01
    相关资源
    最近更新 更多