Weird results with is_dir()

From: Date: Wed, 30 Apr 2003 00:13:05 +0000
Subject: Weird results with is_dir()
Groups: php.general 
Request: Send a blank email to php-general+get-145715@lists.php.net to get a copy of this message
Hi folks... This is my first post, so please be gentle :) I'm writing a script, part of which traverses a directory tree by opening a directory with opendir(), getting file handles, testing them to see if they are directories with is_dir(), and if they are then it opens them using opendir(), and soforth. It;'s a recursive function, and it seems to work nicely on the linux server. The trouble starts when trying to run it on the IIS server. Rather than have to rewrite the entire script and copy everything across to the other server, I mounted the NTFS share to the linux server using mount -t smb (etc...). The unusual thing is that from here, is_dir() only seems to work on a percentage of the files. The documentation suggests that it returns a boolean, however in practise it is returning 1's or 0's for some files, but is returning nothing at all for others...! So some of the directories are returning 1, others nothing. Some of the non-directory files are returning 0, others nothing. I'll include code samples if required, but I suspect the problem's more a configuration or other black magic type problem rather than something syntactical... as I said, it works fine when run on the linux server. Any help greatly appreciated :) Cheers, Jason =)

« previous php.general (#145715) next »