CentOS 5.9 Apache mod_php issues

apache-2.2centos5php5

I'm currently using NGINX with FastCGI and PHP 5.4 on the production server.

Lately we've been getting mass CPU usage spikes and I'd like to spend a few days using Apache and mod_php again to see if the problem might be isolated to NGINX/FCGI.

The server is new, conf copied from previous server.

The problem is, I don't seem to have mod_php installed and can't find it in any repos. I have searched and searched but the only info I can find is how to build PHP and Apache from source.

Granted, its been a few years since I have installed Apache/PHP etc from Yum, but surely CentOS 5.9 should have a package?

Thanks.

EDIT: Additional info;

If I try to install any php component via yum (php-xcache-admin or php-pdo etc) I get a heap of dependency errors.

libphp5.so is not on the box. updatedb && locate gives me nothing.

EDIT 2: Updating with additional info;

[root@ded410 ~]# rpm -qa|grep php
php-gd-5.4.13-1.el5.remi
php-mbstring-5.4.13-1.el5.remi
php-xcache-3.0.1-1.el5.remi
php-common-5.4.13-1.el5.remi
php-fpm-5.4.13-1.el5.remi
php-cli-5.4.13-1.el5.remi
php-pdo-5.4.13-1.el5.remi
php-mysql-5.4.13-1.el5.remi
php-xml-5.4.13-1.el5.remi
php-pecl-memcache-3.0.7-5.el5.remi
php-pecl-mongo-1.3.5-1.el5.remi
php-pecl-sqlite-2.0.0-0.1.svn313074.el5.remi
newrelic-php5-common-3.2.5.147-1
newrelic-php5-3.2.5.147-1
php-pear-1.9.4-12.el5.remi.1
php-pecl-igbinary-1.1.2-0.1.git3b8ab7e.el5.remi
php-pecl-memcached-2.1.0-4.el5.remi.1
php-mcrypt-5.4.13-1.el5.remi


[root@ded410 ~]# ls -1 /etc/yum.repos.d/
CentOS-Base.repo
CentOS-Debuginfo.repo
CentOS-Media.repo
CentOS-Vault.repo
dell-omsa-repository.repo
epel.repo
epel-testing.repo
mirrors-rpmforge
mirrors-rpmforge-extras
mirrors-rpmforge-testing
newrelic.repo
nginx.repo
r1soft.repo
remi.repo
rpmforge.repo

Best Answer

The required libphp5.so should be part of your php-package. Check /etc/httpd/modules/ for it.

As you have PHP 5.4 installed on a CentOS 5, this is definitely not a package from the standard repo (perhaps you compiled it yourself?), so it's possible you don't have the apache module compiled with it. In this case, you would have to recompile php or get a another php package including the apache module.

EDIT:

It seems your PHP has been installed from remi-repo. As you have only installed php-fpm, there's no apache module. Try to additionally install the standard php-package from remi which should include the module:

yum install php --enablerepo=remi 
Related Topic