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
View Add Comment Developer Edit
Anyone can comment on a bug. Have a simpler test case? Does it work for you on a different platform? Let us know!
Just going to say 'Me too!'? Don't clutter the database with that please — but make sure to vote on the bug!
Your email address:
MUST BE VALID
Solve the problem:
43 - 42 = ?
Subscribe to this entry?

 
 [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-2024 The PHP Group
All rights reserved.
Last updated: Tue Apr 23 08:01:30 2024 UTC