0

For the mac os shipped php5.5, i find there are two php.ini files, one is in /etc/php.ini, the other is in /usr/local/etc/php/5.5

I tried phpinfo(), it points to the one in /etc/php.ini However, when i use php --ini, it shows the one in the /usr/local/etc/php/5.5

I am getting confused, which is the one that being used for php init? what's the use of the other?

Sirius
  • 31

1 Answers1

0

When you call php from the CLI you can specify the path to your desired ini file with the -c flag. Any php run by your server uses the ini specified in your server configuration. If you're just looking to make sure they're both looking at the same ini file probably easiest to just tell your CLI calls to php to use the same file as your server already uses.

akronymn
  • 2,426
  • 4
  • 25
  • 39