Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>How about overriding the default PHP errorhandler? This site should give some basic information: <a href="http://www.php.net/manual/en/function.set-error-handler.php" rel="nofollow noreferrer">http://www.php.net/manual/en/function.set-error-handler.php</a> and the first comment on <a href="http://www.php.net/manual/en/function.set-exception-handler.php" rel="nofollow noreferrer">http://www.php.net/manual/en/function.set-exception-handler.php</a></p> <p>You might also want to store database errors, perhaps some kind of custom function that allows you to use code like:</p> <pre><code>&lt;?php $objQueryResult = mysql_query("query here") or some_kind_of_function_here(); ?&gt; </code></pre> <p>You might want to store the recorded errors in a file, which is outside your public html root folder, to make sure people can't access it by accident. I would also assume, you'd want to store a complete stacktrace in such a file, because then you can actually debug the problem. When overriding the default errorhandlers, please note you don't forget to send a nice message to the user (and exit the script, when needed).</p> <p>I would recommend storing:</p> <ul> <li>$_POST</li> <li>$_GET</li> <li>A complete dump of debug_print_backtrace()</li> <li>Possibly the SQL that triggered this?</li> </ul> <p>I would suggest you to use debug_print_backtrace() to make sure you get a summary of data. The debug_backtrace() function gives about the same information, but it can sometimes just give you too much information. The code you could use to catch backtraces:</p> <pre><code>&lt;?php ob_start(); debug_print_backtrace(); $trace = ob_get_contents(); ob_end_clean(); ?&gt; </code></pre> <p>To store this, you could use a plain text output, if you don't get too much errors, otherwise perhaps use something like sqlite? - Just don't use the same SQL connection to store the errors, as that might trigger more problems, if you're having webserver to SQL connection errors.</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    3. VO
      singulars
      1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload