file_exists fails on big filenames

Bug #53226 file_exists fails on big filenames
Submitted: 2010-11-02 08:44 UTC Modified: 2010-11-05 06:28 UTC
Votes:1
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

 [2010-11-02 08:44 UTC] daedal13 at gmail dot com

Description:
------------
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:
---------------
<?php
file_exists($some_large_text);
?>

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


Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports

 [2010-11-05 06:05 UTC] aharvey@php.net

-Status: Open +Status: Assigned -Assigned To: +Assigned To: aharvey

 [2010-11-05 06:05 UTC] aharvey@php.net

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] aharvey@php.net

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
http://snaps.php.net/.
 
Thank you for the report, and for helping us make PHP better.