php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #24892 fopening a remote FTP server
Submitted: 2003-07-31 13:47 UTC Modified: 2003-08-01 06:33 UTC
Votes:1
Avg. Score:3.0 ± 0.0
Reproduced:0 of 0 (0.0%)
From: php at lostair dot net Assigned:
Status: Not a bug Package: FTP related
PHP Version: Irrelevant OS: Irrelevant
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: php at lostair dot net
New email:
PHP Version: OS:

 

 [2003-07-31 13:47 UTC] php at lostair dot net
Description:
------------
There are problems when the @(AT) character is contained within the username through a fopen statement.

In the following exampls, there are no escape characters utilised.  However, this doesn't help the matter either.

I previously send in a Bug report for the same situation with the phase_url - but was classed as a bogus.  So, where is the problem then?  As it is possible to have a @(AT) sign within the user name.


Reproduce code:
---------------
$handle = fopen("fttp://user@dna.com:password@ftp.host.com","rw");

//  user="user@dna.com"
//  password = "password"
//  host = "ftp.dnacpu.com"

Expected result:
----------------
For the file to be successfully accessed

Actual result:
--------------
No Connection, due to the problem that there are two AT signs contains within the URL.

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2003-07-31 14:19 UTC] elmicha@php.net
What kind of ftp server is this where you can use a user _name_ with an "@"? Can you connect to it with a regular ftp client and copy and paste that ftp session into here?

Also note that the URL scheme is "ftp", not "fttp".
 [2003-08-01 06:33 UTC] sniper@php.net
You need to use urlencode on the username/password. Not bug.

 
PHP Copyright © 2001-2025 The PHP Group
All rights reserved.
Last updated: Sun Jul 06 03:01:35 2025 UTC