如何在 Apache 服务 CentOS 7 中安装模块 libphp5.so

我已经在 Cent OS 7 中安装了 php 5.6.27。我还取消了以下配置行的注释:

LoadModule php5_module       modules/libphp5.so

但是我在目录 modules/ 中没有这个文件。

我该如何安装?

stack overflow How to install module libphp5.so in Apache serve CentOS 7
原文答案

答案:

作者头像

The exact source and name of the PHP version installed is important. I too had this problem and had installed php56.x86_64 from remi-safe repo. However it wasn't until I installed php.x86_64 from remi-php56 repo that things worked (and libphp5.so showed up).

I recommend revisiting the version installed and repo source (yum list installed), and then look for an alternative of one or the other, or both (version/repo source).