Perfect Debian Setup is a very handy little article.

One item of note however is that Debian Sarge doesn’t support PHP5 even in the unstable packages so you will need to use the following technique to get the PHP5 goodies from a Debian developers repository. You can browse his directory and see what is on offer at: There is also another source with less recent and a less complete collection of packages DotDeb, but as it is out of date I would not bother with it.

Add to /etc/apt/sources.list
deb php5 sarge

Update your package list
apt-get update

Install the modules you need (below is a base install add other modules as you see fit)
apt-get install php5 libapache2-mod-php5

Kick over Apache
/etc/init.d/apache2 restart

If you wish to see the packages available from bash then
apt-cache search php5

Other useful Debian server setup advice: