Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:16263 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 77825 invoked by uid 1010); 17 May 2005 11:22:23 -0000 Delivered-To: ezmlm-scan-internals@lists.php.net Delivered-To: ezmlm-internals@lists.php.net Received: (qmail 43996 invoked from network); 17 May 2005 11:04:31 -0000 Received: from unknown (HELO php.net) (127.0.0.1) by localhost with SMTP; 17 May 2005 11:04:31 -0000 X-Host-Fingerprint: 82.94.239.5 unknown Linux 2.5 (sometimes 2.4) (4) Received: from ([82.94.239.5:36536] helo=jdi.jdi-ict.nl) by pb1.pair.com (ecelerity 1.2 r(5656M)) with SMTP id C2/F8-01538-8BFC9824 for ; Tue, 17 May 2005 07:04:26 -0400 Received: from localhost (localhost [127.0.0.1]) by jdi.jdi-ict.nl (8.12.11/8.12.11) with ESMTP id j4HB8Grl000815 for ; Tue, 17 May 2005 13:08:16 +0200 Received: from localhost (localhost [127.0.0.1]) by jdi.jdi-ict.nl (8.12.11/8.12.11) with ESMTP id j4HB8DMa000794; Tue, 17 May 2005 13:08:14 +0200 Date: Tue, 17 May 2005 06:04:01 -0500 (CDT) X-X-Sender: derick@localhost To: Blake Matheny cc: George Schlossnagle , PHP Developers Mailing List In-Reply-To: Message-ID: References: <4288F183.7010804@3gupload.com> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-Virus-Scanned: by amavisd-new at jci-ict.nl Subject: Re: [PHP-DEV] Patch for php_error_cb From: derick@php.net (Derick Rethans) On Mon, 16 May 2005, George Schlossnagle wrote: > > On May 16, 2005, at 3:16 PM, Blake Matheny wrote: > > > Attached is a small patch that allows for a custom error handler to be used > > instead of php_log_err. This is useful for custom logging of error types > > that can't be handled with a user-space error handler (such as E_ERROR, > > E_PARSE, etc.). > > > > In order to use a custom error handler set error_log to so:/path/to/so in > > the php.ini file, where the shared object has a function called > > error_handler with the following prototype: > > > This is already possible without your patch: just write a php extension and > change the zend_error_cb function pointer to your custom C function in MINIT. But make sure you call the original one after that... otherwise you might break other extensions that modify the error_cb (like Xdebug). Derick -- Derick Rethans http://derickrethans.nl | http://ez.no | http://xdebug.org