Warning: date() [function.date]: It is not safe to rely ....

Gesperrt
x11max
Beiträge: 12
Registriert: So 12. Aug 2012, 12:00
Kontaktdaten:

Warning: date() [function.date]: It is not safe to rely ....

Beitrag von x11max »

Hallo, habe eine Installation Contenido Version 8.4.15 gemacht.

Die Installation war erfolgreich. Jedoch werden nachstehende Meldungen sowohl für Front- als auch Backend im Browser angezeigt.
Installation erfolgte unter OSX 10.8.

Was besagen die Meldungen ?
Liegt es an der TimeZone und lassen die Werte in contenidp einstellen ?

Die Systemkonfiguration zuerst:

Variable Lokaler Wert
Contenido Version 4.8.15
Contenido Pfad /www/contenido/contenido/
Contenido HTML-Pfad ../contenido/
Contenido Voller HTML-Pfad http://localhost/contenido/
Contenido Frontend-Pfad /www/contenido
Contenido PHPLIB-Pfad /www/contenido/conlib/
Contenido WYSIWYG-Pfad /www/contenido/contenido/external/wysiwyg/tinymce3/
Contenido WYSIWYG-HTML-Pfad http://localhost/contenido/external/wysiwyg/tinymce3/
Host-Name localhost
Browser-Pfad http://localhost/contenido/
Mandanteninformationen Anzahl der installierten Mandanten: 1
Mandanten-Einstellungen Werte
Contenido Demo
Sprache(n) deutsch, english
HTML-Pfad http://localhost/cms/
Frontend-Pfad /www/contenido/cms/
Anzahl Benutzer 2
Anzahl der Artikel 38
Server Betriebssystem Apache/2.2.22 (Unix) mod_ssl/2.2.22 OpenSSL/1.0.1c DAV/2 PHP/5.3.15
PHP Datenbankerweiterung mysql
Datenbankserver-Version 5.1.63
Installierte PHP-Version 5.3.15

Fehlermeldung:

Warning: date() [function.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 /www/contenido/contenido/classes/class.backend.php on line 313

Warning: date() [function.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 /www/contenido/conlib/ct_sql.inc on line 103

Warning: getdate() [function.getdate]: 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 /www/contenido/contenido/includes/pseudo-cron.inc.php on line 306

Warning: mktime() [function.mktime]: 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 /www/contenido/contenido/includes/pseudo-cron.inc.php on line 334

Warning: date() [function.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 /www/contenido/contenido/includes/pseudo-cron.inc.php on line 386
Dateianhänge
Untitled1.jpg
(68.8 KiB) Noch nie heruntergeladen
Untitled.jpg
(217.11 KiB) Noch nie heruntergeladen
xmurrix
Beiträge: 3215
Registriert: Do 21. Okt 2004, 11:08
Wohnort: Augsburg
Hat sich bedankt: 4 Mal
Danksagung erhalten: 17 Mal
Kontaktdaten:

Re: Warning: date() [function.date]: It is not safe to rely

Beitrag von xmurrix »

Hallo x11max,

erstmal Willkommen im CONTENIDO Forum.

Die Warnung, die Ausgegeben wird, hat etwas mit der PHP-Einstellung zu tun. Seit PHP 5.3 muss ma nähmlich die PHP-Einstellung date.timezone in der php.ini setzen. Wenn das nicht gemacht wurde, gibt PHP die Warnungen aus, wenn man Datumsfunktionen verwendet. Finde die entsprechende Zeile in deiner php.ini und setze sie auf:

Code: Alles auswählen

date.timezone = Europe/Berlin
Vermutlich musst du danach deinen Webserver neu starten, dann sollte es keine Probleme mehr geben.

Das hat nichts mit CONTENIDO zu tun und das CONTENIDO-Setup prüft auch nicht, ob die PHP Einstellungen korrekt gesetzt sind.

Gruß
xmurrix
CONTENIDO Downloads: CONTENIDO 4.10.1
CONTENIDO Links: Dokumentationsportal, FAQ, API-Dokumentation
CONTENIDO @ Github: CONTENIDO 4.10 - Mit einem Entwicklungszweig (develop-branch), das viele Verbesserungen/Optimierungen erhalten hat und auf Stabilität und Kompatibilität mit PHP 8.0 bis 8.2 getrimmt wurde.
x11max
Beiträge: 12
Registriert: So 12. Aug 2012, 12:00
Kontaktdaten:

Re: Warning: date() [function.date]: It is not safe to rely

Beitrag von x11max »

Guter Rat. Aber da ich mehrere CMS Systeme laufen habe, stört der date Eintrag in der globalen php.ini.
Daher lade ich die php.ini mit der contenido Apache Konfiguration.

httpd_contenido.conf

<IfModule mod_php5.c>
# ...
# wegen Timezone Fehler separate php.ini laden
# /opt/local/www/contenido/conf
# DSO Modules: PHP as an Apache module
SetEnv PHPRC /opt/local/www/contenido/conf
SetEnv PHP_INI_SCAN_DIR /opt/local/www/contenido/conf

#LoadModule php5_module /pathtophpmod/libphp5.so
PHPINIDir /opt/local/www/contenido/conf
# ...
</IfModule>
Oldperl
Beiträge: 4316
Registriert: Do 30. Jun 2005, 22:56
Wohnort: Eltmann, Unterfranken, Bayern
Hat sich bedankt: 6 Mal
Danksagung erhalten: 4 Mal
Kontaktdaten:

Re: Warning: date() [function.date]: It is not safe to rely

Beitrag von Oldperl »

Hallo X11max,

das Thema wurde bereits im Forum besprochen, die Forensuche hätte da sicherlich geholfen.

:arrow: http://forum.contenido.org/viewtopic.ph ... 81#p147981

Gruß aus Franken

Ortwin
ConLite 3.0.0-dev, alternatives und stabiles Update von Contenido 4.8.x unter PHP 8.x - Download und Repo auf Gitport.de
phpBO Search Advanced - das Suchwort-Plugin für CONTENIDO 4.9
Mein Entwickler-Blog
Gesperrt