PHP Configuration: It is not safe to rely on the system’s timezone settings [duplicate]

Tchalvak, who commented on the original question, hit the nail on the head for me. I’ve been editing (I use Debian):

/etc/php5/apache2/php.ini

…which had the correct timezone for me and was the only .ini file being loaded with date.timezone within it, but I was receiving the above error when I ran a script through Bash. I had no idea that I should have been editing:

/etc/php5/cli/php.ini

as well. (Well, for me it was ‘as well’, for you it might be different of course, but I’m going to keep my Apache and CLI versions of php.ini synchronised now).

Leave a Comment