2014-02-18

PHP - Location of php.ini on MacOS Mavericks

You can read the location once you can run a php file containing the phpinfo() command.


  • Look then for "Configuration File (php.ini) Path". 
  • You might get "/etc", which may exists as a directory or as an alias.
  • But that doesn't mean that a php.ini really exists. 
  • You may find only a php.ini.default.
  • If so, php defaults are loaded, which can be confirmed by the phpinfo list entry "Loaded configuration file"... it may read none or be blank.
  • If you want to enable you own php.ini, then copy php.ini.default as php.ini (in the same /etc directory).
  • Then restart apache.
  • Then re-run your php page to read phpinfo() again, and voila!