Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have a web server running CentOS 5 and it was running php 5.1.6 so I downloaded and compiled the source for 5.2.10 and restarted the server and phpinfo() still returns 5.1.6.

But when i do the version switch on this PHP i get

$ /usr/local/bin/php -v
PHP 5.2.9 (cli) (built: May 26 2009 10:17:42) 
Copyright (c) 1997-2009 The PHP Group
Zend Engine v2.2.0, Copyright (c) 1998-2009 Zend Technologies

There was the almost exact question here. Almost every answer points to addressing this by doing the following in the httpd.conf file:

LoadModule php5_module /usr/lib64/httpd/modules/

I did that and when I restart apache I get the following:

Stopping httpd:                                            [  OK  ]
Starting httpd: [Fri Sep 11 14:59:28 2009] [warn] module php5_module is already loaded, skipping
                                                           [  OK  ]

This obviously means that the php module is being called twice, but a search of the httpd.conf file does not reveal a second call to the module. Could php module be called from some place else? Where? Anyone have an idea what I can try next? It will be greatly appreciated.

share|improve this question

Look for a PHP loader in an /etc/apache/conf.d or /etc/httpd/conf.d type directory. You can probably track down where PHP is coming in by looking through the Include directives in your httpd.conf.

share|improve this answer

In addition to the httpd.conf file, the CentOS Apache setup loads configuration directives from files placed in /etc/httpd/conf.d. Check if you have a file named /etc/httpd/conf.d/php.ini or something similar.

If you do, it probably means that you have additional version of PHP installed from RPM. Consider removing it to prevent additional conflicts.

share|improve this answer

Did you uninstall the php package from CentOS before doing the install of the new version? Also check where the / file was save after installing.

I'd recommend to install the PHP 5.2 rpm package from the recently released Rackspace repository .

share|improve this answer

Can you try rpm -qa|grep php*

rpm -qa|grep php*

You'll get some thing like this results then u can remove the rpm which you need to update or upgrade.

yum remove phonon-4.3.1-6.fc11.i586 -y

then you can check u r repo file at /etc/yum.repos.d/*.repo then you can run

yum update -y


yum install phonon-5.3.1-6.fc11.i586 -y

it will work

share|improve this answer

You have two lines that are including on your httpd.conf. Just open it in your favourite editor and search for php5, and then keep searching till you find all instances of the line.

Make sure you are only loading the module you actually want to use - and of course, only once.

Once often gets this error if you are upgrading and you use the install process that came with the PHP that you are upgrading too, which tries to be nice and adds the include line for for you, but does not remove the pre-existing one because it is in a different place or for whatever reason it did not notice that it was in the file.

share|improve this answer

You need to check /etc/httd/conf.d directory. All configuration file ending with .conf are included to main apache configuration. This is a duplicate. Before compiling new PHP you should remove traces of old one using

yum remove php\*
share|improve this answer
up vote 0 down vote accepted

I had to do yum remove, then update my yum repositories to include a repository with newer version of PHP and then I was able to update my PHP that way as opposed to downloading the latest PHP from the PHP website, unwrapping, and then installing.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.