To be able to restore some old personal PHP projects from around 2004 I needed to recreate the environment in which they were built. Otherwise I would probably have to make changes to the source code in order to get them working.
Recreating the environment means I needed to install a server with roughly the same software, meaning Debian 3.1 “Sarge”, Apache 2.0.54, MySQL 4.0.24 and PHP 4.3.
So I downloaded the network installer ISO image for Debian 3.1 “Sarge” and created a virtual machine using VirtualBox. Make sure you add a virtual hard disk under the IDE controller, I don’t think SATA was supported by default at the time. At my first attempt, I forgot to do this and I got the error “No partitionable media were found.” and I had to abort the setup.
During the setup you get the option to change the APT repository file, which you must do, or you won’t be able to install any packages.
Add the following line to sources.list:
deb http://archive.debian.org/debian/ sarge main contrib
And in case you need to be able to install backports, add the following line to source.list:
deb http://archive.debian.org/debian-backports sarge-backports main