Apache 缺少 php 模块

Apache 缺少 php 模块

我通过 yum 安装了httpd v2.2.15php v5.5.13我第一次注意到这个问题是在我尝试访问我的网站时,它显示了 PHP 代码。然后我发现没有 php 模块,/etc/httpd/modules所以LoadModule失败了。

如何将 php 模块添加到 apache?php 网站提到从源代码构建它。但是我需要通过 RPM 来管理它。还有其他方法吗?

以下是我已经安装的 httpd RPM:

httpd-tools-2.2.15-30.el6.centos.x86_64
httpd-2.2.15-30.el6.centos.x86_64
httpd-devel-2.2.15-30.el6.centos.x86_64

以下是我安装的 php RPM:

php-xml-5.5.13-2.el6.remi.x86_64
php-pecl-jsonc-1.3.5-1.el6.remi.5.5.x86_64
php-gd-5.5.13-2.el6.remi.x86_64
php-pecl-memcached-2.2.0-2.el6.remi.5.5.x86_64
php-mbstring-5.5.13-2.el6.remi.x86_64
php-process-5.5.13-2.el6.remi.x86_64
php-cli-5.5.13-2.el6.remi.x86_64
php-common-5.5.13-2.el6.remi.x86_64
php-pecl-zip-1.12.4-1.el6.remi.5.5.x86_64
php-pecl-msgpack-0.5.5-4.el6.remi.1.x86_64
php-pgsql-5.5.13-2.el6.remi.x86_64
php-pecl-sqlite-2.0.0-0.4.svn332053.el6.remi.5.5.x86_64
php-mysqlnd-5.5.13-2.el6.remi.x86_64
php-pecl-apcu-4.0.4-1.el6.remi.5.5.x86_64
php-pecl-memcache-3.0.8-2.el6.remi.5.5.x86_64
php-pear-1.9.4-27.el6.remi.noarch
php-pdo-5.5.13-2.el6.remi.x86_64
php-pecl-igbinary-1.1.2-0.5.git3b8ab7e.el6.remi.1.x86_64
php-mcrypt-5.5.13-2.el6.remi.x86_64
php-pecl-mongo-1.5.2-1.el6.remi.5.5.x86_64

答案1

如果你只是安装,mod_php你就会得到正确的包。记住重新开始随后是 Apache。

相关内容