How to install php-cgi as a plugin in Mac OS ( OS X 10.10)?

后端 未结 3 1775
闹比i
闹比i 2021-01-13 20:24

I want to do PHP works on My Mac book. However, after I installed Php storm, and tell the PHP Interpreter\'s location, it

3条回答
  •  不思量自难忘°
    2021-01-13 20:53

    As you already said, you installed PHP without --with-cgi. The problem is that CGI is an integral part of PHP and therefore needs to be added at compile time. Reinstalling PHP using brew however won't affect your settings in php.ini so there shouldn't be any reason not to reinstall it:

    brew install php54 --with-cgi --with-debug --with-libmysql {more options here}
    

    This does not overwrite the default installation of PHP on your Mac. After installation homebrew will show you how to make it start when you start your Mac.

    (Sidenote: You should consider upgrading to at least 5.5. Be careful though as this deprecates the use of mysql_* in favor of mysqli_* and PDO. More details about that on http://php.net/manual/de/migration55.deprecated.php).

提交回复
热议问题