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

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

I reproduce same bug on FreeBSD 6 server.

1. In your php.ini file you must set safe_mode = On
2. You must start script from shell


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

[2005-12-20 15:03:26] tony2001@php.net

I'm still unable to reproduce it.

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

[2005-12-20 14:57:56] rudenko at id dot com dot ua

Installing latest snapshot 2005-12-20 11:30 does not solve this problem

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

[2005-12-20 13:58:43] tony2001@php.net

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.

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

[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 (#90719) next »