XAMPP環境搭建與Apache無法啟動問題
一、XAMPP安裝
XAMPP的安裝非常簡單,相信大多數朋友都能很快搭建好,下面重點介紹一下XAMPP安裝完成後大家常遇到的一些問題,比如:Apache開啟不
了等相關問題。
開發商:ApacheFriends
大小:115.7M 版本:1.8.3
位數:32/64 更新日期:2013-07-29
支援系統:Vista/Win7
新版特徵
Apache 2.4.4;
2. MySQL 5.6.11;
3. PHP 5.5.1;
4. phpMyAdmin 4.0.4;
5. FileZilla FTP Server 0.9.41;
6. Tomcat 7.0.41 (with mod_proxy_ajp as connector);
7. Strawberry Perl 5.16.3.1 Portable;
8. XAMPP Control Panel 3.2.1 (from hackattack142)。
二、Apache無法啟動問題
XAMPP已經安裝成功,但是控制面板上無法啟動Apache,最後這個問題終於被發現和解決。特地分享給大家,希望對遇到此類問題的朋友有幫
助。如果你的電腦安裝開發軟體較多,埠有可能被佔用,我初次安裝時,埠就被佔用,導致無法開啟,如圖:
無法啟動Apache錯誤提示資訊如下:
Initializing Control Panel
13:04:25 [main] Windows Version: Windows 7Ultimate SP1 64-bit
13:04:25 [main] XAMPP Version: 1.8.3
13:04:25 [main] Control Panel Version:3.2.1 [ Compiled: May 7th 2013 ]
13:04:25 [main] Running with Administratorrights - good!
13:04:25 [main] XAMPP InstallationDirectory: "d:\xampp\"
13:04:26 [main] Checking for prerequisites
13:04:34 [main] All prerequisites found
13:04:34 [main] Initializing Modules
13:04:34 [main] Starting Check-Timer
13:04:34 [main] Control Panel Ready
13:04:46 [Apache] Attempting to startApache app...
13:04:47 [Apache] Status changedetected: running
13:04:50 [Apache] Status changedetected: stopped
13:04:50 [Apache] Error: Apache shutdownunexpectedly.
13:04:50 [Apache] This may be due to ablocked port, missing dependencies,
13:04:50 [Apache] improper privileges, acrash, or a shutdown by another method.
13:04:50 [Apache] Press the Logs buttonto view error logs and check
13:04:50 [Apache] the Windows EventViewer for more clues
13:04:50 [Apache] If you need more help,copy and post this
13:04:50 [Apache] entire log window onthe forums
13:06:07 [main] Deinitializing Modules
13:06:07 [main] Deinitializing ControlPanel
如果出現這種情況,可以檢視錯誤日誌/xampp/apache/logs/error.log,要是無任何內容。並且如果資訊中包含“This may be due to a
blocked port,missing dependencies”翻譯成中文就是“這可能是由於一個阻塞埠,缺少依賴”。由此,我們就可以找到原因了。說明
我們本機同時安裝了Apache公司旗下的產品,因為Apache旗下產品大多監聽443埠。阿帕奇伺服器開啟不了,只能說明,443埠
被佔用。我們可以採用“360網路檢視器”這個軟體,檢視一下是哪個軟體此時佔用443埠。如圖
一看便知,我本機安裝的SVN伺服器已經佔用了443埠,上圖是我已經修改為442。這樣兩個軟體就可以同時在本機使用了。
修改埠的具體方法是:
編輯D:\xampp\apache\conf\extra\httpd-ssl.conf 檔案(路徑可能不同,視情況而定)將所有的 443 替換成 442 或其它未被佔用的埠號。
然後重新啟動 APACHE,就可以了,其他軟體開啟不了,可以採取同樣方法操作。