Window平臺中 php壓縮包版、apache壓縮包版 、mysql.壓縮包版或運行安裝版,配置問題處理集錦

PHP問題處理集錦

 

環境Window10中 php壓縮包版、apache壓縮包版 、mysql.壓縮包版或運行安裝版。

 

問題1

在cmdzhong 用httpd -t 檢查,提示:

AH00558: httpd: Could not reliably determine the server's fully qualified domain name, using fe80::4de2:6c46:aec1:6a57. Set the 'ServerName' directive globally to suppress this message

Syntax OK
 

用httpd -k install安裝服務,提示:

AH00558: httpd: Could not reliably determine the server's fully qualified domain name, using fe80::4de2:6c46:aec1:6a57. Set the 'ServerName' directive globally to suppress this message

 

處理:

在httpd.conf中,搜索

#ServerName www.example.com:80

在其後加一句:

ServerName localhost:80

再重新啓動apache 服務即可


問題2:PHP版本和Apache版本的選擇有時很關鍵,這是困惑我許久的一個情況:apache服務器能正常啓用,php代碼也能正常運行,MySQL也可使用,但是php代碼無法正常連接操作MySQL數據庫。

用phpinfo()函數測試,顯示如下圖:

這時,要考慮PHP版本和Apache版本組合是否不恰當,更換成熟的版本組合試試,如:https://download.csdn.net/download/cnds123/12270209

 

 

 

 

 

 

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章