How do I get Mac to install php with a php.ini file?

烈酒焚心 提交于 2019-12-24 07:07:44

问题


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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!