Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

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

here's phpinfo() of my server:

when I login to the server as root and do sudo apt-get update and then sudo apt-get upgrade, let it run completely, all finishes OK.

When I try to run it again, it says that all is updated.

Yet, my php version is still 5.2.6. Can anyone help me why? How do I run a (better?) update?

EDIT: I did a sudo /etc/init.d/apache2 restart after the upgrade, of course.


What do I need to change in this file to be able to upgrade to squeeze?

#  /etc/apt/sources.list

# lenny
deb     lenny main contrib non-free
deb-src     lenny main contrib non-free

#  Security updates
deb lenny/updates  main contrib non-free
deb-src lenny/updates  main contrib non-free
share|improve this question
is this debian lenny? why do you need/want a newer version of php? do you need 5.3? are you just after something newer for the sake of it being newer? – stew Mar 24 '11 at 3:13
yes, I don't really need it, I just want to keep the system up to date, if possible – Richard Rodriguez Mar 24 '11 at 13:03
then I'd recommend sticking with what is in debian, as debian will be backporting security fixes to that version. if you switch to something outside of debian, you'll have to keep an eye out for security fixes yourself. alternatively, consider upgrading instead to the current version of stable: 6.0 aka squeeze, which would have 5.3. see:… – stew Mar 24 '11 at 13:09
could you please help me by answering my edit2 ? thx – Richard Rodriguez Mar 24 '11 at 19:37
up vote 2 down vote accepted

You can't update to a version higher than the ones available in configured repositories. Either add a repository with a higher version, or install it manually from a package or source.

share|improve this answer
What are the pros and cons of adding a repository with a higher version? – Richard Rodriguez Mar 24 '11 at 1:51
The pro is that you get the higher version. The con is that you may get higher versions of other packages which you may or may not want. – Ignacio Vazquez-Abrams Mar 24 '11 at 1:52
No chance of any incompatibilities happening ? I mean with other 'parts of the system'. It's an online server with more than 100 websites running on it, I wouldn't like to risk breaking it. – Richard Rodriguez Mar 24 '11 at 1:55
Of course there are chances of incompatibilities. PHP is not always backwards-compatible. – Ignacio Vazquez-Abrams Mar 24 '11 at 2:27

I needed to upgrade debian completely to a newer version, then I 'received' the latest php version.

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.