From:             
Operating system: Unix
PHP version:      5.3SVN-2010-06-12 (SVN)
Package:          Safe Mode/open_basedir
Bug Type:         Bug
Bug description:Warning about open_basedir restriction while accessing a file 
as directory

Description:
------------
fopen_wrappers raise warning about open_basedir restriction in effect while
accessing a file as a directory. This only occurs if the file exists.



Test script:
---------------
# sapi/cli/php -n -d open_basedir="$(pwd)" -r
'var_dump(is_readable("myfile/doesntexist"));'

# touch myfile

# sapi/cli/php -n -d open_basedir="$(pwd)" -r
'var_dump(is_readable("myfile/doesntexist"));'



Expected result:
----------------
bool(false)



bool(false)

Actual result:
--------------
bool(false)



Warning: is_readable(): open_basedir restriction in effect.
File(myfile/doesntexist) is not within the allowed path(s):
(/home/manuel/php5.3-201006120030) in Command line code on line 1

bool(false)



-- 
Edit bug report at http://bugs.php.net/bug.php?id=52065&edit=1
-- 
Try a snapshot (PHP 5.2):            
http://bugs.php.net/fix.php?id=52065&r=trysnapshot52
Try a snapshot (PHP 5.3):            
http://bugs.php.net/fix.php?id=52065&r=trysnapshot53
Try a snapshot (trunk):              
http://bugs.php.net/fix.php?id=52065&r=trysnapshottrunk
Fixed in SVN:                        
http://bugs.php.net/fix.php?id=52065&r=fixed
Fixed in SVN and need be documented: 
http://bugs.php.net/fix.php?id=52065&r=needdocs
Fixed in release:                    
http://bugs.php.net/fix.php?id=52065&r=alreadyfixed
Need backtrace:                      
http://bugs.php.net/fix.php?id=52065&r=needtrace
Need Reproduce Script:               
http://bugs.php.net/fix.php?id=52065&r=needscript
Try newer version:                   
http://bugs.php.net/fix.php?id=52065&r=oldversion
Not developer issue:                 
http://bugs.php.net/fix.php?id=52065&r=support
Expected behavior:                   
http://bugs.php.net/fix.php?id=52065&r=notwrong
Not enough info:                     
http://bugs.php.net/fix.php?id=52065&r=notenoughinfo
Submitted twice:                     
http://bugs.php.net/fix.php?id=52065&r=submittedtwice
register_globals:                    
http://bugs.php.net/fix.php?id=52065&r=globals
PHP 4 support discontinued:          http://bugs.php.net/fix.php?id=52065&r=php4
Daylight Savings:                    http://bugs.php.net/fix.php?id=52065&r=dst
IIS Stability:                       
http://bugs.php.net/fix.php?id=52065&r=isapi
Install GNU Sed:                     
http://bugs.php.net/fix.php?id=52065&r=gnused
Floating point limitations:          
http://bugs.php.net/fix.php?id=52065&r=float
No Zend Extensions:                  
http://bugs.php.net/fix.php?id=52065&r=nozend
MySQL Configuration Error:           
http://bugs.php.net/fix.php?id=52065&r=mysqlcfg

Reply via email to