3

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

http://www.php.net/manual/en/install.unix.apache2.php

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, http://spotblue.co.uk/phpinfo.php

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.

2 Answers 2

3

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.

5
  • Thanks, as I said, ages since I had to worry about it on CentOS (long live Debian) but I knew someone would know how! Commented Aug 23, 2011 at 17:59
  • Where can I check for the packages? Commented Aug 27, 2011 at 9:56
  • They're in the standard updates repository, which should be active on every CentOS install. Commented Aug 27, 2011 at 21:53
  • I am a complete begginer to all this, how do I access the updates repository? Commented Aug 28, 2011 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). Commented Aug 29, 2011 at 12:06
3

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).

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.