Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:14765 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 80052 invoked by uid 1010); 9 Feb 2005 17:50:48 -0000 Delivered-To: ezmlm-scan-internals@lists.php.net Delivered-To: ezmlm-internals@lists.php.net Received: (qmail 80037 invoked by uid 1007); 9 Feb 2005 17:50:48 -0000 Message-ID: <20050209175047.80034.qmail@lists.php.net> To: internals@lists.php.net References: Date: Wed, 9 Feb 2005 09:50:42 -0800 Lines: 26 X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2900.2180 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2180 X-RFC2646: Format=Flowed; Original X-Posted-By: 68.26.94.142 Subject: Re: A question about php_streams From: pollita@php.net ("Sara Golemon") > 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); > That code is (on the surface at least) fine. > 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. > Here's some instructions on generating a backtrace: http://bugs.php.net/bugs-generating-backtrace.php Also, check to make sure that TMPL_G(template_dir) is (A) defined, and (B) points to a NULL terminated string in a memory segmet accessable to the process. Of course, the backtrace will reveal that anyway. -Sara