Edit report at http://bugs.php.net/bug.php?id=43098&edit=1
ID: 43098 Updated by: [email protected] Reported by: harvie at email dot cz Summary: file_get_contents() freezes (probably caused by fopen()) -Status: Open +Status: Feedback -Type: Feature/Change Request +Type: Bug -Package: Feature/Change Request +Package: HTTP related Operating System: Linux (Debian Etch) - php5-cli PHP Version: 5.2.4 Block user comment: N Private report: N New Comment: Does it happen with PHP 5.3.3? I still can not reproduce it. Previous Comments: ------------------------------------------------------------------------ [2010-03-02 21:49:13] dyekimov at uniplat dot ru So, has anyone found a way out of this problem? Is it a known bug? ------------------------------------------------------------------------ [2007-10-26 10:49:02] harvie at email dot cz Yeah! Thats what i need... Something like default_poll_timeout setting... ------------------------------------------------------------------------ [2007-10-26 10:40:18] harvie at email dot cz [email protected]: That is what i am saying, this will never comes to next iteration. If i wan't to do some kind of error check, it will never be executed, because whole program will stop at file_get_contents() and will not execute anything after this call. Thats the problem. This function will never return anything. With this timeout, this script have to print '#' at least once a second. But the default_socket_timeout stops waiting for connection but in this case the file_gets_contents() is already downloading when server drops the connection because of network unstability or service overload. Isn't there some kind of timeout, that will stop waiting for broken connection after specified time? ------------------------------------------------------------------------ [2007-10-26 08:16:58] [email protected] It won't matter what you put in timeout if you wrap everything in a while(1) loop. Of course it just sits there, try adding some error checking there.. ------------------------------------------------------------------------ [2007-10-25 17:21:10] harvie at email dot cz [email protected]: It's possible, but in this case the default_socket_timeout have to close the socket and continue with next URL (crawler freezing too with many different URLs). Or default_socket_timeout doesn't matter in here? It's true, that my router sux, but i don't see any reason why PHP should crash at first problem with connectivity, that ends in total script freeze, i thought, that is why we have socket timeout option. Or not? ------------------------------------------------------------------------ The remainder of the comments for this report are too long. To view the rest of the comments, please view the bug report online at http://bugs.php.net/bug.php?id=43098 -- Edit this bug report at http://bugs.php.net/bug.php?id=43098&edit=1
