Edit report at https://bugs.php.net/bug.php?id=65069&edit=1

 ID:                 65069
 Updated by:         a...@php.net
 Reported by:        s...@php.net
 Summary:            GlobIterator fails to access files inside an
                     open_basedir restricted dir
-Status:             Open
+Status:             Feedback
 Type:               Bug
 Package:            SPL related
 Operating System:   Windows7
 PHP Version:        5.5.0RC3
 Block user comment: N
 Private report:     N

 New Comment:

Thank you for this bug report. To properly diagnose the problem, we
need a short but complete example script to be able to reproduce
this bug ourselves. 

A proper reproducing script starts with <?php and ends with ?>,
is max. 10-20 lines long and does not require any external 
resources such as databases, etc. If the script requires a 
database to demonstrate the issue, please make sure it creates 
all necessary tables, stored procedures etc.

Please avoid embedding huge scripts into the report.

Tried your snippet on CLI, but there's no behaviour you describe. I see a 
proper listing in both 
cases. There must be something else causing this.


Previous Comments:
------------------------------------------------------------------------
[2013-06-20 14:48:58] s...@php.net

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 this bug report at https://bugs.php.net/bug.php?id=65069&edit=1

Reply via email to