note 102416 added to class.errorexception
| From: | weiweiok at qq dot com | Date: | Sun, 13 Feb 2011 13:27:59 +0000 |
| Subject: | note 102416 added to class.errorexception | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-176942@lists.php.net to get a copy of this message | ||
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.
----
Server IP: 69.147.83.197
Probable Submitter: 183.187.48.185
----
Manual Page -- http://www.php.net/manual/en/class.errorexception.php
Edit -- https://master.php.net/note/edit/102416
Del: integrated -- https://master.php.net/note/delete/102416/integrated
Del: useless -- https://master.php.net/note/delete/102416/useless
Del: bad code -- https://master.php.net/note/delete/102416/bad+code
Del: spam -- https://master.php.net/note/delete/102416/spam
Del: non-english -- https://master.php.net/note/delete/102416/non-english
Del: in docs -- https://master.php.net/note/delete/102416/in+docs
Del: other reasons-- https://master.php.net/note/delete/102416
Reject -- https://master.php.net/note/reject/102416
Search -- https://master.php.net/manage/user-notes.php