#48365 [NEW]: glob() function returns empty array
| From: | peter dot chen at itg dot com | Date: | Fri, 22 May 2009 19:38:20 +0000 |
| Subject: | #48365 [NEW]: glob() function returns empty array | ||
| Groups: | php.bugs | ||
| Request: | Send a blank email to php-bugs+get-137656@lists.php.net to get a copy of this message | ||
From: peter dot chen at itg dot com
Operating system: sparc-sol2.10
PHP version: 5.2.9
PHP Bug Type: Apache2 related
Bug description: glob() function returns empty array
Description:
------------
I am trying to use glob() to display the contents of a directory
I store the path in a variable ($path).
When I give $path as an argument to glob($path), it returns an empty
array.
When I give it to scandir($path), it returns all the files in that path.
Reproduce code:
---------------
---
From manual page: function.glob
---
Expected result:
----------------
Array ( [0] => . [1] => .. [2] => authtest [3] => globtest.php [4] =>
globtest.php.LCK [5] => globtest2.php [6] => home.php.LCK )
Actual result:
--------------
Array ( )
--
Edit bug report at http://bugs.php.net/?id=48365&edit=1
--
Try a CVS snapshot (PHP 5.2): http://bugs.php.net/fix.php?id=48365&r=trysnapshot52
Try a CVS snapshot (PHP 5.3): http://bugs.php.net/fix.php?id=48365&r=trysnapshot53
Try a CVS snapshot (PHP 6.0): http://bugs.php.net/fix.php?id=48365&r=trysnapshot60
Fixed in CVS: http://bugs.php.net/fix.php?id=48365&r=fixedcvs
Fixed in CVS and need be documented: http://bugs.php.net/fix.php?id=48365&r=needdocs
Fixed in release: http://bugs.php.net/fix.php?id=48365&r=alreadyfixed
Need backtrace: http://bugs.php.net/fix.php?id=48365&r=needtrace
Need Reproduce Script: http://bugs.php.net/fix.php?id=48365&r=needscript
Try newer version: http://bugs.php.net/fix.php?id=48365&r=oldversion
Not developer issue: http://bugs.php.net/fix.php?id=48365&r=support
Expected behavior: http://bugs.php.net/fix.php?id=48365&r=notwrong
Not enough info: http://bugs.php.net/fix.php?id=48365&r=notenoughinfo
Submitted twice: http://bugs.php.net/fix.php?id=48365&r=submittedtwice
register_globals: http://bugs.php.net/fix.php?id=48365&r=globals
PHP 4 support discontinued: http://bugs.php.net/fix.php?id=48365&r=php4
Daylight Savings: http://bugs.php.net/fix.php?id=48365&r=dst
IIS Stability: http://bugs.php.net/fix.php?id=48365&r=isapi
Install GNU Sed: http://bugs.php.net/fix.php?id=48365&r=gnused
Floating point limitations: http://bugs.php.net/fix.php?id=48365&r=float
No Zend Extensions: http://bugs.php.net/fix.php?id=48365&r=nozend
MySQL Configuration Error: http://bugs.php.net/fix.php?id=48365&r=mysqlcfg