DragonFly BSD
DragonFly users List (threaded) for 2005-02
[Date Prev][Date Next]  [Thread Prev][Thread Next]  [Date Index][Thread Index]

PHP 4.3.10_2 readdir() misses files


From: Joerg Anslik <joerg@xxxxxxxxx>
Date: Mon, 07 Feb 2005 17:56:17 +0100

Hi,

if someone here has PHP 4.3.10_2 installed...do me a favor and try
this one:

----------
<?php
if(($dh = @opendir("/tmp")) == false) {

	print "No such dir!\n";
	
	exit;
}

while($entry = readdir($dh)) {

	print "[$entry]\n";
	}
	
	closedir($dh);
?>
----------

On my machine, there are currently 12 files/dirs in /tmp, but PHP only
catches five of them. I made a test directory containing 10 copies of
/etc/hosts, all same permissions, etc., and again, PHP misses files
and only shows four out of ten (always the same files).

I did a buildworld/kernel today and been facing the problem since
then; the same code snippet worked correct until yesterday. And yes, I
also re-installed PHP, etc. to be sure everything is up to date.

The same mechanism in C, however, yields the correct output. So, if
anyone would do a test run with this PHP stuff and inform me of the
results, I'd appreciate that!

Tnx

--j

------------------
cd /pub
more beer



[Date Prev][Date Next]  [Thread Prev][Thread Next]  [Date Index][Thread Index]