tags:

views:

419

answers:

2

I have a server that hosts a bunch of sites in PHP5. I have an old site that was designed for PHP4 that I also need on the server.

Originally, I was just going to port the code to PHP5, but have discovered that process is more intense that I have time for so I need to have PHP4 and PHP5 running on the same Server 2008 box.

I think this should be fairly easy if I can set which PHP.ini file to load. I remember reading somewhere about how you could set which PHP.ini file PHP would load, but I can't seem to find that article anywhere.

Does anyone know how to run PHP4 and PHP5 parallel on IIS7, or how to specify which PHP.ini file to load for different version of PHP?

Thanks, Ryan.

A: 

Map the different versions of php to different file extensions.

i.e. php4, php5

More specifically, follow the steps listed here

Chris Ballance
But php.ini by default gets loaded from the windows directory so you need to be able to set which PHP.ini file the different versions will load.
Ryan Smith
+1  A: 

I haven't run php4 and php5 in parallel, but for the php.ini question: PHP should look for the PHP.ini file in

  • the php directory
  • the windows directory (%windir%)

So if you make sure there is no php.ini in your windows directory (I have heard somewhere that it shouldn't also be in your path, but I don't have any evidence for that) and only in your php directory, you should be fine.

wilth