Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

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
/usr/local/bin/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
add comment

3 Answers

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.

Re: http://www.php.net/manual/en/install.unix.apache.php

share|improve this answer
add comment

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
add comment

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

share|improve this answer
add comment

Your Answer

 
discard

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.