php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #11731 PHP_URL_FOPEN only doesn't work
Submitted: 2001-06-27 05:56 UTC Modified: 2001-07-22 05:53 UTC
From: brian at fraval dot org Assigned:
Status: Closed Package: HTTP related
PHP Version: 4.0.6 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 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: brian at fraval dot org
New email:
PHP Version: OS:

 

 [2001-06-27 05:56 UTC] brian at fraval dot org
<?
$url = "www.yahoo.com";
$link = fopen("http://$url", "r");
echo "Link ($url): $link<BR>";

$url2 = "www.yahoo.com";
$link2 = fopen("http://$url2", "r");
echo "Link2 ($url2): $link2<BR>";
?>

Yields:
Link (www.yahoo.com):  ($link is empty)
Link2 (www.voyage.com): ($link2 is empty)

version:
PHP Version 4.0.6RC3

Configure:

'../configure' '--prefix=/usr' 
'--with-apxs=/usr/bin/apxs' 
'--with-regex=system'
'--with-config-file-path=/etc/php4/apache' 
'--disable-rpath' '--with-layout=GNU'
'--enable-memory-limit' 
'--enable-calendar' 
'--enable-sysvsem' 
'--enable-sysvshm'
'--enable-track-vars' 
'--enable-trans-sid' 
'--disable-debug' 
'--disable-static'
'--enable-bcmath' 
'--with-bz2' 
'--enable-ctype' 
'--with-curl=shared,/usr' 
'--with-db2'
'--with-ndbm' 
'--with-dom=shared,/usr' 
'--enable-exif' 
'--enable-filepro' 
'--enable-ftp'
'--with-gettext' 
'--with-gd=shared,/usr' 
'--with-jpeg-dir=shared,/usr'
'--with-xpm-dir=shared,/usr/X11R6' 
'--with-png-dir=shared,/usr' 
'--with-imap=shared,/usr'
'--with-ldap=shared,/usr' 
'--with-mcal=shared,/usr' 
'--with-mm' 
'--with-mhash=shared,/usr'
'--with-mysql=shared,/usr' 
'--with-pcre-regex=/usr' 
'--without-pgsql'
'--with-sablot=shared,/usr' 
'--enable-shmop' 
'--with-snmp=shared' 
'--enable-sockets'
'--with-sybase-ct=shared,/usr' 
'--with-ttf=shared,/usr' 
'--with-t1lib=shared,/usr'
'--enable-wddx' 
'--with-xml=/usr' 
'--with-expat-dir=/usr' 
'--enable-yp' 
'--with-zlib'

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2001-06-27 13:26 UTC] sniper@php.net
Your example script works just fine for me.
Which linux distribution is this? RH? Suse?
Do you get any error messages into logs?

 [2001-07-02 07:10 UTC] brian at fraval dot org
oh sorry I'am a error with my message, test this code :

<?
$url = "www.yahoo.com";
$link = fopen("http://$url", "r");
echo "Link ($url): $link<BR>";

$url2 = "www.voyage.com";
$link2 = fopen("http://$url2", "r");
echo "Link2 ($url2): $link2<BR>";
?>

And link2 is only empty... 
 [2001-07-21 21:10 UTC] andy@php.net
I have reproduced this bug in the exact form as he described
it.  Somebody needs to fix this one.
 [2001-07-21 21:10 UTC] andy@php.net
reclassified
 [2001-07-22 05:53 UTC] venaas@php.net
Fixed in CVS. Problem is that there's no trailing /
which results in "GET  HTTP/1.0". This is okay
with yahoo's webserver for some reason. If you want
to try the latest snapshot, see http://snaps.php.net/

 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Fri Mar 29 15:01:28 2024 UTC