I am doing php compilation now it is defaulted to php5 do I really need to install php4 too.

or

Can PHP5 work with most applications out there?

Thanks

Click to expand...

No, you DO NOT need to install PHP 4!

(In fact, I recommend strongly that you only install PHP 5!)

PHP 4 is officially past the end of life and is no longer updated or supported
and there is really no technical reason to have PHP 4.

thewebhosting said:

I suggest you to install both php4 as well as php5 as some applications cannot run on php5. Hence, need to switch over to php4.

Click to expand...

On the contrary, very nearly every PHP program ever written will work perfectly on PHP 5 without any modifications whatsoever and PHP 5 is fully backwards compatible to PHP 4 so there is absolutely no reason whatsoever to run pure PHP 4 and that goes double given it is past EOL (End of Life).

There is only 2 methods and 3 rarely used functions which must be rewritten to get an application using those to work properly under PHP 5 and if you found any program using those, you are talking about the extremely rare exception as I think I've only seen one program in the past decade where that was the case and the modification to fix that took all of 5 seconds.

There was actually never any reason to run both PHP 4 and PHP 5 together and doing so actually caused a lot of compatibility problems but administrators early on several years ago made the mistake of running both under the idea that there were incompatibilities that didn't really exist. The reason for the misconception was that MySQL 5 had been released roughly around the same time as PHP 5 and many people confused the two. While PHP 5 had no significant backwards compatibility issues and worked fine with most all original PHP 4 scripts out there, MySQL 5 did not and often required extensive code modifications to get programs designed for MySQL 4 to work with the newer MySQL 5 database. Since PHP and MySQL coincidentally had the same version numbers at the time, a lot of people got confused.

All of that was a number of years ago though and is long since old news!