|  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
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("", "w");

The error message:

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


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2000-08-05 05:49 UTC]
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]
And this exists also in PHP4 latest CVS. (04/07/2000)

 [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: Thu Jul 25 05:01:29 2024 UTC