“This tutorial shows how to install and configure Apache2 with PHP5 and PHP4 enabled at the same time. Because it is not possible to run both PHP5 and PHP4 as Apache modules, we must run one of them as CGI, the other one as Apache module. In this document I will use PHP5 as Apache module and PHP4 as CGI, and I will describe the setup for the Linux distributions Debian Sarge and Ubuntu 5.10.”
Gentoo Linux:
http://www.gentoo.org/proj/en/php/php-upgrading.xml
running php as a cgi is a bad idea for security and performance.
this is only needed as php5 isn’t as backwardly compatible as it should be, and the mysqli system is causing so many problems.
running php as a cgi is a bad idea for security and performance.
this is only needed as php5 isn’t as backwardly compatible as it should be, and the mysqli system is causing so many problems.
You got it backwards. Running PHP as a CGI is much safer than as a module since you can restrict CGI much more than the standard users restrictions on Apache modules (Yes, even that “nobody” account might be a compromise), but you are right regarding performance. I had a few customers cancelling their hosting accounts in the past because of this drawback.
And running two versions of PHP is hardly new. The changes between PHP3 and PHP4 were significant enough to warrant both running on my servers a few years ago. There were too many functions deprecated and most customers were unwilling to update their code, even despite the many benefits that it could bring. On a shared hosting environment, there is no way that one can expect all of the customers to update their stuff in order to move on. Unfortunately, most sysadmins have to deal with that on a regular basis.