|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
[2006-03-30 17:43 UTC] igor at oleinikov dot ru
Description:
------------
When trying to open remote file via HTTP protocol, PHP produces warning:
failed to open stream: Resource temporarily unavailable
My Windows system have russian locale, so actualy I have localized error message, but this error is Socket error #10035 "Resource temporarily unavailable".
I have tested same code on FreeBSD system, and this error wasn't occuired.
PHP info:
System: Windows NT SCORP 5.1 build 2600
PHP API: 20041225
PHP Extension: 20050922
Zend Extension: 220051025
Debug Build: no
Thread Safety: enabled
Zend Memory Manager: enabled
IPv6 Support: enabled
Registered PHP Streams: php, file, http, ftp, compress.zlib, https, ftps
Registered Stream Socket Transports: tcp, udp, ssl, sslv3, sslv2, tls
allow_url_fopen: On
safe_mode: Off
Reproduce code:
---------------
$f = fopen('http://domain/file'); //series of real URLs and IP addresses was tried
$data = fread($f, 1024);
print $data;
Expected result:
----------------
data of file http://domain/file
Actual result:
--------------
Warning: fopen(http://domain/file) [function.fopen]: failed to open stream: Resource temporarily unavailable. in X:\Path\file.php on line 1
Warning: fread(): supplied argument is not a valid stream resource in X:\Path\file.php on line 2
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
|
|||||||||||||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Sat Oct 25 11:00:01 2025 UTC |
There is something wrong with your setup. Just tested: <?php $f = fopen('http://www.php.net/index.php', 'r'); while (!feof($f)) { $data = fread($f, 1024); print $data; } ?> which produced the expected output.