Hello Adam, Friday, January 23, 2004, 9:48:42 PM, you wrote:
> I'm trying to run the SPL examples and running into some > problems. Some of these I was able to work around, but I eventually > end up generating a 192 Mb core dump with a 1000+ line gdb > backtrace. It's actually quite an impressive crash. :) > First of all, I'm running under PHP 5 Beta 3 since the current CVS no > longer allows an Interface to implement an Interface. (Maybe this is > the biggest problem? I thought I rememebered Andi claim that Zeev will > be fixing this RSN?) > Second, there is a small typo in recursiveiteratoriterator.inc. Line > 67 has one extra closing ')'. I fixed this. > Next, I get an error that recursivedirectoryiterator.inc cannot be > found. Based on some guess work, I created this file and placed the > following PHP code inside: > class RecursiveDirectoryIterator extends DirectoryTreeIterator { } > I'm not sure if this is correct, but it allowed me to run the > following without any warnings: > ~/Documents/php/php-5.0.0b3/sapi/cli/php -d include_path=. > -d auto_prepend_file=autoload.inc tree.php ../../dba > Unfortunately, this gives a big core dump. :( > If anyone has some suggestions I'm happy to try them. In the meantime > I will start with a more basic example and see what pushes PHP over > the edge. Maybe that will give a more reasonable backtrace. (Marcus: I > will send you my current backtrace if you think it will be helpful.) The way you created RecursiveDirectoryIterator should be the problem. At least i hope so. The class is suppoed to implement interface RecursiveIterator which you are obviously missing. Apart from that the class is a built in class (or are you trying the code without ext/spl?). You can verify the existence of the class by the following line: $ php -r 'Reflection_Class::export("RecursiveDirectoryIterator");' You should then see an outut like this: Class [ <internal> <iterateable> class RecursiveDirectoryIterator extends DirectoryIterator implements Traversable, Iterator, RecursiveIterator ] { - Constants [0] { } [...] Where two things are important. First the fact that the class is an internal class and second that it implements interface RecursiveIterator. You may also send me the bt. But i know those funny bitches. Such lengthy bts occur when the error happens very deep inrecursion. And thanks for noticing the error in the example (i shouldn't rewrite test files when no longer using them). Best regards, Marcus mailto:[EMAIL PROTECTED] -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php