Zum Inhalt springen

Couldn't find constant LOG_

Erstellt am 22. Juni 2006 · 1 Antwort · letzte Antwort am 22. Juni 2006

Tags: Frage

smeagul ·

Ich bin gerade die Installationsschritte für Typo3 4.0 durchgegangen und habe Datenbank, ImageMagick etc konfiguriert.
Nach einer erneuten Anmeldung am Installationstool bekomme ich als erstes eine PHP Warnung über eine nicht definierte Konstante:
Warning: constant() [function.constant]: Couldn't find constant LOG_ in /var/www/typo3_src-4.0/t3lib/class.t3lib_div.php on line 4272

Dies hatte ich erst auch ignoriert, und dachte mach mal weiter.
Eine Anmeldung am Backend funktioniert nicht. Ich habe einen User in der Tabelle be_users stehen, das verschlüsselte Passwort habe ich mit dem gleichen verschlüsselten Passwort im Testsystem verglichen : es stimmt.
Anmeldung bleibt ohne Erfolg. Allerdings bekomme ich noch wesentlich mehr PHP Warnungen:

Warning: constant() [function.constant]: Couldn't find constant LOG_ in /var/www/typo3_src-4.0/t3lib/class.t3lib_div.php on line 4272

Warning: Cannot modify header information - headers already sent by (output started at /var/www/typo3_src-4.0/t3lib/class.t3lib_div.php:4272) in /var/www/typo3_src-4.0/t3lib/class.t3lib_userauth.php on line 266

Warning: session_start() [function.session-start]: Cannot send session cookie - headers already sent by (output started at /var/www/typo3_src-4.0/t3lib/class.t3lib_div.php:4272) in /var/www/typo3_src-4.0/t3lib/class.t3lib_userauth.php on line 1022

Warning: session_start() [function.session-start]: Cannot send session cache limiter - headers already sent (output started at /var/www/typo3_src-4.0/t3lib/class.t3lib_div.php:4272) in /var/www/typo3_src-4.0/t3lib/class.t3lib_userauth.php on line 1022

Warning: Cannot modify header information - headers already sent by (output started at /var/www/typo3_src-4.0/t3lib/class.t3lib_div.php:4272) in /var/www/typo3_src-4.0/t3lib/class.t3lib_userauth.php on line 311

Warning: Cannot modify header information - headers already sent by (output started at /var/www/typo3_src-4.0/t3lib/class.t3lib_div.php:4272) in /var/www/typo3_src-4.0/t3lib/class.t3lib_userauth.php on line 312

Warning: Cannot modify header information - headers already sent by (output started at /var/www/typo3_src-4.0/t3lib/class.t3lib_div.php:4272) in /var/www/typo3_src-4.0/t3lib/class.t3lib_userauth.php on line 313

Warning: Cannot modify header information - headers already sent by (output started at /var/www/typo3_src-4.0/t3lib/class.t3lib_div.php:4272) in /var/www/typo3_src-4.0/t3lib/class.t3lib_userauth.php on line 314

Warning: Cannot modify header information - headers already sent by (output started at /var/www/typo3_src-4.0/t3lib/class.t3lib_div.php:4272) in /var/www/typo3_src-4.0/typo3/template.php on line 613

Wobei ich vermute, dass sie eine Folge der fehlenden konstante LOG_ sind. Wer hat diese KOnstante angelegt ?
Warum werde ich nicht authentifiziert ?

Wer kann helfen ?
Übrigens ich arbeite mit PHP 5, Typo3 4.0, MySQL 5.x

smeagul ·

Ich hab's !!!!! H u u r r r a

Es lag tatsächlich an der nicht definierten Konstanten 'LOG_'.

Ich habe im Installationstool angegeben, dass eine Protokollierung über den Dienst SYSLOG erfolgen soll. Ich habe allerdings nicht richtig konfiguriert. In das entsprechende Feld trägt man einmal die Logging Methode also etwa syslog oder file oder mail ein.
Dies ist bei syslog aber nicht genug. Der Hinweis in der Fehlermeldung auf die Zeile 4272 in der Datei t3lib/class.t3lib_div.php brachte mich weiter.
Im Code sehe ich daß die PHP-Funktion openlog() verwendet wird und diese erwartet unter anderem ein Argumnent facility (nachlesen im PHP-Manual unter syslog oder openlog). Dies brachte mich darauf im Installationstool neben der Methode noch die Facility anzugeben. Also etwa LOCAL0. Dieser Name wird mit dem Prefix 'LOG_' zu einer Konstanten zusammengebaut (LOG_LOCAL0) und diese wird an openlog() übergeben.

So, der Fehler bestand in einer fehlerhaften Konfiguration.
Hier sollte man vielleicht eine Prüfroutine einbauen o.O