php5.20+对php.ini的排序寻址顺序
http://www.php.net/manual/zh/configuration.php
Run php 4 and php 5.2.x on the same machine with IIS 6.0 as ISAPI.
1. Extract the ZIP packages of both php 4 & php 5 (not the Windows Installer) to c:\php4 & c:\php5 respectively
2. Setup the corresponding php.ini files in c:\php4 and c:\php5
3. Add the Web Service Extensions for php4 and php5. For php4 use c:\php4\sapi\php4isapi.dll, php5 use c:\php5\php5isapi.dll
4. Add the following registry keys:
HKEY_LOCAL_MACHINE\SOFTWARE\PHP\5\IniFilePath -> c:\php5
HKEY_LOCAL_MACHINE\SOFTWARE\PHP\IniFilePath -> c:\php4
5. Add c:\php4 to the PATH environment variable.
6. Associate each web site in IIS with the corresponding php version.
7. Reboot
Note: That should work, test with phpinfo() in each site. You may need to refer to the php documentation if we missed any other settings.
在以前搜索 php.ini 的路径顺序为:
· SAPI 模块所指定的位置(Apache 2 中的 PHPIniDir 指令,CGI 和 CLI 中的 -c 命令行选项,NSAPI 中的 php_ini 参数,THTTPD 中的 PHP_INI_PATH 环境变量)
· HKEY_LOCAL_MACHINE\SOFTWARE\PHP\IniFilePath(Windows 注册表位置)
· PHPRC 环境变量
· 当前工作目录(对于 CLI)
· web 服务器目录(对于 SAPI 模块)或 PHP 所在目录(Windows 下其它情况)
· Windows 目录(C:\windows 或 C:\winnt),或 –with-config-file-path 编译时选项指定的位置现在 PHPRC 环境变量由第三优先权变为第二优先权,高于Windows 注册表所指定的位置。
