|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #24313 file_exists() on non-existent file incorrectly warns of open_basedir
Submitted: 2003-06-24 05:18 UTC Modified: 2005-01-31 23:16 UTC
From: giannici at neomedia dot it Assigned:
Status: Closed Package: Safe Mode/open_basedir
PHP Version: 4.3.2 OS: OpenBSD
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
Block user comment
Status: Assign to:
Bug Type:
From: giannici at neomedia dot it
New email:
PHP Version: OS:


 [2003-06-24 05:18 UTC] giannici at neomedia dot it
If open_basedir is in effect and file_exists() is called for a non-existent file, than the usual open_basedir warning is printed even if file is in an allowed paths!

Look at "Actual result" for an example error.

This could be related to bug #23190, but it results to be fixed for 4.3.2...

Actual result:
file_exists(): open_basedir restriction in effect. File(/wwwdocs/user/flaccovi/aggtecnolex/200201/) is not within the allowed path(s): (/wwwdocs/user/siti/:/usr/local/lib/php/:/tmp/:/usr/local/php/safebin/:/wwwdocs/user/siti/phplib/:/wwwdocs/user/flaccovi/)


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2003-06-24 08:45 UTC]
This bug has been fixed in CVS.

In case this was a PHP problem, snapshots of the sources are packaged
every three hours; this change will be in the next snapshot. You can
grab the snapshot at
In case this was a documentation problem, the fix will show up soon at

In case this was a website problem, the change will show
up on the site and on the mirror sites in short time.
Thank you for the report, and for helping us make PHP better.

PHP Copyright © 2001-2021 The PHP Group
All rights reserved.
Last updated: Thu Oct 28 09:03:35 2021 UTC