Reputation: 2691
I tried couple stuff in internet, but no one solution resolved my problem.
I'm learning symfony 2 and doctrine for using database. I wanted to generate my new tables with this command :
php app/console doctrine:schema:update --dump-sql
But I have this Exception error on my console :
[Symfony\Component\Debug\Exception\ContextErrorException]
Warning: date_default_timezone_get(): It is not safe to rely on the system's
timezone settings. You are *required* to use the date.timezone setting or
the date_default_timezone_set() function. In case you used any of those methods
and you are still getting this warning, you most likely misspelled the
timezone identifier. We selected 'Europe/Berlin' for 'CEST/2.0/DST' instead
in /Applications/MAMP/htdocs/SdzBlog/Symfony/vendor/monolog/monolog/src/Monolog/
Logger.php line 209
About my configuration : I use MAMP for my server My OS is MAC OS 10.8.5
I think that it's about php.ini, but I can't edit this files. It's telling me that these files are read-only when I try to edit them. I even tried to make chmod in order to be able to edit them, and I still have read-only message.
Does someone know how to resolve this issue please ?
Thanks
ANSWER : Read the answer of Nicolai, and all his comments, it helps
Upvotes: 0
Views: 7345
Reputation: 5797
Initialize configuration parameter date.timezone in your php.ini. You must open your php.ini with superuser privileges. eg.
sudo mcedit /private/etc/php.ini
Upvotes: 1