#32771 [NEW]: is_dir() returns false for absolute path. Even if it is a folder

From: Date: Tue, 19 Apr 2005 15:31:28 +0000
Subject: #32771 [NEW]: is_dir() returns false for absolute path. Even if it is a folder
Groups: php.bugs 
Request: Send a blank email to php-bugs+get-77892@lists.php.net to get a copy of this message
From: silkensedai at online dot fr Operating system: GNU/Linux Ubuntu 5.4 PHP version: 5.0.4 PHP Bug Type: *Directory/Filesystem functions Bug description: is_dir() returns false for absolute path. Even if it is a folder Description: ------------ is_dir() does not work when the folder is an absolute path. For example is_dir('/mnt') won't work (return false). But it works for relative path. Example: $ php -r 'clearstatcache();var_dump(is_dir("/mnt/"));' bool(false) $ php -r 'clearstatcache();var_dump(is_dir("./Templates"));' bool(true) $ test -d "/mnt/" && echo dir || echo not_dir dir $ test -d "./Templates" && echo dir || echo not_dir dir From phpinfo(): PHP Version 5.0.4 System: Linux louve 2.6.10-5-386 #1 Tue Apr 5 12:12:40 UTC 2005 i686 Configure Command: './configure' '--quiet' '--enable-cli' '--enable-cgi' '--disable-all' '--disable-rpath' '--disable-debug' '--disable-path-info-check' '--disable-magic-quotes' '--disable-posix' '--disable-short-tags' '--enable-ipv6' '--disable-static' '--disable-pcntl' '--without-pear' '--with-apxs2=/usr/bin/apxs2' '--with-mysql=/usr' '--with-mysqli=/usr/bin/mysql_config' '--with-zlib' '--with-bz2' '--with-dbx' '--with-ctype' '--with-openssl' '--with-pcre-regex' '--with-gettext' '--with-mcrypt' '--with-mhash' '--with-iconv' '--with-sqlite' '--with-sqlite-utf8' '--with-gd' '--with-jpeg-dir' '--with-png-dir' '--with-zlib-dir' '--with-xpm-dir' '--with-ttf' '--with-xsl' '--with-tsrm-pthreads' '--with-tidy' '--with-freetype-dir' '--enable-gd-native-ttf' '--enable-safe-mode' '--enable-calendar' '--enable-mbstring' '--enable-spl' '--enable-ftp' '--enable-bcmath' '--enable-sockets' '--enable-dom' '--enable-xml' '--enable-soap' '--enable-libxml' '--enable-session' '--enable-simplexml' '--enable-memory-limit' Server API Apache 2.0 Handler PHP API 20031224 PHP Extension 20041030 Zend Extension 220040412 Reproduce code: --------------- print is_dir('/')?"dir: /":"not_dir: /"; Expected result: ---------------- dir: / Actual result: -------------- not_dir: / -- Edit bug report at http://bugs.php.net/?id=32771&edit=1 -- Try a CVS snapshot (php4): http://bugs.php.net/fix.php?id=32771&r=trysnapshot4 Try a CVS snapshot (php5.0): http://bugs.php.net/fix.php?id=32771&r=trysnapshot50 Try a CVS snapshot (php5.1): http://bugs.php.net/fix.php?id=32771&r=trysnapshot51 Fixed in CVS: http://bugs.php.net/fix.php?id=32771&r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=32771&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=32771&r=needtrace Need Reproduce Script: http://bugs.php.net/fix.php?id=32771&r=needscript Try newer version: http://bugs.php.net/fix.php?id=32771&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=32771&r=support Expected behavior: http://bugs.php.net/fix.php?id=32771&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=32771&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=32771&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=32771&r=globals PHP 3 support discontinued: http://bugs.php.net/fix.php?id=32771&r=php3 Daylight Savings: http://bugs.php.net/fix.php?id=32771&r=dst IIS Stability: http://bugs.php.net/fix.php?id=32771&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=32771&r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=32771&r=float No Zend Extensions: http://bugs.php.net/fix.php?id=32771&r=nozend MySQL Configuration Error: http://bugs.php.net/fix.php?id=32771&r=mysqlcfg

« previous php.bugs (#77892) next »