zend framework - Can I use Zend_Log to handle PHP errors? -


I am developing a web service with Zend, especially I am Zend_AMF for the interop with Aeded Flex. The problem with that is that I can not easily see the PHP errors because the Flex debugger will not display the actual answer from the server, unless they are the appropriate Amphit. If I go to the Zend_Amf endpoint with the web browser then I have not found any errors, so error while executing an AMF handler, I am still using firebug to observe HTTP traffic to see any errors I am

For my question: Can I use a login utility (like Zend_log) to send all PHP errors, warnings and notice files instead of sending them (or additionally) in an HTTP response?

You can use PHP to catch errors and log them in the form of thanks Use Zend_Log for

The only problem with this function is that it will not catch all the PHP errors, it is not possible to catch errors such as syntax errors ....

Playing with another method The function is

like this:

  error_reporting (E_ALL); Ini_set ('display_errors', 0); Function close () {$ isError = false; If ($ error = error_get_last ()) {switch ($ error ['type']) {case E_ERROR: case E_CORE_ERROR: case E_COMPILE_ERROR: case E_USER_ERROR: $ isError = true; break; }} If ($ is error) {echo "stop script execution ({$ error ['message']})"; } Else {echo "script completed"; }} Register_shutdown_function ('off');  

It is worth noting that even by adding both methods, it will not catch all errors, such as syntax errors .... but you can see that type of error using normal browsers


Comments

Popular posts from this blog

sql - dynamically varied number of conditions in the 'where' statement using LINQ -

asp.net mvc - Dynamically Generated Ajax.BeginForm -

Debug on symbian -