3
1

MAMP 7 でApacheが起動エラーになるのを解消

Last updated at Posted at 2024-08-09

環境

MacbookPro MacOS Ventura MAMP7.0 Free

起きたこと

MAMP7.0 Freeを上書きインストール後
「Apache couldn't be started. Please check your MAMP installation and configuration.」
でApacheが起動エラーになる

Apacheが起動エラー

試したこと

Nginx に変更(起動する)
再インストール(改善せず)
httpd.confの確認(特に問題なし)
fcgi-binの確認

phpのバージョンが違う?

MAMP7.0 に含まれるphp8.3.xは8.3.9
スクリーンショット 2024-08-09 10.08.55.png
fcgi-binではphp8.3.1.fcgi
スクリーンショット 2024-08-09 10.08.26.png

php8.3.1.fcgiを修正

ファイルを「php8.3.9.fcgi」にリネーム
内容を修正

php8.3.1.fcgi
#!/bin/sh
export PHP_FCGI_CHILDREN=4
export PHP_FCGI_MAX_REQUESTS=200
exec /Applications/MAMP/bin/php/php8.3.1/bin/php-cgi -c "/Library/Application Support/appsolute/MAMP PRO/conf/php8.3.1.ini"

8.3.1を2箇所8.3.9に修正

php8.3.9.fcgi
#!/bin/sh
export PHP_FCGI_CHILDREN=4
export PHP_FCGI_MAX_REQUESTS=200
exec /Applications/MAMP/bin/php/php8.3.9/bin/php-cgi -c "/Library/Application Support/appsolute/MAMP PRO/conf/php8.3.9.ini"

結果

MAMPを再起動したところ
スクリーンショット 2024-08-09 9.49.18.png

無事に起動しました

追記

2024/8/9
別マシン用に新たにダウンロードしたバージョンで修正されていました。

3
1
1

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
3
1