0

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?

2
  • 2
    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. Dec 1, 2010 at 10:43
  • Note that RHEL 5.6 (and upcoming CentOS 5.6) includes PHP 5.3.3 packages (as php53-*). See rhn.redhat.com/errata/RHEA-2011-0069.html
    – mattdm
    Jan 24, 2011 at 20:24

4 Answers 4

1

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.

1

did you restart apache?

service httpd restart
0

Check which libphp5.so 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/libphp5.so>. If the file does not belong to any package then you should point you Apache configuration to the libphp5.so shipped through the rpm package.

0

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

http://iuscommunity.org/

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .