How to set default php.ini to be used, OSX Yosemite

SAPI module specific location (PHPIniDir directive in Apache 2, -c command line option in CGI and CLI, php_ini parameter in NSAPI, PHP_INI_PATH environment variable in THTTPD)

http://php.net/manual/en/configuration.file.php

Try changing PHPIniDir in httpd.conf.


On mac sierra with php7.1, edit /usr/local/etc/php/7.1/php.ini won't work, you can edit like this:

1) cp /etc/php.ini.default php.ini
2) edit php.ini to add
date.timezone = Europe/Berlin

then restart your apache,


move the configuration file to the right spot and update the timezone.

$ sudo cp /etc/php.ini.default /etc/php.ini

Open the config file /etc/php.ini, find the line that sets your timezone and update it correspondingly.

date.timezone = Europe/Berlin

Do not forget to remove the ; at the beginning. Restart the Apache server to have PHP load the new .ini file.

sudo apachectl restart

Tags:

Php

Apache

Macos