php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #13293 fopen()/readfile()/file() URL cannot handle http://host:port/ syntax
Submitted: 2001-09-13 16:17 UTC Modified: 2001-10-15 17:53 UTC
From: max at corp dot liv4now dot com Assigned:
Status: Closed Package: URL related
PHP Version: 4.0.6 OS: Linux (x86)
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 this is not your bug, you can add a comment by following this link.
If this is your bug, but you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: max at corp dot liv4now dot com
New email:
PHP Version: OS:

 

 [2001-09-13 16:17 UTC] max at corp dot liv4now dot com
This is probably not really bug, just a missing feature.

Basically the fopen()URL handler doesn't allow the specification of an alternativ port within the url such as

http://hostname:port/path/file.html

I guess it will probably also not handle http://user:pass@host/, so maybe you could add that as well sometime.

the following script:
  <?php
    readfile('http://localhost:8080/');
  ?>

results in the following output:

X-Powered-By: PHP/4.0.6
Content-type: text/html

<br>
<b>Warning</b>:  readfile("http://localhost:8080/") - Success in <b>-</b> on line <b>2</b><br>


Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2001-10-15 17:53 UTC] edink@php.net
I cannot reproduce this with the latest cvs version. Please try http://snaps.php.net/php4-latest.tar.gz and reopen if the problem persists.

It also supports (and it has been doing that for a while) requests of type http://user:pass@host/
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Fri Apr 19 11:01:28 2024 UTC