Apache php安裝配置好後,目前mysql還沒有安裝,開啟Apache時,彈出兩次warning PHP Startup警告後Apache開啟。
本機是通過路由器和光纖貓串連網線上網,Windows XP作業系統。
Apache httpd.conf檔案配置是:
Listen 12.34.56.78:80
Listen 80
LoadModule php5_module D:/wamp/php/php5apache2_4.dll
PHPIniDir D:/wamp/php
ServerName localhost:80
AddType application/x-httpd-php .php
php.ini檔案配置:
extension_dir = "D:/wamp/php/ext"
extension=php_curl.dll
extension=php_gd2.dll
extension=php_mbstring.dll
extension=php_mysql.dll
extension=php_mysqli.dll
extension=php_pdo_mysql.dll
extension=php_pdo_odbc.dll
extension=php_soap.dll
extension=php_sockets.dll
date.timezone =Asia/Shanghai
Apache錯誤記錄檔:
AH00558: httpd.exe: Could not reliably determine the server's fully qualified domain name, using 192.168.x.x. Set the 'ServerName' directive globally to suppress this message
PHP Warning: PHP Startup: in Unknown on line 0
[Thu Oct 15 10:48:13.312500 2015] [mpm_winnt:notice] [pid 4044:tid 1668] AH00354: Child: Starting 64 worker threads.
將所有dll都註冊了一遍,還是那樣。
請各位老師指教到底哪裡有錯誤?謝謝!
回複內容:
Apache php安裝配置好後,目前mysql還沒有安裝,開啟Apache時,彈出兩次warning PHP Startup警告後Apache開啟。
本機是通過路由器和光纖貓串連網線上網,Windows XP作業系統。
Apache httpd.conf檔案配置是:
Listen 12.34.56.78:80
Listen 80
LoadModule php5_module D:/wamp/php/php5apache2_4.dll
PHPIniDir D:/wamp/php
ServerName localhost:80
AddType application/x-httpd-php .php
php.ini檔案配置:
extension_dir = "D:/wamp/php/ext"
extension=php_curl.dll
extension=php_gd2.dll
extension=php_mbstring.dll
extension=php_mysql.dll
extension=php_mysqli.dll
extension=php_pdo_mysql.dll
extension=php_pdo_odbc.dll
extension=php_soap.dll
extension=php_sockets.dll
date.timezone =Asia/Shanghai
Apache錯誤記錄檔:
AH00558: httpd.exe: Could not reliably determine the server's fully qualified domain name, using 192.168.x.x. Set the 'ServerName' directive globally to suppress this message
PHP Warning: PHP Startup: in Unknown on line 0
[Thu Oct 15 10:48:13.312500 2015] [mpm_winnt:notice] [pid 4044:tid 1668] AH00354: Child: Starting 64 worker threads.
將所有dll都註冊了一遍,還是那樣。
請各位老師指教到底哪裡有錯誤?謝謝!
逐一關閉php擴充,發現是php_curl載入時報錯,而且phpinfo()中curl沒有載入上
解決辦法:
第一種方法:將php安裝目錄下的libeay32.dll,libssh2.dll,php5ts.dll,php_curl.dll,ssleay32.dll 複製到system32目錄下
第二種方法:在httpd.conf 中載入如下依賴檔案
LoadFile D:/wamp/php/php5ts.dll
LoadFile D:/wamp/php/libeay32.dll
LoadFile D:/wamp/php/ssleay32.dll
LoadFile D:/wamp/php/libssh2.dll
這樣配置後,Apache開啟時不再彈出warning PHP Startup:
第一個警報可以用 ServerName 127.0.0.1 解決