|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #67378 file_exists() throws open_basedir restriction in effect.
Submitted: 2014-06-04 06:45 UTC Modified: 2014-06-04 07:17 UTC
From: alexey at ndra dot ru Assigned:
Status: Duplicate Package: Filesystem function related
PHP Version: 5.4.29 OS: Ubuntu 12.04
Private report: No CVE-ID: None
 [2014-06-04 06:45 UTC] alexey at ndra dot ru
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:
        echo "File exists";
        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


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2014-06-04 07:17 UTC]
-Status: Open +Status: Duplicate
 [2014-06-04 07:17 UTC]
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
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Fri Jul 19 00:01:29 2024 UTC