macOS 配置 phpStrom 初始时错误

PHP:Hypertext Preprocessor,即"PHP:超文本预处理器",是一种通用开源脚本语言。


问题一:
macOS:php.ini file that doesn't exist

解决:

  1. php -i | grep php.ini
  2. cp /etc/php.ini.default /etc/php.ini

https://stackoverflow.com/questions/39380021/why-doesnt-my-mac-os-x-have-a-php-ini-file-how-should-i-get-it-so-that-i-can-d


问题二:
macOS:php-cgi not found in PhpStorm,页面显示 502 bad gateway

解决:

  1. Update Brew: brew update
  2. Add repo: brew tap homebrew/php
  3. Install PHP: brew install php
  4. 在 PhpStorm PreferencesLanguages & Frameworks,CLI Interpreter ... ,+, Other Local..., /usr/local/bin/phpApply and Save

https://stackoverflow.com/questions/47680832/php-cgi-not-found-in-phpstorm-resulting-in-502-bad-gateway

你可能感兴趣的:(macOS 配置 phpStrom 初始时错误)