readdir coredumps

From: Date: Wed, 18 Oct 2000 14:31:32 +0000
Subject: readdir coredumps
Groups: php.general 
Request: Send a blank email to php-general+get-20900@lists.php.net to get a copy of this message
I am running the simple code below from command line on Solaris7 box: #!/data/php-4.0.2/php -q <? $some_dir = opendir("/usr/tmp/"); echo "Directory handle : " . $some_dir . "\n"; $directory_list = readdir($some_dir); echo "List: " . $directory_list . "\n"; $directory_list = readdir($some_dir); print($directory_list . "\n"); print(filesize($directory_list) . "\n"); closedir($some_dir); ?> After I run this I get following in my xterm window: Directory handle : Resource id #1 List: . Segmentation Fault(coredump) It looks that it runs fine on first readdir (which is (.)) and For some reason chokes on the second (I guess it's (..) entry In directory list) Also I noticed that if I put filesize($directory_list) after first readdir It gives me size of the (.) entry in the current directory not in the One I'm opening with opendir. Anyone have any ideas what could be wrong? Thanks, Rimantas

« previous php.general (#20900) next »