From:             webmaster at rrze dot uni-erlangen dot de
Operating system: SunOS 5.9
PHP version:      5.0.0RC3
PHP Bug Type:     Directory function related
Bug description:  readdir() doesn't work

Description:
------------
uname -a:
SunOS {HOSTNAME} 5.9 Generic_112233-12 sun4u sparc SUNW Ultra-Enterprise

PHP5.0.0RC3, compiled as cgi-sapi (with cli) with gcc version 2.95.3 for
64bit.

Calling the readdir() function returns a "Fatal error: Call to undefined
function readdir()", both from the cgi- and cli-sapi.
This is not influenced by execute rights of the php binary.
Using -e (extended debugging info) and -n (don't use php.ini) doesn't
provide any further information.
This in turn makes the PEAR Installation fail as those scripts also use
readdir().
opendir(), is_dir(), dir(), scandir(), getcwd(), chdir() all work.




Reproduce code:
---------------
CGI:
----
if ($handle = opendir("/any/path/here")) {
   while (false !== ($file = readdir($handle))) { 
       echo "$file\n";
   }
}

CLI:
----
php -e -n -r 'if ($handle = opendir("/any/path/here")) { while (false !==
($file = readdir($handle))) { echo "$file\n"; } };'


Expected result:
----------------
list of files in the directory

Actual result:
--------------
Fatal error: Call to undefined function readdir()

-- 
Edit bug report at http://bugs.php.net/?id=28890&edit=1
-- 
Try a CVS snapshot (php4):  http://bugs.php.net/fix.php?id=28890&r=trysnapshot4
Try a CVS snapshot (php5):  http://bugs.php.net/fix.php?id=28890&r=trysnapshot5
Fixed in CVS:               http://bugs.php.net/fix.php?id=28890&r=fixedcvs
Fixed in release:           http://bugs.php.net/fix.php?id=28890&r=alreadyfixed
Need backtrace:             http://bugs.php.net/fix.php?id=28890&r=needtrace
Need Reproduce Script:      http://bugs.php.net/fix.php?id=28890&r=needscript
Try newer version:          http://bugs.php.net/fix.php?id=28890&r=oldversion
Not developer issue:        http://bugs.php.net/fix.php?id=28890&r=support
Expected behavior:          http://bugs.php.net/fix.php?id=28890&r=notwrong
Not enough info:            http://bugs.php.net/fix.php?id=28890&r=notenoughinfo
Submitted twice:            http://bugs.php.net/fix.php?id=28890&r=submittedtwice
register_globals:           http://bugs.php.net/fix.php?id=28890&r=globals
PHP 3 support discontinued: http://bugs.php.net/fix.php?id=28890&r=php3
Daylight Savings:           http://bugs.php.net/fix.php?id=28890&r=dst
IIS Stability:              http://bugs.php.net/fix.php?id=28890&r=isapi
Install GNU Sed:            http://bugs.php.net/fix.php?id=28890&r=gnused
Floating point limitations: http://bugs.php.net/fix.php?id=28890&r=float

Reply via email to