php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #3916 Opening file with fopen($url,"w") fails if file exists
Submitted: 2000-03-24 08:40 UTC Modified: 2005-03-31 16:13 UTC
Votes:1
Avg. Score:5.0 ± 0.0
Reproduced:1 of 1 (100.0%)
Same Version:0 (0.0%)
Same OS:1 (100.0%)
From: sniper at iki dot fi Assigned:
Status: Wont fix Package: Parser error
PHP Version: 3.0 Latest CVS (24/03/2000) OS: Red Hat Linux 6.1
Private report: No CVE-ID: None
Have you experienced this issue?
Rate the importance of this bug to you:

 [2000-03-24 08:40 UTC] sniper at iki dot fi
This works, if file exists:

$fp=fopen("file.txt", "w");

This doesn't work if file exists (if file doesn't exist, it works!):

$fp=fopen("ftp://username:password@domain.fi/file.txt", "w");

The error message:

Warning: File already exists in /www/htdocs/test.phtml on line 1


Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2000-08-05 05:49 UTC] hholzgra@php.net
this is a known shortcomming of the ftp implementation
in fopen wrappers (duplicate of another report i can't find right now)
 [2000-08-05 15:14 UTC] sniper@php.net
And this exists also in PHP4 latest CVS. (04/07/2000)

--Jani
 [2005-03-31 16:13 UTC] php-bugs at lists dot php dot net
We are sorry, but we do not support PHP 3 related problems anymore.
 
PHP Copyright © 2001-2019 The PHP Group
All rights reserved.
Last updated: Tue Mar 26 14:01:27 2019 UTC