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

The server was running PHP 5.1.6, so we have updated it through running yum update. This updated PHP to 5.3.3 and running php -v shows this version. However, after restarting the apache, phpinfo() reports that the PHP version is still 5.1.6.

Are there somehow two versions of PHP on the server? What is going on?

share|improve this question
Where did you get this version of PHP 5.3.3? Because looking in the master mirrors, CentOS Plus, and EPEL, I don't see anything but 5.1.6. Perhaps whomever is providing this package has instructions on how to use it, what other packages need to be installed, etc...? FYI: Looks like CentOS 6 will have PHP 5.3.3, but until then I'd probably use Ubuntu LTS instead. – Sean Reifschneider Dec 1 '10 at 10:43
Note that RHEL 5.6 (and upcoming CentOS 5.6) includes PHP 5.3.3 packages (as php53-*). See – mattdm Jan 24 '11 at 20:24

You also need to upgrade the Apache httpd module for PHP. Usually there are three packages for PHP: one for CLI, one for FastCGI and CGI, and one for mod_php.

share|improve this answer

did you restart apache?

service httpd restart
share|improve this answer

Check which is loaded into your Apache through the LoadModule directive. Then see if this file is part of your php5-package (not sure what's it's name for centos): rpm -qf <path/to/>. If the file does not belong to any package then you should point you Apache configuration to the shipped through the rpm package.

share|improve this answer

I personally use the IUS project for my CentOS packages. PHP and MySQL is kept bang up to date.

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.