php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #1547 Can't open ftp file with fopen (fopen-wrapper)
Submitted: 1999-06-16 07:13 UTC Modified: 1999-06-18 11:49 UTC
From: support at elysium dot demon dot co dot uk Assigned:
Status: Closed Package: Misbehaving function
PHP Version: 3.0.9 OS: Linux
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: support at elysium dot demon dot co dot uk
New email:
PHP Version: OS:

 

 [1999-06-16 07:13 UTC] support at elysium dot demon dot co dot uk
I can't seem to open an ftp file anymore (with fopen).  http files are opening fine? 

<?
$fp=fopen("ftp://anonymous:anonymous@ftp.sunsite.org.uk/README", "r");
while ($line = fgets($fp, 1024)) {
  print $line;
}
?>

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [1999-06-18 09:05 UTC] support at elysium dot demon dot co dot uk
I have only been using ftp servers that are capable of passive mode.

http files are opening fine.

I have tried using the latest version of fopen-wrapper.c (1.63) and it still
doesn't work.

There was a vaid ftp ref in the fopen statement provided.  I think it was parsed
out by the bug system.



 [1999-06-18 10:33 UTC] support at elysium dot demon dot co dot uk
Okay I think I have found the problem.  fopen does not deal with passing the
username/pasword combo for ftp:// or http:// files.

e..g

ftp://username:password@ftp.something.net/README

http://username:password@www.somewhere.com/index.html




 [1999-06-18 11:49 UTC] sas at cvs dot php dot net
fixed in CVS
 
PHP Copyright © 2001-2026 The PHP Group
All rights reserved.
Last updated: Sat Oct 10 09:00:01 2026 UTC