php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #45129 file_exists() incorrectly returns true when using the FTP wrapper
Submitted: 2008-05-29 20:53 UTC Modified: 2008-07-20 01:00 UTC
Votes:4
Avg. Score:4.2 ± 0.8
Reproduced:4 of 4 (100.0%)
Same Version:4 (100.0%)
Same OS:3 (75.0%)
From: lonedesign_2k at yahoo dot com Assigned:
Status: No Feedback Package: Filesystem function related
PHP Version: 5.2.6 OS: *
Private report: No CVE-ID: None
Have you experienced this issue?
Rate the importance of this bug to you:

 [2008-05-29 20:53 UTC] lonedesign_2k at yahoo dot com
Description:
------------
file_exists() is returning true, but the file does not exist in the specified FTP directory.

Glen.

Reproduce code:
---------------
clearstatcache(); // just in case.

$dst = 'ftp://user:pass@localhost/test.txt';

if (file_exists($dst)) {
    echo 'File exists.';
} else {
    echo 'File does not exist.';
}

Expected result:
----------------
Output of 'File does not exist.'.

Actual result:
--------------
Output of 'File exists.'.

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2008-05-31 16:25 UTC] lonedesign_2k at yahoo dot com
OS changed from 'Windows 2000' to 'All' ? reproduced on a Linux system.
 [2008-05-31 19:29 UTC] bjori@php.net
Works fine for me using tnftpd and vsFTPd..
 [2008-05-31 19:43 UTC] lonedesign_2k at yahoo dot com
Problem occurred using FileZilla Server 0.9.23 beta on Windows 2000, and ProFTPD 1.2.9 on CentOS Enterprise Linux - OS ES 5.0.
 [2008-06-23 16:06 UTC] nanawel at eyeos dot org
Problem reproduced with FileZilla Server 0.9.25 under Windows XP Pro SP3.
 [2008-07-20 01:00 UTC] php-bugs at lists dot php dot net
No feedback was provided for this bug for over a week, so it is
being suspended automatically. If you are able to provide the
information that was originally requested, please do so and change
the status of the bug back to "Open".
 
PHP Copyright © 2001-2019 The PHP Group
All rights reserved.
Last updated: Sun Nov 17 06:01:40 2019 UTC