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

I am experienced in PHP, but I have never installed it. We have just upgraded onto a VPS from 1and1 and now we need to upgrade php ourselves apparently. We want to go from 5.1.4 to the latest, but don't know where to start. I looked here

But I can't find the apxs path.

I was hoping to find someone who had experience of doing this on 1and1 vps, but failing that here is the link that shows my phpinfo,

I was hoping you may be able to direct me from that. I am willing to answer as many questions to get this clear, as I know the first time will be the hardest.

share|improve this question
up vote 3 down vote accepted

I'm not trying to replace EightBitTony's answer, because it's excellent, but if you decide you want to push ahead with getting a later PHP on Centos 5, you do have some options.

There are a set of packages in the regular updates repository called php53*. If you would prefer them, uninstall your current PHP packages (yum remove php php-cli php-xml php-common...), and install the corresponding php53 packages (yum install php53 php53-cli php53-xml php53-common...).

You may wish to check that there are corresponding 5.3 packages for everything you're currently running before doing the above.

share|improve this answer
Thanks, as I said, ages since I had to worry about it on CentOS (long live Debian) but I knew someone would know how! – EightBitTony Aug 23 '11 at 17:59
Where can I check for the packages? – Liam Bailey Aug 27 '11 at 9:56
They're in the standard updates repository, which should be active on every CentOS install. – MadHatter Aug 27 '11 at 21:53
I am a complete begginer to all this, how do I access the updates repository? – Liam Bailey Aug 28 '11 at 11:13
It's already there in your /etc/yum.repos.d/CentOS-Base.repo. Do a yum list php53* to confirm that you can see them (you should get a list of about 20 php53 packages). – MadHatter Aug 29 '11 at 12:06

Upgrading PHP should simply be a matter of using your Linux's package manager.

If it's Debian (or Ubuntu), then apt-get, if it's CentOS then yum, etc.

PHP 5.1 is pretty old, what Linux distribution did you get on your VPS?

Edit: Ah, I see from your phpinfo it's CentOS. Probably CentOS 5? The versions of code on CentOS 5 are pretty far behind. You either need to find an more up-to-date repository (see MadHatter's response), or download all the source files yourself and build new versions. If you're asking this question, I suggest you don't try building from source.

It's a long time since I had to go looking for newer versions of stuff on CentOS so I'll let someone else answer. The other option is move to CentOS 6 if 1and1 will let you (probably still back level, but better than 5).

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.