趣味バカ一代

筋トレ、アウトドア、キャンプ紹介ブログ

【PHP】【メモ帳】PHP Apache起動エラーの対処法(ポート問題)

XAMPPインストール後下記エラーが発生・・・

16:13:34 [Apache] Error: Apache shutdown unexpectedly.
16:13:34 [Apache] This may be due to a blocked port, missing dependencies,
16:13:34 [Apache] improper privileges, a crash, or a shutdown by another method.
16:13:34 [Apache] Press the Logs button to view error logs and check
16:13:34 [Apache] the Windows Event Viewer for more clues
16:13:34 [Apache] If you need more help, copy and post this
16:13:34 [Apache] entire log window on the forums

 

MYSQLは正常に起動できますが、
Apacheのみエラーに・・・

原因を調査する為、下記コマンドを実行すると

 

/xampp/apache_start.bat

make_sock: could not bind to address [::]:80

 

ポート80が使われている為と判断し
netstat -a -o
を実行し確認すると
PID4が掴んでいるが
タスクマネージャーで確認しても
PID4は存在しておらず
何が掴んでるかわからない状態に・・・

TCP 0.0.0.0:80 AAAAA:0 LISTENING 4

 
IISマイクロソフト系が怪しいですが
今回は80は諦め別ポートにて
設定しました。

httpd.confを起動し
Listen 80とあるので
空いている番号に変更・・・

 

無事起動することが出来ました。
ローカルマシンなので
別に何のポート番号でも良いので
変更可能でしたはリリースサーバーで同様の
現象起ったら恐ろしい・・・