A question about php_streams
| From: | Mikey | Date: | Wed, 09 Feb 2005 17:03:51 +0000 |
| Subject: | A question about php_streams | ||
| Groups: | php.internals | ||
| Request: | Send a blank email to internals+get-14760@lists.php.net to get a copy of this message | ||
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