Apache missing php module

aspiringCodeArtisan asked:

I installed httpd v2.2.15 and php v5.5.13 via yum. I first noticed the problem when I tried to access my site and it displayed the PHP code. Then I discovered that there is no php module in /etc/httpd/modules so the LoadModule fails.

How can I add the php module to apache? the php website refers to building it from source. However I need to manage this via RPMs. Are there any alternative ways of doing this?

Here are the httpd RPMs I’ve installed:

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

Here are the php RPMs I’ve installed:

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

My answer:


If you simply install mod_php you will get the correct packages. Remember to restart Apache afterward.


View the full question and answer on Server Fault.

Creative Commons License
This work is licensed under a Creative Commons Attribution-ShareAlike 3.0 Unported License.