php的wamp環境搭建問題

來源:互聯網
上載者:User
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 解決

  • 相關文章

    聯繫我們

    該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

    如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

    A Free Trial That Lets You Build Big!

    Start building with 50+ products and up to 12 months usage for Elastic Compute Service

    • Sales Support

      1 on 1 presale consultation

    • After-Sales Support

      24/7 Technical Support 6 Free Tickets per Quarter Faster Response

    • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.