2016-02-16 92 views
3

我嘗試通過以下步驟來開始我的HTTP服務:無法啓動Apache 2.4.18在Windows

  1. 啓動的EasyPHP DevServer 16.1

  2. 打開Dashboard 在本地機器上的127.0開幕.0.1:1111

  3. 嘗試使用Apache 2.4.18啓動HTTP服務器 用VC11編譯器和服務器打開Apache頁面 PHP版本5.6.17正在偵聽端口80.

  4. 點擊開始按鈕會導致執行很短 ,然後沒有結果。錯誤和訪問日誌都是空的。

任何建議表示讚賞。

+0

請訪問Apache日誌文件夾並選擇你所得到的錯誤做的,但如果沒有幫助,請包括他們在這裏。 – Shiva

回答

1

Windows 7 SP1盒子,EasyPhp-DevServer-16.1。

由於我有一個遷移網站,因此我決定在我的電腦上更新EasyPHP以開始使用最新版本的PHP,Apache,MySQL。也許我不應該...... TaskBar圖標和管理界面已經改變,沒有什麼像以前那樣工作。

但我很固執,我想讓它工作。所以我嘗試運行一些東西,但事實並非如此。下面是症狀,非常接近Richard's:

試圖啓動Apache 2.4.18,選擇PHP 7.0.2。點擊綠色的「開始」按鈕,它會變成紅色的「停止」按鈕。一切都好?不。點擊「錯誤日誌」按鈕,頁面會返回到之前的狀態,並顯示綠色的「開始」按鈕,錯誤日誌textarea中沒有任何內容。

好的,所以我選擇PHP 5.6.17並點擊「開始」。我有彈出窗口聲明例如「bz2:無法初始化模塊。模塊編譯與模塊API = 20131226。PHP編譯與模塊API = 20121212。​​這些選項需要匹配。」

按鈕變成紅色「停止」,並單擊「錯誤日誌」按鈕產生這樣的輸出:

PHP Warning: PHP Startup: bz2: Unable to initialize module\nModule compiled with module API=20131226\nPHP compiled with module API=20121212\nThese options need to match\n in Unknown on line 0 
PHP Warning: PHP Startup: gd: Unable to initialize module\nModule compiled with module API=20131226\nPHP compiled with module API=20121212\nThese options need to match\n in Unknown on line 0 
PHP Warning: PHP Startup: mbstring: Unable to initialize module\nModule compiled with module API=20131226\nPHP compiled with module API=20121212\nThese options need to match\n in Unknown on line 0 
PHP Warning: PHP Startup: mysql: Unable to initialize module\nModule compiled with module API=20131226\nPHP compiled with module API=20121212\nThese options need to match\n in Unknown on line 0 
PHP Warning: PHP Startup: mysqli: Unable to initialize module\nModule compiled with module API=20131226\nPHP compiled with module API=20121212\nThese options need to match\n in Unknown on line 0 
PHP Warning: PHP Startup: pdo_mysql: Unable to initialize module\nModule compiled with module API=20131226\nPHP compiled with module API=20121212\nThese options need to match\n in Unknown on line 0 
PHP Warning: PHP Startup: pdo_sqlite: Unable to initialize module\nModule compiled with module API=20131226\nPHP compiled with module API=20121212\nThese options need to match\n in Unknown on line 0 
PHP Warning: PHP Startup: sockets: Unable to initialize module\nModule compiled with module API=20131226\nPHP compiled with module API=20121212\nThese options need to match\n in Unknown on line 0 
PHP Warning: PHP Startup: sqlite3: Unable to initialize module\nModule compiled with module API=20131226\nPHP compiled with module API=20121212\nThese options need to match\n in Unknown on line 0 
PHP Warning: PHP Startup: xsl: Unable to initialize module\nModule compiled with module API=20131226\nPHP compiled with module API=20121212\nThese options need to match\n in Unknown on line 0 
[Mon Feb 22 16:51:45.788809 2016] [mpm_winnt:notice] [pid 3292:tid 236] AH00455: Apache/2.4.18 (Win32) PHP/5.6.17 configured -- resuming normal operations 
[Mon Feb 22 16:51:45.789809 2016] [mpm_winnt:notice] [pid 3292:tid 236] AH00456: Apache Lounge VC11 Server built: Dec 11 2015 11:26:53 
[Mon Feb 22 16:51:45.789809 2016] [core:notice] [pid 3292:tid 236] AH00094: Command line: '..\\eds-binaries\\httpserver\\apache2418x160222160722\\bin\\eds-httpserver.exe -d C:/BIN/EasyPHP-Devserver-16.1/eds-binaries/httpserver/apache2418x160222160722' 
[Mon Feb 22 16:51:45.797809 2016] [mpm_winnt:notice] [pid 3292:tid 236] AH00418: Parent: Created child process 2568 
Xdebug requires Zend Engine API version 220131226. 
The Zend Engine API version 220121212 which is installed, is outdated. 

因爲Apache似乎運行,我然後啓動MySQL的。然後我嘗試運行PHPMyAdmin。由此產生的消息:

phpMyAdmin - Error 
The mbstring extension is missing. Please check your PHP configuration. 

當然,由於此擴展沒有設法初始化!

因此,這裏有我的補充問題,理查德:

  1. 有什麼可以讓Apache既不啓動也不會寫任何日誌選擇PHP 7.0.2的時候?
  2. 當使用PHP 5.6.17啓動時,什麼會導致Apache無法初始化模塊?

感謝您的任何線索,

施格蘭


再次你好,

我找到了答案,以我自己的問題2.可能感興趣的其他人:

當我安裝EasyPHP-DevServer-16.1時,我沒有卸載EasyPHP-DevServer-14.1VC11。爲了在幾個月前有另一個開發工作,我已經修改了我的PATH環境變量以指向此版本中的php可執行文件。

現在我已經在PATH變量中刪除了這個路徑引用。我也退出EasyPHP TaskBar圖標。 這是重要的爲了這個工具忘記舊的PATH值。然後我重新啓動它,再次點擊DashBoard並啓動Apache。

現在的Apache和PHP 5.6.17順利啓動和錯誤日誌文件只包含:

[Mon Feb 22 17:16:20.295146 2016] [core:warn] [pid 6652:tid 236] AH00098: pid file C:/BIN/EasyPHP-Devserver-16.1/eds-binaries/httpserver/apache2418x160222160722/logs/httpd.pid overwritten -- Unclean shutdown of previous Apache run? 
[Mon Feb 22 17:16:20.313147 2016] [mpm_winnt:notice] [pid 6652:tid 236] AH00455: Apache/2.4.18 (Win32) PHP/5.6.17 configured -- resuming normal operations 
[Mon Feb 22 17:16:20.313147 2016] [mpm_winnt:notice] [pid 6652:tid 236] AH00456: Apache Lounge VC11 Server built: Dec 11 2015 11:26:53 
[Mon Feb 22 17:16:20.313147 2016] [core:notice] [pid 6652:tid 236] AH00094: Command line: '..\\eds-binaries\\httpserver\\apache2418x160222160722\\bin\\eds-httpserver.exe -d C:/BIN/EasyPHP-Devserver-16.1/eds-binaries/httpserver/apache2418x160222160722' 
[Mon Feb 22 17:16:20.321147 2016] [mpm_winnt:notice] [pid 6652:tid 236] AH00418: Parent: Created child process 4052 
[Mon Feb 22 17:16:20.895180 2016] [mpm_winnt:notice] [pid 4052:tid 316] AH00354: Child: Starting 64 worker threads. 

然而,隨着PHP 7.0.2,Apache的不斷沒有啓動,並且不跟蹤誤差什麼登錄。

別的東西丟失...

3

爲了正確執行PHP7您必須安裝媒體鏈接的Redistribuable的Visual C++ V14 (as shown in the PHP7 information detail on easyphp dashboard)

你可以找到它在這裏https://www.microsoft.com/download/details.aspx?id=48145

目前PHP7只在32位版本的easyPHP中可用,因此安裝VC14的兼容版本。

但很快,我希望我們可以用64 PHP7版本,然後您必須安裝64位版本VCl 4

+0

感謝它的工作!我使用的是win7 x64,並且是第一次下載x64版本,但在看到您的答案後,我也下載了x86版本,現在都安裝了。 Php7終於開始了! –

+0

@理查德的問題,它在win10 x64 上安裝x86版本後工作謝謝! – mlb