4.8.14 Neuer Server mit PHP5.3

Gesperrt
josh
Beiträge: 156
Registriert: Do 24. Jun 2004, 09:25
Wohnort: Ahlen
Kontaktdaten:

4.8.14 Neuer Server mit PHP5.3

Beitrag von josh »

Hallo,

ich habe einen neuen Server mit PHP5 aufgesetzt und erhalte nach der Installation von Contenido diese Fehlermeldungen:

Code: Alles auswählen

[10-Dec-2010 23:01:36] PHP Warning:  phpinfo(): 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 'CET/1.0/no DST' instead in /srv/www/clients/client1/web1/web/contenido/includes/functions.general.php on line 679
[10-Dec-2010 23:01:36] 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 'CET/1.0/no DST' instead in /srv/www/clients/client1/web1/web/conlib/ct_sql.inc on line 103
[10-Dec-2010 23:19:58] 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 'CET/1.0/no DST' instead in /srv/www/clients/client1/web1/web/conlib/ct_sql.inc on line 103
[10-Dec-2010 23:19:58] 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 'CET/1.0/no DST' instead in /srv/www/clients/client1/web1/web/conlib/ct_sql.inc on line 103
[10-Dec-2010 23:19:58] 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 'CET/1.0/no DST' instead in /srv/www/clients/client1/web1/web/conlib/ct_sql.inc on line 103
[10-Dec-2010 23:19:59] 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 'CET/1.0/no DST' instead in /srv/www/clients/client1/web1/web/conlib/ct_sql.inc on line 103
[10-Dec-2010 23:19:59] 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 'CET/1.0/no DST' instead in /srv/www/clients/client1/web1/web/conlib/ct_sql.inc on line 103
[10-Dec-2010 23:19:59] 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 'CET/1.0/no DST' instead in /srv/www/clients/client1/web1/web/conlib/ct_sql.inc on line 103
[10-Dec-2010 23:20:00] 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 'CET/1.0/no DST' instead in /srv/www/clients/client1/web1/web/conlib/ct_sql.inc on line 103
[10-Dec-2010 23:20:05] 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 'CET/1.0/no DST' instead in /srv/www/clients/client1/web1/web/conlib/ct_sql.inc on line 103
[10-Dec-2010 23:20:05] 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 'CET/1.0/no DST' instead in /srv/www/clients/client1/web1/web/conlib/ct_sql.inc on line 103
[10-Dec-2010 23:20:05] 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 'CET/1.0/no DST' instead in /srv/www/clients/client1/web1/web/conlib/ct_sql.inc on line 103
[10-Dec-2010 23:20:06] PHP Warning:  phpinfo(): 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 'CET/1.0/no DST' instead in /srv/www/clients/client1/web1/web/contenido/includes/functions.general.php on line 679
Ich habe in die php.ini fogendes eingetragen, aber das ergab keine Änderung:
date.timezone = 'Europe/Berlin'

Mein Problem ist das auch die Navigation nicht angezeigt wird weil die Datei mitten im Quellcode abbricht.
Kann es da einen Zusammenhang geben oder ist das ein anderes Problem?

Der Server ist mit Suse und ISPConfig 3 installiert.
Bei der installation hat Contenido auf ein eventuelles Problem mit open_basedir hingewiesen

Hat schon jemand änhliche Erfahrungen gemacht und kann mir einen Tipp geben?

Viele Grüße aus Ahlen

josh
Zuletzt geändert von josh am So 12. Dez 2010, 20:40, insgesamt 1-mal geändert.
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: 4.8.14 Neuer Server mit PHP5

Beitrag von Oldperl »

Hallo Josh,
  • in der php.ini den Wert date.timezone = "myTimeZone" setzen, bzw. auskommentieren. myTimeZone durch eine gültige Zeitzonenangabe ersetzen und auch auf die doppelten Anführungszeichen achten. php.net: unterstützte Zeitzonen :arrow: http://de.php.net/manual/de/timezones.php
  • Den Webserver neu starten!
  • Eine phpinfo()-Seite anzeigen lassen und die Einstellungen prüfen.
  • Je nach host-Einstellungen gibt es evtl. noch andere php.ini's. Die welche maßgebliche ist kann man ebenfalls in der phpinfo()-Seite sehen.
Man kann auch mal mit einer config.local.php testen (myTimeZone ersetzen wie oben).

Code: Alles auswählen

<?php
date_default_timezone_set('myTimeZone');
?>
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
josh
Beiträge: 156
Registriert: Do 24. Jun 2004, 09:25
Wohnort: Ahlen
Kontaktdaten:

Re: 4.8.14 Neuer Server mit PHP5.3

Beitrag von josh »

Hallo Ortwin,

danke für die Hilfe!

Es läuft jetzt alles, aber ich möchte hier kurz meine Erfahrungen beim Aufsetzen neuer Server mitteilen.
Es handelt sich um zwei Serverinstallationen:

1. Server
Mein Server hatte einen Festplattenschaden und ich muste in kurzer Zeit neu aufgesetzt werden.
Das alte Image war nicht mehr da und wir haben den Server mit Suse 11.2, php5.3 und ISPconfig 2 und Contenido 4.8.14 aufgesetzt.

Nachdem ich das erste Web mit Contenido installiert hatte wurden die Umlaute micht richtig dargestellt.

In der php.ini gemachte Einstellungen haben nicht funktioniert.

geholfen hat die Änderung in /conlib/local.php
Danke für den Tipp in höchster Not: Ingo

alt:

Code: Alles auswählen

//$this->query("SET NAMES 'utf8'");
neu:

Code: Alles auswählen

$this->query("SET NAMES 'latin1'");
2. Server
Nachdem ich meine 40 Kunden ohne Datenverlust wieder hergestellt habe wird mir die
ganze Sache mit meinen alten Server zu windig.

Dieser Server wurde mit Suse 11.3, php5.3 und ISPconfig 3 und Contenido 4.8.14 aufgesetzt.
Nach der Installation gab es die o.a. Fehler.

Das erste Problem lies sich an gleicher Stelle beheben: conlib/local.php
(Den Fehler mit den Umlauten gab es auch auf diesem Server)

Code: Alles auswählen

$this->query("SET NAMES 'latin1'");
date.timezone = "Europe/Berlin";
Danke für den Tipp Ortwin

Der Fehler mit dem Code-Abbruch war ein Tippfehler im Pfad des Mandanten.
Contenido konnte die Datei /cms/includes/functions.navigation.php nicht finden.

Noch ein Hinweis: ISPconfig3 läuft bei mir mit fastcgi. Dabei wird eine andere php.ini verwendet
als auf dem anderen Server mit dem Apache Modul mod_php.

Fazit: Auf jedem neuen Server ist vieles anders: Aber Contenido läuft sauber auf php5.3!
Nur so eine Idee, wäre es sinnvoll an der Stelle oben die Spracheinstellungen zu verwenden und als
defaultwert die deutschen Einträge zu setzen?

Danke an euch alle dafür!!!

Viele Grüße aus Ahlen Josef
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: 4.8.14 Neuer Server mit PHP5.3

Beitrag von Oldperl »

Hallo Josef,
josh hat geschrieben:Nur so eine Idee, wäre es sinnvoll an der Stelle oben die Spracheinstellungen zu verwenden und als
defaultwert die deutschen Einträge zu setzen?
Nein das denke ich nicht, denn dabei hätte man dann sicherlich wieder im umgekehrten Fall Probleme. Ich weiß das diese Einstellung schon mal eingebaut war, soviel ich mich erinnere hat HerrB das damals dann wieder auskommentiert. Warum und wieso kann ich nicht sagen.
Sollte es sich aber zukünftig mit PHP >= 5.3 herausstellen das solch eine Einstellung sinnvoll wäre, kann man das sicherlich auch bei Contenido, bzw. in der Conlib, vorgeben.

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
josh
Beiträge: 156
Registriert: Do 24. Jun 2004, 09:25
Wohnort: Ahlen
Kontaktdaten:

Re: 4.8.14 Neuer Server mit PHP5.3

Beitrag von josh »

Hallo Ortwin,

War nur so eine Idee... Es gibt sicher andere Gründe, Konfigurationen usw...
Eigentlich müsten die Einstellungen auch über die php.ini bzw. MySQL -Einstellungen
konfigurierbar sein.

Mir war wichtig die Erfahrungen im Forum zu hinterlegen.

Viele Grüße

Josef
josh
Beiträge: 156
Registriert: Do 24. Jun 2004, 09:25
Wohnort: Ahlen
Kontaktdaten:

Re: 4.8.14 Neuer Server mit PHP5.3

Beitrag von josh »

Hallo Ortwin,

es gibt Probleme die holen einen ein! Ein Kunde hat noch ein normales HTML Web. Nach dem aktualisieren des
Impressums waren die Umlaute verkehrt.

Die Lösung:
In der Datei etc/apache2/mod_mime-defaults.conf de nach vorne stellen.

Code: Alles auswählen

<IfModule mod_negotiation.c>
LanguagePriority de en ca cs da el eo es et fr he hr it ja ko ltz nl nn no pl pt pt-BR ru sv zh-CN zh-TW 
Die Timezone in der php.ini setzen:

Code: Alles auswählen

date.timezone = "Europe/Berlin"
jetzt klappt es auch ohne die Einträge in die local.php

Ach ja, demnächst muss ich eine Website mit deutsch, englisch und arabisch machen.
Da hab ich ja schon gut was gelernt! Wenn es soweit ist ergänze ich das hier :wink:

Viele Grüße

Josef
Gesperrt