From: trancer at trancer dot nl
Operating system: Linux
PHP version: 4.3.6
PHP Bug Type: Directory function related
Bug description: glob wont error if dir is not readable
Description:
------------
If the dir isnt readable by the webserver (apache in my case) glob() wont
list a thing. Glob wont return an error like 'permission denied' though
alike other functions do.
It would be nice to see that when glob() cant read the directory it will
return an error or a notice.
Reproduce code:
---------------
<?php
error_reporting(E_ALL);
print_r(glob('*.png'));
?>
The dir in which the png file was, was chmodded to 711 so apache only had
execution rights.
Expected result:
----------------
Warning: permission denied ....
Array( )
Actual result:
--------------
Array( )
--
Edit bug report at http://bugs.php.net/?id=28355&edit=1
--
Try a CVS snapshot (php4): http://bugs.php.net/fix.php?id=28355&r=trysnapshot4
Try a CVS snapshot (php5): http://bugs.php.net/fix.php?id=28355&r=trysnapshot5
Fixed in CVS: http://bugs.php.net/fix.php?id=28355&r=fixedcvs
Fixed in release: http://bugs.php.net/fix.php?id=28355&r=alreadyfixed
Need backtrace: http://bugs.php.net/fix.php?id=28355&r=needtrace
Need Reproduce Script: http://bugs.php.net/fix.php?id=28355&r=needscript
Try newer version: http://bugs.php.net/fix.php?id=28355&r=oldversion
Not developer issue: http://bugs.php.net/fix.php?id=28355&r=support
Expected behavior: http://bugs.php.net/fix.php?id=28355&r=notwrong
Not enough info: http://bugs.php.net/fix.php?id=28355&r=notenoughinfo
Submitted twice: http://bugs.php.net/fix.php?id=28355&r=submittedtwice
register_globals: http://bugs.php.net/fix.php?id=28355&r=globals
PHP 3 support discontinued: http://bugs.php.net/fix.php?id=28355&r=php3
Daylight Savings: http://bugs.php.net/fix.php?id=28355&r=dst
IIS Stability: http://bugs.php.net/fix.php?id=28355&r=isapi
Install GNU Sed: http://bugs.php.net/fix.php?id=28355&r=gnused
Floating point limitations: http://bugs.php.net/fix.php?id=28355&r=float