2010-02-01 59 views
0

我在w2k8 64bit IIS7上安裝了PHP/FastCGI和Mysql。簡單連接到MySQL的PHP​​超時 - 在win2k8 64bit IIS 7/FastCGI php - 新安裝

PHPinfo()加載正常,MySQL擴展已正確安裝。 PHP顯示回顯命令。

MySQL也可以通過MySQL命令行客戶端正常工作。我可以創建數據庫,表格和用戶。

然而,MySQL只是簡單地連接mysql_connect(「localhost」,「user goes here」,「pass goes here」),MySQL不響應並且PHP腳本超時。

我想念win2k3。

任何想法?

PHP Warning: mysql_connect() [function.mysql-connect]: [2002] A connection attempt failed because the connected party did not (trying to connect via tcp://localhost:3306) in C:\inetpub\wwwroot\test.php on line 9 PHP Warning: mysql_connect() [function.mysql-connect]: A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond. in C:\inetpub\wwwroot\test.php on line 9 PHP Fatal error: Maximum execution time of 60 seconds exceeded in C:\inetpub\wwwroot\test.php on line 12

回答

3

您可以試試127.0.0.1而不是localhost?似乎是right-out bug

+0

是的!工作!爲什麼發生這種情況?它是否應該固定在本地主機上工作? – user123212 2010-02-01 21:53:10

+0

@webdevbytes:看到我編輯的答案。 – 2010-02-01 21:56:18

+0

感謝您的幫助。該網站需要實時提供響應。 – user123212 2010-02-01 22:01:20