From: seld
Operating system: Windows7
PHP version: 5.5.0RC3
Package: SPL related
Bug Type: Bug
Bug description:GlobIterator fails to access files inside an open_basedir
restricted dir
Description:
------------
GlobIterator fails to access files present in a valid directory when an
open_basedir restriction is in effect. Even if the dir is inside the
open_basedir restriction it fails.
Test script:
---------------
ini_set('open_basedir', __DIR__);
var_dump(glob(__DIR__.'/*.php'));
var_dump(iterator_to_array(new GlobIterator(__DIR__.'/*.php')));
Expected result:
----------------
Two lists of php files in the current dir.
Actual result:
--------------
The glob() call returns a list of files, then the GlobIterator explodes
with:
UnexpectedValueException: GlobIterator::__construct(): open_basedir
restriction in effect. File(glob://C:\Users\seld/*.php) is not within the
allowed path(s): (C:\Users\seld) in C:\Users\seld\test.php on line 6
--
Edit bug report at https://bugs.php.net/bug.php?id=65069&edit=1
--
Try a snapshot (PHP 5.4):
https://bugs.php.net/fix.php?id=65069&r=trysnapshot54
Try a snapshot (PHP 5.3):
https://bugs.php.net/fix.php?id=65069&r=trysnapshot53
Try a snapshot (trunk):
https://bugs.php.net/fix.php?id=65069&r=trysnapshottrunk
Fixed in SVN: https://bugs.php.net/fix.php?id=65069&r=fixed
Fixed in release: https://bugs.php.net/fix.php?id=65069&r=alreadyfixed
Need backtrace: https://bugs.php.net/fix.php?id=65069&r=needtrace
Need Reproduce Script: https://bugs.php.net/fix.php?id=65069&r=needscript
Try newer version: https://bugs.php.net/fix.php?id=65069&r=oldversion
Not developer issue: https://bugs.php.net/fix.php?id=65069&r=support
Expected behavior: https://bugs.php.net/fix.php?id=65069&r=notwrong
Not enough info:
https://bugs.php.net/fix.php?id=65069&r=notenoughinfo
Submitted twice:
https://bugs.php.net/fix.php?id=65069&r=submittedtwice
register_globals: https://bugs.php.net/fix.php?id=65069&r=globals
PHP 4 support discontinued: https://bugs.php.net/fix.php?id=65069&r=php4
Daylight Savings: https://bugs.php.net/fix.php?id=65069&r=dst
IIS Stability: https://bugs.php.net/fix.php?id=65069&r=isapi
Install GNU Sed: https://bugs.php.net/fix.php?id=65069&r=gnused
Floating point limitations: https://bugs.php.net/fix.php?id=65069&r=float
No Zend Extensions: https://bugs.php.net/fix.php?id=65069&r=nozend
MySQL Configuration Error: https://bugs.php.net/fix.php?id=65069&r=mysqlcfg