问题
I'm using Mac High Sierra. I need to install php with the php.ini file installed. I ran the following command without errors:
brew install php71 --build-from-source
However, when I search for a configuration file, I get nothing:
localhost:stratum-php-master davea$ php -i | grep "Loaded Configuration File"
Loaded Configuration File => (none)
How do I get Mac to recognize a php.ini file?
回答1:
If you install PHP 7.1 using Homebrew, the php.ini
file will be generated in
/usr/local/etc/php/7.1/php.ini
You can get an example of php.ini
from the source code. Alternatively, you can copy over an older version of php.ini
to /usr/local/etc/php/7.1/php.ini
来源:https://stackoverflow.com/questions/48532574/how-do-i-get-mac-to-install-php-with-a-php-ini-file