Edit report at http://bugs.php.net/bug.php?id=53041&edit=1
ID: 53041
Comment by: sjon at react dot com
Reported by: sunseb at live dot com
Summary: is_file() and open_basedir
Status: Verified
Type: Bug
Package: *Directory/Filesystem functions
Operating System: Linux
PHP Version: 5.3.3
Block user comment: N
Private report: N
New Comment:
this problem still occurs in 5.3.5
Previous Comments:
------------------------------------------------------------------------
[2010-10-13 02:58:59] uramihsayibok at gmail dot com
Same as bugs #52065 and #44901. Reproduced on Windows.
some file function (eg, is_file) calls the C functions:
-> php_stat
-> php_check_specific_open_basedir(_ex) [1]
-> expand_filepath(_ex)
-> virtual_file_ex
-> tsrm_realpath_r [2]:
Unable to access /home/my_file.txt/whatever, [2] next checks that
/home/my_file.txt exists *and is a directory*. Since it isn't a
directory, everything fails all the way back up to [1], which then,
assuming it was a problem specifically with the open_basedir
restriction, issues the warning.
------------------------------------------------------------------------
[2010-10-11 10:38:23] sunseb at live dot com
Description:
------------
php.ini :
open_basedir = /home/
directory :
/home/my_file.txt
script :
is_file('/home/my_file.txt'); // TRUE.
is_file('/home/my_file.txt/whatever'); // FALSE but "Warning:
is_file():
open_basedir restriction in effect." Why this warning (open_basedir is
OK) ?
Thank you ! (And sorry for my english.)
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/bug.php?id=53041&edit=1