Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems. 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

Apologies in advance - I'm not a good Linux user by any stretch of the imagination.

I have a CentOS 5.7 dedicated server on which I host a few websites.

I currently have php 5.2.10 installed, but I'd like to update to 5.3.9.

I tried to update manually, and php -v displays 5.3.9. However, when I phpinfo(), it displays 5.2.10.

First problem

I followed these instructions for updating PHP manually:

  • Logged in as root
  • wget the latest PHP installation
  • tar zxvf php-.....gz
  • cd php-....
  • ./configure
  • make
  • apachectl stop
  • make install
  • apachectl start

I also tried restarting httpd by /usr/sbin/httpd restart.

php -v shows the latest version of PHP but phpinfo() on a php page shows the old version.

Any idea what the problem there might be?

Second Problem

If I try to yum update php, it says this:

Loaded plugins: fastestmirror

Loading mirror speeds from cached hostfile

  • epel: mir01.syntis.net

  • rpmforge: ftp-stud.fht-esslingen.de

Excluding Packages in global exclude list


Setting up Update Process

No Match for argument: php

No package php available.

No Packages marked for Update

I've tried yum clean all and adding rpmforge repositories - same outcome!

So, secondly, does anyone have any idea why I can't update php from yum? I'd like to be able to do that in future so that I can quickly and easily keep php and mySQL up to date.

Thanks in advance,

share|improve this question
What are the outputs of grep exclude /etc/yum.conf and yum search php? As for the different versions, it sounds like you also need to update httpd's PHP module. – Chris Down Feb 1 '12 at 18:25
up vote 2 down vote accepted

If a repository that contains it is enabled, but this still happens, it is most likely excluded in /etc/yum.conf. Removing it should solve the issue.

share|improve this answer
Agreed PHP 5.3.9 is not available in the CentOS 5.7 unless you downloaded from other repo's. – wojox Feb 1 '12 at 20:40

Compiling from source is the best way because it's always the latest source. When I compile php for my box it give me always a wrong name. I need to fix it manually for apache: ln -sf /usr/lib/apache2/libphp5.so /usr/lib/apache2/mod_php5.so. But it can depends on your configuration. Did you run make test after make? It should show you some more information.

share|improve this answer

Have you tried yum update ? this will update all packages that are installed.

share|improve this answer
It seemed to update an awful lot... but not php! – dunc Feb 1 '12 at 19:07

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.