|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #53226 file_exists fails on big filenames
Submitted: 2010-11-02 08:44 UTC Modified: 2010-11-05 06:28 UTC
Avg. Score:3.0 ± 0.0
Reproduced:1 of 1 (100.0%)
Same Version:1 (100.0%)
Same OS:1 (100.0%)
From: daedal13 at gmail dot com Assigned: aharvey (profile)
Status: Closed Package: Filesystem function related
PHP Version: 5.2.14 OS: Linux
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If this is not your bug, you can add a comment by following this link.
If this is your bug, but you forgot your password, you can retrieve your password here.
Bug Type:
From: daedal13 at gmail dot com
New email:
PHP Version: OS:


 [2010-11-02 08:44 UTC] daedal13 at gmail dot com
When I call "file_exists" with long string, I see warnings.
In my case, if length of parameter is longer than 3 863 bytes, file_exists fails.
Similar situations happens with is_file.
Excuse me for my English :-)

Test script:

Expected result:
Warning: file_exists() [function.file-exists]: open_basedir restriction in effect. File(...


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2010-11-05 06:05 UTC]
-Status: Open +Status: Assigned -Assigned To: +Assigned To: aharvey
 [2010-11-05 06:05 UTC]
Fundamentally, it's just that open_basedir only generates the one, generic warning if an error occurs, such as the given path being too long. We should be able to do a bit better here. :)
 [2010-11-05 06:28 UTC]
Automatic comment from SVN on behalf of aharvey
Log: Fix bug #53226 (file_exists fails on big filenames).
 [2010-11-05 06:28 UTC]
-Status: Assigned +Status: Closed
 [2010-11-05 06:28 UTC]
This bug has been fixed in SVN.

Snapshots of the sources are packaged every three hours; this change
will be in the next snapshot. You can grab the snapshot at
Thank you for the report, and for helping us make PHP better.

 [2010-11-08 10:14 UTC]
Automatic comment from SVN on behalf of aharvey
Log: Update the tests committed in r305098 (as part of the fix for bug #53226) to
use the PHP_MAXPATHLEN constant, as recommended by Pierre.
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Tue May 21 06:01:35 2024 UTC