I am currently using PHP 4.2 with Apache version 1.3 and my web pages were running since long with these software versions. Now I have to shift the server to a new machines and I am facing problems with new software versions. what can be the best possible options to migrate to new server with latest versions of php and apache without modifying php code? Any help will be appreciated
Keep the same settings on the new server for the beginning. Then update PHP to 5.0 for example and see if your site is working fine. And so on...
Eh... if your site (php code) crashes when you go to a newer version, your code is crap/outdated/vulnerable. Update the code. You're about 10-12 years behind on server versions...
As PoPSiCLe suggested above. You should definitely either opt to stay on an old machine or go ahead and update your code. You are actually using a vulnerable PHP version no longer being maintained.
You're way to out of date, might be worth looking at Cloudlinux to get hardened PHP for older code that will still work. Does the problem lie in the PHP version or Apache?