As you probably know, CGI is not scalable and we needed to scale in PHP4 and PHP5 since we needed to server millions of hits in both configurations.
Read what to do here
1. Run Apache
2. Use mod_php for both PHP versions.
3. Run eAccelerator with both PHP versions.
4. Use as many Ubuntu packages as possible to ease maintenance issues and easily deploy on multiple servers.
5. Use Ubuntu 6.06.1 LTS