Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

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 Fedora Core 5 (yes, I know it's very old) and it was running PHP 5.1.6 so I downloaded and compiled the source for 5.2.9 and restarted the server and phpinfo() still returns 5.1.6.

$ which php

But when I do the version switch on this PHP installation 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

What may I have missed or how could I correct this?

share|improve this question

A number of things could've gone wrong. You could be loading the wrong shared library. Apache could be built with a static library of the older version of PHP. If you installed fedora with PHP/Apache support out of the box it could have the php binary in a non-standard place.

I'd first check httpd.conf to see if it's either a shared module, CGI, or statically library. If it's a shared module you need to rebuild PHP. If it's CGI then you'll just need to change the directory. If it's statically built you'll need to rebuild Apache.


share|improve this answer

Seems that you compiled with /usr/local prefix.

Your Apache is probably loading old PHP from it's default location. Grep though Apache .conf files looking for LoadModule php5_module and change it to load new module from /usr/local.

share|improve this answer

You should update the new PHP module for Apache as well. Make sure to verify in httpd.conf.

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.