date_default_timezone_get(): It is not safe to rely on the system's timezone settings

前端 未结 10 2109
悲哀的现实
悲哀的现实 2020-12-14 07:46

Can anyone tell me why am I getting this error when running app/console in a brand new formatted macbook with the latest MAMP installed ?

Warning: da

10条回答
  •  时光说笑
    2020-12-14 07:51

    I had the same problem, and it's true there is a command line, and MAMP/Native Mac PHP service running on Yosemite, and while I was trying to follow the directions on this page non of them seemed to work for me.

    When I ran php command:

    $ php -i | grep 'Configuration File'
    Configuration File (php.ini) Path => /etc
    Loaded Configuration File => (Blank)

    I realized that the php.ini that the CLI was using, was actually php.ini.default file. I created a symbolic link to that file as the php.ini and everything worked.

    My-MacPro:/etc/$ ln -s php.ini.default php.ini

提交回复
热议问题