Bug #16881 Updated: fopen sometimes hangs
| From: | mfischer@php.net | Date: | Sat, 27 Apr 2002 22:33:00 +0000 |
| Subject: | Bug #16881 Updated: fopen sometimes hangs | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-6309@lists.php.net to get a copy of this message | ||
ID: 16881
Updated by: mfischer@php.net
Reported By: jandevries146@noknok.nl
-Status: Open
+Status: Closed
Bug Type: Reproducible crash
Operating System: windows ME with apache
PHP Version: 4.2.0
New Comment:
fopen() is simply not suited for this task as it cannot be configured.
Use fsockopen() and socket_set_timeout() or use the socket_*()
interface directly.
Previous Comments:
------------------------------------------------------------------------
[2002-04-27 16:11:05] jandevries146@noknok.nl
I want to automaticly save some webpages.
To do this i use a loop which requests the data.
About 9 out of 10 times it goes without problems, but
sometimes the script hangs at the line with
fopen($link,"rb");
saying : Maximum execution time of 30 seconds exceeded in ........
for ($i=0;$i<25;$i++)
{
$link = someURL;
$fp=fopen($link,"rb");
}
I also tried without any results:
-sleep(1);
-fclose($fp);
-fopen($link,"r"); // this is "r" instead of "rb"
-installing everything again on a new windows
If i then run the same program again i dont get any
problems. I know for sure the URL i open are available,
but even when they are not available it should give a warning and not
hang.
If you want to reproduce the error just open 300 links with fopen under
windows.
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=16881&edit=1