php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #9862 fopen of http://user:pass@domain:port/file.html failed with Bad file descriptor
Submitted: 2001-03-20 05:46 UTC Modified: 2001-04-19 09:38 UTC
From: stenzel at hnm dot de Assigned:
Status: Closed Package: Filesystem function related
PHP Version: 4.0.4pl1 OS: redhat 7.0/apache 1.3.19
Private report: No CVE-ID: None
 [2001-03-20 05:46 UTC] stenzel at hnm dot de
$file = "http://user:pass@www.domain.de:2222/file.html";
$fh = fopen($file, "r");
while(! feof($fh)) {
...
}

this script fails with the following error:
Warning:
fopen("http://...@www.domain.de:2222/file.html","r")
- Bad file descriptor in ... on line 2

this script runs with php 4.0.3pl1 and $file = "http://user:pass@www.domain.de/file.html" works too on php 4.0.4pl1, but I need the port in combination with a user and password!!

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2001-03-20 08:17 UTC] sniper@php.net
Works for me with latest CVS. Please try the latest CVS snapshot from http://snaps.php.net/

--Jani
 [2001-04-19 09:38 UTC] sniper@php.net
No feedback. If problem still perists with soon to be released 4.0.5, reopen this bug report.

--Jani

 [2003-03-03 13:11 UTC] ottawasixtyseven at hotmail dot com
Hi,

This is still a problem. It appears to be random. Certain combinations of letters and numbers within the URL will cause the fopen() to fail. This bug still exists in PHP 4.3

Please re-open this bug.

Thanks,

Ottawa
 [2003-03-13 16:37 UTC] ottawasixtyseven at hotmail dot com
Fixed in latest snapshot. Thank you.

Ottawa
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Wed Apr 24 10:01:31 2024 UTC