Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:14760 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 91616 invoked by uid 1010); 9 Feb 2005 17:02:16 -0000 Delivered-To: ezmlm-scan-internals@lists.php.net Delivered-To: ezmlm-internals@lists.php.net Received: (qmail 91483 invoked from network); 9 Feb 2005 17:02:15 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 9 Feb 2005 17:02:15 -0000 X-Host-Fingerprint: 80.189.94.53 smtp1.global.net.uk FreeBSD 4.7-5.2 (or MacOS X 10.2-10.3) (2) Received: from ([80.189.94.53:52441] helo=smtp1.global.net.uk) by pb1.pair.com (ecelerity HEAD (r4105:4106)) with SMTP id 41/01-24923-6124A024 for ; Wed, 09 Feb 2005 12:02:14 -0500 Received: from ps.189.62.194.dial.global.net.uk ([80.189.62.194] helo=bagpuss) by smtp1.global.net.uk with esmtp (Exim 4.24; FreeBSD) id 1CyvEA-000CYq-Vh for internals@lists.php.net; Wed, 09 Feb 2005 17:02:11 +0000 Reply-To: To: "PHP Internals" Date: Wed, 9 Feb 2005 17:03:51 -0000 MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Mailer: Microsoft Office Outlook, Build 11.0.5510 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1441 thread-index: AcUOyVPjqE399yhhS1a/tJhAs7csUQ== Message-ID: Authenticated-Sender: Subject: A question about php_streams From: frak@totalise.co.uk ("Mikey") Hi NG! This is my first post to this NG and would like to prefix my question with the following: - I have read the manual, thoroughly. There is absolutely nothing in there apart from how to call the funtion. - I have searched the mailing list archives, to no avail. - I have grep'ed the source, and have found one use of this function in opendir(), this has had limited usefulness. - I have googled, and this had provided a great big list of manual mirrors for my future reference ;-) Although I did find a page with a CVS commit on it that had modified my example code. I am trying to write a function that will recurse a directory, now the logic of that is my bat and I am not seeking help with that. But I have tried using the php_streams API to open the base directory with the following code: php_stream *base_dir = NULL; php_stream_context *context = NULL; TSRMLS_FETCH(); base_dir = php_stream_opendir (TMPL_G(template_dir), ENFORCE_SAFE_MODE|REPORT_ERRORS, context); However, everytime I try to run the module with this last line, I get a segfault in apache. Now I am not very capable when it comes to Linux C development and am only vaguely familiar with what gdb does, so I can't really provide you with any other info than this. Any help, pointers, etc would be greatly appreciated... Mikey