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

 ID:                 47358
 Comment by:         manuel-php at mausz dot at
 Reported by:        php at guggemand dot dk
 Summary:            glob returns error, should be empty array()
 Status:             Assigned
 Type:               Bug
 Package:            Safe Mode/open_basedir
 Operating System:   FreeBSD 7.1
 PHP Version:        5.2.9RC1
 Assigned To:        pajoye
 Block user comment: N
 Private report:     N

 New Comment:

Hi Pierre!

Please merge your patch asap to php.
It works as expected and will fix the following inconsistency:
$ php -dopen_basedir=/ -r 'var_dump(glob("/does/not/exist"));'
bool(false)
$ php -r 'var_dump(glob("/does/not/exist"));'
array(0) {
}

Something to consider is updating the docs to mention returning false if 
open_basedir restriction is in effect.


Previous Comments:
------------------------------------------------------------------------
[2011-10-09 17:08:22] paj...@php.net

The following patch has been added/updated:

Patch Name: open_basedir_error_fix
Revision:   1318180102
URL:        
https://bugs.php.net/patch-display.php?bug=47358&patch=open_basedir_error_fix&revision=1318180102

------------------------------------------------------------------------
[2011-10-09 16:51:14] paj...@php.net

Please try using this patch (against 5.4 but should work against 5.3). I will 
remove the warning too to make it works like the other call (was just to ease 
the 
test).

------------------------------------------------------------------------
[2011-10-09 16:50:22] paj...@php.net

The following patch has been added/updated:

Patch Name: open_basedir_error_fix
Revision:   1318179021
URL:        
https://bugs.php.net/patch-display.php?bug=47358&patch=open_basedir_error_fix&revision=1318179021

------------------------------------------------------------------------
[2011-10-09 16:39:03] paj...@php.net

I agree, there is no error here but a wrong test. I will fix it soonish, 
checking 
the logic in there.

------------------------------------------------------------------------
[2011-10-04 14:32:45] harald dot lapp at gmail dot com

It seems to me, that "glob" is returning false, even though the path i try to 
glob 
is valid compared to the "open_basdir" settings. Could you please have a 
further 
look at this issue?

(tried this with php 5.3.6 and php 5.3.8, btw.)

------------------------------------------------------------------------


The remainder of the comments for this report are too long. To view
the rest of the comments, please view the bug report online at

    https://bugs.php.net/bug.php?id=47358


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

Reply via email to