要在IIS6上使用高版本PHP,必須安裝fastCGI擴展,
Microsoft FastCGI Extension for IIS 5.1 and 6.0
然後讓你的IIS6支持fastCGI即可。
然後設定一下php.ini中的CGI and FastCGI參數:
fastcgi.impersonate = 1
fastcgi.logging = 0
cgi.fix_pathinfo=1
cgi.force_redirect =0
cgi.rfc2616_headers=1
然後制作一個批處理文件,運行一下代碼:
c %windir%\system32\inetsrv\fcgiconfig.js -add -section:"PHP" ^
-extension:php -path:"C:\PHP\php-cgi.exe"
將C:\PHP\php-cgi.exe替換成自己的安裝路徑!
如果你在使用phpMyadmin 3.1.0rc版,需要將.libraries/select_lang.lib.php 則需要將147,148行的
if (($envType == 1 && eregi('^(' . $expr . ')(;q=[0-9]\\.[0-9])?$', $str))
|| ($envType == 2 && eregi('(\(|\[|;[[:space:]])(' . $expr . ')(;|\]|\))', $str))) {
更換為:
if (($envType == 1 && preg_match('^(' . $expr . ')(;q=[0-9]\\.[0-9])?$', $str))
|| ($envType == 2 && preg_match('(\(|\[|;[[:space:]])(' . $expr . ')(;|\]|\))', $str))) {
否則會報錯:
in .\libraries\select_lang.lib.php#147
eregi() is deprecated
Backtrace
.\libraries\select_lang.lib.php#147: eregi()
.\libraries\select_lang.lib.php#81: PMA_langDetect(
string zh-cn,
integer 1,
)
.\libraries\select_lang.lib.php#361: PMA_langCheck()
.\libraries\common.inc.php#560: require_once(.\libraries\select_lang.lib.php)
.\index.php#34: require_once(.\libraries\common.inc.php)
另外注意:在IIS上安裝PHP5.3.1,官方推薦Non-thread-safe build of PHP
下載地址:
PHP for Windows: Binaries and Sources Releases.
詳細介紹:http://www.php.net/manual/en/install.windows.iis6.php