Bug #67378 [Opn->Dup]: file_exists() throws open_basedir restriction in effect.
| From: | requinix@php.net | Date: | Wed, 04 Jun 2014 07:17:07 +0000 |
| Subject: | Bug #67378 [Opn->Dup]: file_exists() throws open_basedir restriction in effect. | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-186046@lists.php.net to get a copy of this message | ||
Edit report at https://bugs.php.net/bug.php?id=67378&edit=1
ID: 67378
Updated by: requinix@php.net
Reported by: alexey at ndra dot ru
Summary: file_exists() throws open_basedir restriction in
effect.
-Status: Open
+Status: Duplicate
Type: Bug
Package: Filesystem function related
Operating System: Ubuntu 12.04
PHP Version: 5.4.29
Block user comment: N
Private report: N
New Comment:
Duplicate of (deep breath):
- bug #52065 Warning about open_basedir restriction while accessing a file as directory
- bug #53041 is_file() and open_basedir
- bug #64573 Confusing open_basedir errors when parent folders are inaccessible
- bug #65211 file_exists() warns of open_basedir on existing file mis-used as directory
Previous Comments:
------------------------------------------------------------------------
[2014-06-04 06:45:32] alexey at ndra dot ru
Description:
------------
The warning appears if you try to call file inside the file, for example:
/home/public_html/test/test.php/.infuso - if test.php is file you have warning but everything is ok
if test.php is name of folder.
P.s. PHP Version 5.4.27
Test script:
---------------
<?php
ini_set("display_errors",1);
if(file_exists("/home/public_html/test/test.php/.infuso")){
echo "File exists";
}else{
echo "File does not exist";
}
?>
Expected result:
----------------
file_exists should return a FALSE and you should read "File does not exist".
Actual result:
--------------
Warning: file_exists(): open_basedir restriction in effect.
File(/home/public_html/test/test.php/.infuso) is not within the allowed path(s): (/home:.) in
/home/public_html/test/test.php/.infuso on line 4
------------------------------------------------------------------------
--
Edit this bug report at https://bugs.php.net/bug.php?id=67378&edit=1