30.07.2012 Views

Reference Guide

Reference Guide

Reference Guide

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

PHP Error<br />

Zend Server Best Practices<br />

Description: When a specific PHP error is reported, it generates an event. The “PHP Error” Rule<br />

contains a list of monitored PHP error types. This event type complements the error_reporting settings in<br />

your php.ini by reporting specific errors even if they are set to disabled in your php.ini..<br />

Information Collected:<br />

The most important details are:<br />

Function Name - As displayed in the Issue’s General Details<br />

Error Data - Listed in the Error Data tab.<br />

Backtrace – to investigate what function calls were executed just before the error was reported.<br />

In most cases, these details alone should be enough to indicate what happened to trigger an<br />

event.<br />

Applicable Diagnostic Actions:<br />

Click on a link to see how to perform each action tools are listed in order of relevance to helping solve the<br />

event:<br />

Run the Debugger<br />

Open code in editor<br />

Redefine database queries<br />

View information in the Logs<br />

Possible Causes and Solutions:<br />

Syntax/Parse Errors - missing or incorrect syntax in code that is found during PHP compilation<br />

Fatal Runtime Errors - such as E_WARNING and E_ERROR - indicate that there was a call to an<br />

undefined function or that you did not load a specific extension or when classes and Functions are<br />

defined twice. Possible Solution: Open code and view Line and function that triggered the error.<br />

Uncaught Exceptions - generate fatal errors, with a complete backtrace to trace the reason why the<br />

PHP error was reported.<br />

Runtime Warnings - The code did not run as expected. Normally a notice is displayed and the code<br />

continues to run in an unexpected manner or the code will crash. Possible solutions: check your code for<br />

the following wrong DB QUERIES missing FILES, STREAMS functions that are performing DIV BY<br />

ZERO<br />

429

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!