|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2004-06-23 13:59 UTC] webmaster at rrze dot uni-erlangen dot de
[2004-06-25 10:15 UTC] derick@php.net
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Sun Oct 26 22:00:01 2025 UTC |
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()