Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

No php.ini with brew

I installed PHP7 with brew and it said:

The php.ini file can be found in:
    /usr/local/etc/php/7.0/php.ini

but I don't see anything there. So I confirmed it with php-fpm -i:

Configuration File (php.ini) Path => /usr/local/etc/php/7.0
Loaded Configuration File => (none)
Scan this dir for additional .ini files => /usr/local/etc/php/7.0/conf.d

I think for this reason I'm unable to run PHP scripts, how do I fix it?

like image 418
eozzy Avatar asked Sep 11 '25 12:09

eozzy


1 Answers

You can use the following command:

php -r "phpinfo();" | grep php.ini

it will tell you what php.ini is being executed, in my case:

▶ php -r "phpinfo();" | grep php.ini
Configuration File (php.ini) Path => /usr/local/etc/php/7.3
Loaded Configuration File => /usr/local/etc/php/7.3/php.ini
like image 83
QuarK Avatar answered Sep 14 '25 17:09

QuarK