Zum Inhalt springen
View in the app

A better way to browse. Learn more.

Fachinformatiker.de

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Empfohlene Antworten

Veröffentlicht

hi,

wie fange ich PHP Parse errors hab ?, Die Fehler können ja nicht vom Error_Handler behandelt werden soweit ich weis, also wie dann ?

kann ich evtl. eine Umleitung seitens des Apache machen, das er im Fehlerfall auf eine statische HTML / andere PHP-URL leitet ?

danke

Du kannst im Fehlerfall per HTML weiterleiten:

im Script selbst:


ini_set('html_errors',false);

ini_set('error_prepend_string','<html><head><META http-equiv="refresh" content="0;URL=/error.php?strError=');

ini_set('error_append_string','"></head></html>');

oder in der php.ini (.htaccess?):

html_errors = Off

error_prepend_string="<html><head><META http-equiv='refresh' content='0;URL=/error.php?strError="

error_append_string="'></head></html>"

Wobei letzteres z.B. bei
Parse error: parse error, unexpected '{'

problematisch ist, da das Single-Quote-Zeichen (') auch als Begrenzer der URL dient.

Ich hab's gerade nicht geschafft, das Anführungszeichen in der php.ini zu maskieren.

Vielleicht weiss ja Jemand, wie das geht...

ist mist, wenn es da keine 'wirkliche' Fehlerbehandlung gibt.

das ist bei mir wieder aktuell geworden, weil ich mehrere Fatal-errors hatte, die auf nicht installierte Module zurück zu führen waren....ich würde gerne zumindest wissen, wenn mein Script nicht funktioniert...auch wenn nicht 'ich' es aufrufe :(

Ich hab überlegt den Error in ein formularfeld zu setzen und das per JS wieder abzuschicken.

Dennoch bleibt dann das Problem, das alle Fehler, egal zu welcher Anwendung sie gehören, zum gleichen Error-Script geleitet werden.

*arg*

Erstelle ein Konto oder melde dich an, um einen Kommentar zu schreiben.

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.