From:             flconseil at yahoo dot fr
Operating system: All
PHP version:      5.1.4
PHP Bug Type:     Feature/Change Request
Bug description:  glob() problems

Description:
------------
Today, glob() calls the libc glob() function, with the following
problems:

- Possible inconsistencies between implementations (POSIX compliance)

- fnmatch not available outside of Unix : an internal glob()
implementation would bring an internal fnmatch() implementation, which
would allow fnmatch() on every platform.

- Important: on most (every ?) Unix systems, glob() is using stat()
instead of lstat(). Thus, broken links are ignored. Inconsistant with a
naive 'ls' which lists everything in the directory.

- The current glob() implementation in PHP (ext/standard/dir.c) assumes
that all returned matches are in the same directory, which is wrong. So,
the 'safe mode' and 'open_basedir' checks are wrong.

- glob() does not support streams, although most other directory functions
support them. It cannot be done without implementing glob() internally.

- Apart from glob(), the chdir() and getcwd() functions should also
support stream-wrapped directories. It would be easy to implement but it
must be synchronized with the support of stream wrapped paths in the
include path.

Reproduce code:
---------------
None

Expected result:
----------------
None

Actual result:
--------------
None

-- 
Edit bug report at http://bugs.php.net/?id=38022&edit=1
-- 
Try a CVS snapshot (PHP 4.4): 
http://bugs.php.net/fix.php?id=38022&r=trysnapshot44
Try a CVS snapshot (PHP 5.2): 
http://bugs.php.net/fix.php?id=38022&r=trysnapshot52
Try a CVS snapshot (PHP 6.0): 
http://bugs.php.net/fix.php?id=38022&r=trysnapshot60
Fixed in CVS:                 http://bugs.php.net/fix.php?id=38022&r=fixedcvs
Fixed in release:             
http://bugs.php.net/fix.php?id=38022&r=alreadyfixed
Need backtrace:               http://bugs.php.net/fix.php?id=38022&r=needtrace
Need Reproduce Script:        http://bugs.php.net/fix.php?id=38022&r=needscript
Try newer version:            http://bugs.php.net/fix.php?id=38022&r=oldversion
Not developer issue:          http://bugs.php.net/fix.php?id=38022&r=support
Expected behavior:            http://bugs.php.net/fix.php?id=38022&r=notwrong
Not enough info:              
http://bugs.php.net/fix.php?id=38022&r=notenoughinfo
Submitted twice:              
http://bugs.php.net/fix.php?id=38022&r=submittedtwice
register_globals:             http://bugs.php.net/fix.php?id=38022&r=globals
PHP 3 support discontinued:   http://bugs.php.net/fix.php?id=38022&r=php3
Daylight Savings:             http://bugs.php.net/fix.php?id=38022&r=dst
IIS Stability:                http://bugs.php.net/fix.php?id=38022&r=isapi
Install GNU Sed:              http://bugs.php.net/fix.php?id=38022&r=gnused
Floating point limitations:   http://bugs.php.net/fix.php?id=38022&r=float
No Zend Extensions:           http://bugs.php.net/fix.php?id=38022&r=nozend
MySQL Configuration Error:    http://bugs.php.net/fix.php?id=38022&r=mysqlcfg

Reply via email to