#35744 [Opn->Fbk]: safe_mode error?

From: Date: Tue, 20 Dec 2005 12:58:45 +0000
Subject: #35744 [Opn->Fbk]: safe_mode error?
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-90712@lists.php.net to get a copy of this message
 ID:               35744
 Updated by:       tony2001@php.net
 Reported By:      rudenko at id dot com dot ua
-Status:           Open
+Status:           Feedback
 Bug Type:         Filesystem function related
 Operating System: Fedora Core 3
 PHP Version:      5.1.1
 New Comment:

Please try using this CVS snapshot:

  http://snaps.php.net/php5.1-latest.tar.gz
 
For Windows:
 
  http://snaps.php.net/win32/php5.1-win32-latest.zip

Can't reproduce.


Previous Comments:
------------------------------------------------------------------------

[2005-12-20 13:47:17] rudenko at id dot com dot ua

Description:
------------
Diffrent results for is_file, file_exists and is_readable 

(php.ini safe_mode = On, script executed by root user)


Reproduce code:
---------------
<?php
$file = "/etc/passwd";

echo "File $file:\n";

if (is_file($file)) {
	echo "is_file: true\n";
} else {
	echo "is_file: false\n";
}

if (file_exists($file)) {
	echo "file_exists: true\n";
} else {
	echo "file_exists: false\n";
}

if (is_readable($file)) {
	echo "is_readable: true\n";
} else {
	echo "is_readable: false\n";
}
?>

Expected result:
----------------
is_file: true
file_exists: true
is_readable: true

or 

is_file: false
file_exists: false
is_readable: false



Actual result:
--------------
is_file: false
file_exists: true
is_readable: true



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


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


Thread (8 messages)

« previous php.bugs (#90712) next »