Bug #76701 [Opn->Dup]: open_basedir restriction when file doesn't exist
| From: | requinix@php.net | Date: | Fri, 03 Aug 2018 21:12:43 +0000 |
| Subject: | Bug #76701 [Opn->Dup]: open_basedir restriction when file doesn't exist | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-216566@lists.php.net to get a copy of this message | ||
Edit report at https://bugs.php.net/bug.php?id=76701&edit=1
ID: 76701
Updated by: requinix@php.net
Reported by: qtogf8 at sambull dot org
Summary: open_basedir restriction when file doesn't exist
-Status: Open
+Status: Duplicate
Type: Bug
Package: Safe Mode/open_basedir
Operating System: Debian
PHP Version: 7.0.31
Block user comment: N
Private report: N
New Comment:
See bug #52065 and all the other "related to" bugs listed in its comments.
Short explanation: in some circumstances, when PHP searches for the file and can't find it,
other code incorrectly assumes the failure is because of an open_basedir restriction. The easiest
example of this is with the path foo/bar when foo is a file and not a directory.
Previous Comments:
------------------------------------------------------------------------
[2018-08-03 16:09:03] qtogf8 at sambull dot org
Description:
------------
This seems to be much the same issue as #41518. But, maybe it only occurs when exactly matching a
file.
i.e. When using file_exists(), I get an error along the lines of:
PHP Warning: file_exists(): open_basedir restriction in effect. File(/foo/somefile.php) is not
within the allowed path(s): (/foo/somefile.php) in ...
Clearly, the error is wrong, when the allowed path is exactly the same as the file name. If I create
the file, then the warning disappears, which proves that it is in the allowed path.
------------------------------------------------------------------------
--
Edit this bug report at https://bugs.php.net/bug.php?id=76701&edit=1