#38724 [Opn->Csd]: is_readable() *is* affected by safe_mode restrictions

From: Date: Fri, 17 Aug 2007 16:39:38 +0000
Subject: #38724 [Opn->Csd]: is_readable() *is* affected by safe_mode restrictions
References: 1  Groups: php.doc 
Request: Send a blank email to phpdoc+get-969377625@lists.php.net to get a copy of this message
ID: 38724 Updated by: vrana@php.net Reported By: mp at webfactory dot de -Status: Open +Status: Closed Bug Type: Documentation problem PHP Version: Irrelevant New Comment: This bug has been fixed in the documentation's XML sources. Since the online and downloadable versions of the documentation need some time to get updated, we would like to ask you to be a bit patient. Thank you for the report, and for helping us make our documentation better. "Safe mode limitations are not taken into account before PHP 5.1.5." Previous Comments: ------------------------------------------------------------------------ [2006-09-05 16:14:06] mp at webfactory dot de 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')); ?> mp@dev:~$ php bug.php 5.1.6 string(0) "" bool(true) bool(true) mp@dev:~$ php -d safe_mode=1 bug.php 5.1.6 string(1) "1" bool(false) bool(false) ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=38724&edit=1

« previous php.doc (#969377625) next »