Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:30919 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 18743 invoked by uid 1010); 14 Jul 2007 08:43:41 -0000 Delivered-To: ezmlm-scan-internals@lists.php.net Delivered-To: ezmlm-internals@lists.php.net Received: (qmail 18728 invoked from network); 14 Jul 2007 08:43:41 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 14 Jul 2007 08:43:41 -0000 Authentication-Results: pb1.pair.com header.from=antony@zend.com; sender-id=pass Authentication-Results: pb1.pair.com smtp.mail=antony@zend.com; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain zend.com designates 212.25.124.162 as permitted sender) X-PHP-List-Original-Sender: antony@zend.com X-Host-Fingerprint: 212.25.124.162 mail.zend.com Linux 2.5 (sometimes 2.4) (4) Received: from [212.25.124.162] ([212.25.124.162:49752] helo=mail.zend.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id E2/80-14498-9BC88964 for ; Sat, 14 Jul 2007 04:43:41 -0400 Received: (qmail 18173 invoked from network); 14 Jul 2007 08:43:34 -0000 Received: from internal.zend.office (HELO ?127.0.0.1?) (10.1.1.1) by internal.zend.office with SMTP; 14 Jul 2007 08:43:34 -0000 Message-ID: <46988CB6.7050100@zend.com> Date: Sat, 14 Jul 2007 12:43:34 +0400 User-Agent: Thunderbird 2.0.0.0 (X11/20070326) MIME-Version: 1.0 To: "Usman S. Ansari" CC: internals@lists.php.net References: <46987258.4030205@yahoo.com> In-Reply-To: <46987258.4030205@yahoo.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: [PHP-DEV] PHP Source Code Help From: antony@zend.com (Antony Dovgal) On 14.07.2007 10:51, Usman S. Ansari wrote: > I am trying to debug my custom TCP stack which is running under Linux > OS. Do to some bug in my stack or missing feature I am getting error > following from php. > > failed to open stream > > Which I have traced to file: php-4.4.7/main/streams.c and function: Don't use it, it's not supported anymore. > _php_stream_open_wrapper_ex > > stream = wrapper->wops->stream_opener(wrapper, path_to_open, > mode, options ^ REPORT_ERRORS, > opened_path, context STREAMS_REL_CC TSRMLS_CC); > > Error condition occurs when stream is assigned NULL from > wrapper->wops->stream_opener call (see above line). I need some help > figuring out which function is call by pointer > wrapper->wops->stream_opener. Use any of the debuggers available to step into it and see which function is called. > I tried putting debug statements in some > functions which are called on pointers (based on different ops (read / > write / flush operations, etc.), so far I have not hit a function > pointed by wrapper->wops->stream_opener. > > Also, if there is any documentation for understanding php source code. > Usman > P.S. I know 4.4.7 is old php, but by system is setup with this version > for debugging TCP stack (for some reason) > -- Wbr, Antony Dovgal