> 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 -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php