PHP 4.0 Bug #7880 Updated: PHP_URL_FOPEN doesn't work
| From: | hholzgra@php.net | Date: | Mon, 20 Nov 2000 12:01:04 +0000 |
| Subject: | PHP 4.0 Bug #7880 Updated: PHP_URL_FOPEN doesn't work | ||
| Groups: | php.dev | ||
| Request: | Send a blank email to php-dev+get-38581@lists.php.net to get a copy of this message | ||
ID: 7880
Updated by: hholzgra
Reported By: Alan@Halachmi.net
Status: Closed
Bug Type: *URL Functions
Assigned To:
Comments:
$url = "http://www.php.net/index.html";
$fp = file($url);
is simply wrong usage, try
$url = "http://www.php.net/index.html";
$fp = fopen($url,"r");
$file_contents = file($fp);
instead
Previous Comments:
---------------------------------------------------------------------------
[2000-11-20 04:40:48] Alan@Halachmi.net
More interesting information... It appears that the outbound connection is never actually made...
This is from a truss of an fopen on www.php.net:
14354/1: resolvepath("/home/pkw/devilnet/v1.0/dev/htdocs/filetest.php",
"/home/pkw/devilnet/v1.0/dev/htdocs/filetest.php", 1024) = 47
14354/1: ioctl(6, TCGETA, 0xFFBEE33C) Err#25 ENOTTY
14354/1: fstat64(6, 0xFFBECBD0) = 0
14354/1: d=0x02200007 i=275213 m=0100644 l=1 u=1001 g=4 sz=283
14354/1: at = Nov 20 04:21:57 EST 2000 [ 974712117 ]
14354/1: mt = Nov 20 03:55:45 EST 2000 [ 974710545 ]
14354/1: ct = Nov 20 03:55:45 EST 2000 [ 974710545 ]
14354/1: bsz=8192 blks=2 fs=ufs
14354/1: ioctl(6, TCGETA, 0xFFBECB5C) Err#25 ENOTTY
14354/1: read(6, " < ?nt $ u r l = "".., 8192) = 283
14354/1: read(6, 0x00303264, 8192) = 0
14354/1: ioctl(6, TCGETA, 0xFFBECC34) Err#25 ENOTTY
14354/1: llseek(6, 0, SEEK_CUR) = 283
14354/1: close(6) = 0
14354/1: so_socket(2, 1, 0, "", 1) = 6
14354/1: connect(6, 0x001378B8, 16, 1) = 0
14354/1: AF_INET name = 127.0.0.1 port = 53
14354/1: send(6, "96 g01