This tutorial covers the setup of PHP 5.3.0/Lighttpd on Debian (lenny) with imap, mysql, mysqli, sqlite3, ImageMagick and mycrypt support.
For this tutorial I will assume you are logged in as root this is not advised.
First we need to install the webserver:
aptitude install lighttpd
Now we install the packages needed for mysql and mysqli support. You will be promoted to enter a mysql root password – please use a strong password.