Hi Arnold, Am Samstag, 26. Mai 2007 00:28 schrieben Sie: > If I need to run gdb please let me know,
I did a gdb and on my system (debian, CLI). filetype returns 'dir' as well. my code was php -r 'filetype("/tmp/link-test");' Where /tmp/link-test is a link to a directory /tmp/pear. This is some of the output: I set a breakpoint to php_stat. You can see the parameters passed to it. Breakpoint 1, php_stat (filename=0xb78f4584 "/tmp/link-test", filename_length=14, type=8, return_value=0xb78f5044, tsrm_ls=0x87b8018) at /usr/local/src/php-5.2.2/ext/standard/filestat.c:730 Some of the steps beginning at line 851 (standard/filestat.c, php_stat()) 851 switch (type) { (gdb) 881 if (S_ISLNK(ssb.sb.st_mode)) { (gdb) 884 switch(ssb.sb.st_mode & S_IFMT) { (gdb) 887 case S_IFDIR: RETURN_STRING("dir", 1); (gdb) 981 } This is a print of ssb (gdb) p ssb $2 = {sb = {st_dev = 769, __pad1 = 0, st_ino = 66149, st_mode = 16877, st_nlink = 2, st_uid = 0, st_gid = 0, st_rdev = 0, __pad2 = 0, st_size = 4096, st_blksize = 4096, st_blocks = 8, st_atim = { tv_sec = 1180124961, tv_nsec = 0}, st_mtim = {tv_sec = 1180124961, tv_nsec = 0}, st_ctim = {tv_sec = 1180124961, tv_nsec = 0}, __unused4 = 0, __unused5 = 0}} Regards, Oliver -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php