note 102416 rejected from class.errorexception by thiago

From: Date: Mon, 14 Feb 2011 03:04:57 +0000
Subject: note 102416 rejected from class.errorexception by thiago
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-176966@lists.php.net to get a copy of this message
Note Submitter: weiweiok at qq dot com ---- I think using the ini_set () to set the error_log is inappropriate, because: 1> a lot of virtual space does not support the ini_set () function. 2> When a fatal error occurs, the code may not have time to use ini_set () when it was 2> terminated. 3> In fact all non-fatal errors we can use set_error_handler (), set_exception_handler () and try 3> {... ...} catch So the key issue is: when a fatal occurs, how do we deal with (although this version of the official business there is very little) My own view: First, all non-fatal error, warning, notification, exception, we use the php code to capture and processing. Second, for fatal error the best approach: 1> Close display_errors in the ini 2> Open log_errors 3> set a file name to error_log (because of the need to consider multiple sites within the 3> server, it can not set an absolute address), so the error log file will be saved to produce the same 3> directory. 4> use php to write a script, time to scan all subdirectories under the specified directory in 4> the error log file that may exist, and to collect aggregate log in to your system and notify the 4> administrator.

« previous php.notes (#176966) next »