Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:37003 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 39212 invoked from network); 14 Apr 2008 14:54:57 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 14 Apr 2008 14:54:57 -0000 Authentication-Results: pb1.pair.com header.from=greg@chiaraquartet.net; sender-id=unknown Authentication-Results: pb1.pair.com smtp.mail=greg@chiaraquartet.net; spf=permerror; sender-id=unknown Received-SPF: error (pb1.pair.com: domain chiaraquartet.net from 38.99.98.18 cause and error) X-PHP-List-Original-Sender: greg@chiaraquartet.net X-Host-Fingerprint: 38.99.98.18 beast.bluga.net Linux 2.6 Received: from [38.99.98.18] ([38.99.98.18:41687] helo=mail.bluga.net) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 4E/85-11147-E3073084 for ; Mon, 14 Apr 2008 10:54:56 -0400 Received: from mail.bluga.net (localhost.localdomain [127.0.0.1]) by mail.bluga.net (Postfix) with ESMTP id B3615C10A28; Mon, 14 Apr 2008 07:54:53 -0700 (MST) Received: from [192.168.0.106] (CPE-76-84-4-101.neb.res.rr.com [76.84.4.101]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.bluga.net (Postfix) with ESMTP id 3556AC10A27; Mon, 14 Apr 2008 07:54:53 -0700 (MST) Message-ID: <48037059.3040508@chiaraquartet.net> Date: Mon, 14 Apr 2008 09:55:21 -0500 User-Agent: Thunderbird 2.0.0.12 (X11/20080227) MIME-Version: 1.0 To: Pierre Joye CC: internals Mailing List References: <4802868B.2030105@chiaraquartet.net> In-Reply-To: X-Enigmail-Version: 0.95.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Virus-Scanned: ClamAV using ClamSMTP Subject: Re: [PHP-DEV] php_stream_display_wrapper_errors issue From: greg@chiaraquartet.net (Gregory Beaver) Pierre Joye wrote: > Hi Greg, > > On Mon, Apr 14, 2008 at 12:17 AM, Gregory Beaver wrote: > >> Hi, >> >> If a stream wrapper does not log errors, by default, we grab >> strerror(errno) to figure out the error message, but this is not a good >> idea for any wrapper but plain_wrapper for the obvious reason that errno >> is not used by wrappers that don't use sys calls. >> >> Is this patch against 5.3 acceptable (I'll merge to HEAD on commit if so)? >> > > I think it fixes the possible misguided error messages. To go one step > further, I wonder if it would make sense to add a stream_strno and > stream_strerror to _php_stream_wrapper_ops. It may be helpful to > display the actual error or for debugging purposes (user land or > internally). Comments? Hi, In theory, a stream wrapper should be using php_stream_wrapper_log_error() for all errors, so I think stream_strerror should be unnecessary. Thanks, Greg