Bug #10996: fopen of url results in invlaid file handle
| From: | giwarden at ucla dot edu | Date: | Mon, 21 May 2001 12:19:26 +0000 |
| Subject: | Bug #10996: fopen of url results in invlaid file handle | ||
| Groups: | php.dev | ||
| Request: | Send a blank email to php-dev+get-56036@lists.php.net to get a copy of this message | ||
From: giwarden@ucla.edu
Operating system: linux
PHP version: 4.0.5
PHP Bug Type: Filesystem function related
Bug description: fopen of url results in invlaid file handle
#!/usr/local/bin/php
<?php
$fp = fopen("php://stdin", "r"); #same result with a file
$text = fread($fp, 100);
fclose($fp);
$fp2 = fopen("http://cnn.com", "r");
$text2 = fread($fp2, 100);
fclose($fp2);
?>
CGI version of php 4.0.5 (4.0.2 did the same too) with default "./configure"
default php.ini too
The URL fopen usually goes through (meaning the server of the called URL usually gets the request),
but the response is unreadable since the file-handle isn't valid. If I'm missing something
totally obvious I apologize in advance. Thanks so much.
-Graham Warden
--
Edit Bug report at: http://bugs.php.net/?id=10996&edit=1