PHP4 and PHP5 w/ IIS6.0 and Win Server 2003 (HKEY_LOCAL_MACHINE\...\IniFilePath vs. PATH vs. PHPRC) concurrent installation
Posted on 2004-09-05
Windows Enterprise Server 2003
I would like to create a nice integration development environment in the same machine that supports IIS -> PHP -> (Mysql or MSSQL) in the same server
I've had a very hard time getting PHP4 and PHP5 running concurrently. The closest that I was able to get it was to
Unpack all php 4 into c:\httpd\php4
copy all files from c:\httpd\php4\sapi\* and dll\* into c:httpd\php4 directory (i.e. move up one directory)
Unpack all php 5 into c:\httpd\php5
Set the administration PATH env variable to PATH=...;c:\httpd\php5\;c:\httpd\php4
Go to IIS -> Web Service Extensions - > Add New Extension (1) for PHP pointing to c:\httpd\php4\php4isapi.dll and (2) for PHP5 pointing to c:\httpd\php5\php5isapi.dll
Go to IIS -> Web Sites -> [Properties] -> Home Directory -> Configuration... -> add mappings .php5 to php5isapi.dll and .php to php5isapi.dll
edit php.ini-recommended on each directory (i.e. php4 and php5) only uncommented several dynamic extensions and, cgi.force_redirect = 0, and extension_dir = "c:\httpd\[php4 | php5]\ext\"
While I can get both php to respond correctly, I cannot see any dynamic extensions loaded.
Under the above arrangement which php.ini is being use for php5? At one point I deleted php.ini and it made no difference.
I have opted to set PHPRC = c:\httpd\php5 which does ready the php.ini and loads my extension correctly. However I break php4. What to do?