From:             mp at webfactory dot de
Operating system: 
PHP version:      Irrelevant
PHP Bug Type:     Documentation problem
Bug description:  is_readable() *is* affected by safe_mode restrictions

Description:
------------
http://de.php.net/is_readable states that is_readable() is not subject to
safe_mode restrictions.

With the fix for bug #37987 this is wrong, is_readable() behaves like
file_exists() does, and the documentation for file_exists() explicitly
tells about this behaviour.


Reproduce code:
---------------
<?php
print PHP_VERSION . "\n";
var_dump(ini_get('safe_mode'));
var_dump(file_exists('/etc/hosts'));
var_dump(is_readable('/etc/hosts'));
?>

[EMAIL PROTECTED]:~$ php bug.php
5.1.6
string(0) ""
bool(true)
bool(true)

[EMAIL PROTECTED]:~$ php -d safe_mode=1 bug.php    
5.1.6
string(1) "1"
bool(false)
bool(false)



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

Reply via email to