CentOS 6: SmartSieve meldet "Warning: strftime(): It is not safe to rely on the system's timezone settings"
Sollten Sie während der Nutzung des Webinterfaces von SmartSieve feststellen, dass in der Logdatei /var/log/httpd/error_log die folgenden Fehlermeldungen protokolliert werden, können Sie die Ursache für diese Meldungen wie folgt beheben.
[root@centos6 ~]# tail -f /var/log/httpd/error_log
[...]
[Sat May 19 13:24:34 2012] [error] [client 192.168.10.189] PHP Warning: strftime(): 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 /usr/share/pear/Log/syslog.php on line 183
[...]
[Sun May 19 13:26:20 2012] [error] [client 192.168.10.189] PHP Warning: date(): 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 /var/www/smartsieve/lib/Script.php on line 447
[...]
[Sat May 19 13:24:34 2012] [error] [client 192.168.10.189] PHP Warning: strftime(): 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 /usr/share/pear/Log/syslog.php on line 183
[...]
[Sun May 19 13:26:20 2012] [error] [client 192.168.10.189] PHP Warning: date(): 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 /var/www/smartsieve/lib/Script.php on line 447
Öffnen Sie dazu die Konfigurationsdatei von SmartSieve mit einem Editor.
[root@centos6 ~]# vi /var/www/smartsieve/conf/config.php
Fügen Sie hier nach dem Header und vor dem Abschnitt Language options die folgenden Zeilen ein.
/**
* Date and timezone options.
*/
date_default_timezone_set("Europe/Berlin");
* Date and timezone options.
*/
date_default_timezone_set("Europe/Berlin");
Nachdem Sie die Konfigurationsdatei gespeichert haben, sollten die Fehlermeldungen nicht mehr in der Logdatei erscheinen, da Sie jetzt Ihre Zeitzone (hier Europe/Berlin) dem PHP-Interpreter bekanntgegeben haben.
Dieser Eintrag wurde am 19.08.2012 erstellt.
Direkter Link zu dieser Seite: http://www.gtkdb.de/index_33_1796.html
[ Zur Startseite ] [ Zur Kategorie ]
© 2004-2021 by Georg Kainzbauer