Use php5 and php4 on Same Apache Server
A while back at work I needed to use php5 for a site that was hosted on a machine that uses Apache’s mod-php4. Since I needed to keep php4 for the rest of the sites hosted on this machine, I needed to find a way to enable php5 for just one virtual host. It turned out to be a relatively easy thing to do. I just needed to install the php5 CGI package and tell Apache to use CGI for php files on that particular virtual host. Here is how I accomplished this on our Debian server: