Mac OS PHP 7.4 설치


Mac OS PHP 7.4 설치




최초 작성일 : 2021-06-22 | 수정일 : 2021-06-22 | 조회수 : 1079

brew install php@7.4
brew link --force --overwrite php@7.4
brew services start php@7.4
export PATH="/usr/local/opt/php@7.4/bin:$PATH"
export PATH="/usr/local/opt/php@7.4/sbin:$PATH"

To enable PHP in Apache add the following to httpd.conf and restart Apache:

    LoadModule php7_module /usr/local/opt/php@7.4/lib/httpd/modules/libphp7.so


    <FilesMatch \.php$>

        SetHandler application/x-httpd-php

    </FilesMatch>


Finally, check DirectoryIndex includes index.php

    DirectoryIndex index.php index.html


The php.ini and php-fpm.ini file can be found in:

    /usr/local/etc/php/7.4/


php@7.4 is keg-only, which means it was not symlinked into /usr/local,

because this is an alternate version of another formula.


If you need to have php@7.4 first in your PATH, run:

  echo 'export PATH="/usr/local/opt/php@7.4/bin:$PATH"' >> ~/.profile

  echo 'export PATH="/usr/local/opt/php@7.4/sbin:$PATH"' >> ~/.profile


For compilers to find php@7.4 you may need to set:

  export LDFLAGS="-L/usr/local/opt/php@7.4/lib"

  export CPPFLAGS="-I/usr/local/opt/php@7.4/include"



To have launchd start php@7.4 now and restart at login:

  brew services start php@7.4

Or, if you don't want/need a background service you can just run:

  php-fpm


닉네임:
댓글내용:
🚀 추천글
새글

애플컴퓨터 신제품, 2025년 출시될 최신 정보 총정리!
2025-08-23
  • 애플컴퓨터
  • 애플 신제품
  • 2025년 출시
애플컴퓨터 신제품, 2025년 기대작 총정리!
2025-08-22
  • 애플컴퓨터
  • 2025년 신제품
  • 맥북 프로
애플컴퓨터 신제품, 2025년 최신 소식 총정리!
2025-08-21
  • 애플컴퓨터
  • 2025년 신제품
  • 아이폰 17
애플컴퓨터 최신 소식: M4 칩 성능 폭발! 🚀
2025-08-20
  • M4 칩
  • 애플 M4
  • 애플 신제품
애플컴퓨터 최신 M5 칩 성능 '깜짝'!
2025-08-20
  • 애플 M5 칩
  • M5 칩 성능
  • 애플 실리콘
추천글
카슈미르, 전쟁의 불씨: 국제적 긴장의 중심에서의 갈등 분석
2025-08-20
  • 카슈미르분쟁
  • 인도파키스탄
  • 카르길전쟁




📸 이미지 프롬프트 복사 완료!
이제 어떤 이미지 생성 도구로 이동하시겠어요?
🧠 ImageFX 🧪 Whisk