2
我在Windows 8.1機器上設置了開發環境。在Windows 8.1上安裝PHP 5.6後,Apache 2.2無法啓動
我成功安裝了Apache 2.2,並下載了php-5.6.3-Win32-VC11-x86。
添加以下線在httpd.conf文件的末尾
PHPIniDir "C:/PHP5"
LoadModule php5_module "C:/PHP5/php5apache2_4.dll"
AddType application/x-httpd-php .php
AddHandler application/x-httpd-php .php
我還添加了
application/x-httpd-php .php
到myme.types
文件
如果我註釋掉PHPIniDir
或LoadModule
Apache會正常啓動。
此外,所有擴展上PHP.ini
文件註釋掉,並擴展目錄設置爲
extension_dir = "ext"
任何幫助將非常感激。
編輯1: 錯誤日誌中的唯一事情是關於服務器shutdow
[Sun Nov 23 14:56:07 2014] [notice] Parent: Received shutdown signal -- Shutting down the server.
[Sun Nov 23 14:56:07 2014] [notice] Child 6192: Exit event signaled. Child process is ending.
[Sun Nov 23 14:56:08 2014] [notice] Child 6192: Released the start mutex
[Sun Nov 23 14:56:09 2014] [notice] Child 6192: All worker threads have exited.
[Sun Nov 23 14:56:09 2014] [notice] Child 6192: Child process is exiting
[Sun Nov 23 14:56:09 2014] [notice] Parent: Child process exited successfully.
感謝您的幫助。所以你有什麼建議?升級Apache或降級PHP? – Morez 2014-11-23 17:01:21
我會建議升級Apache,這樣你就可以使用最新的PHP版本和最新的PHP功能。除非你特別想用較老的php版本進行測試,因爲你想確保你的代碼也運行在較老的php版本上。 – user254948 2014-11-23 17:07:16
謝謝,現在一切正常,我已經升級到Apache 2.4(並將PHPIniDir放在最後一行)。 – Morez 2014-11-24 03:57:52