note 102396 added to function.curl-exec
[email protected] Fri, 11 Feb 2011 08:27:05 -0800
| Newsgroups | php.notes |
|---|---|
| Message-ID | <[email protected]> |
I was having a problem, for almost a week, of curl_exec() freezing/hanging when I made a request with it to a page that spends over an hour converting a large video file, and only afterwards sends control-data back to the calling script. I'm using windows 7, WampServer-2.1d-64.exe, PHP 5.3.4, libcurl-7.21.3. Here's the final solution; On Fri, Feb 11, 2011 at 1:32 PM, Daniel Stenberg <daniel-of-haxx.se> wrote: > On Fri, 11 Feb 2011, Tolas Anon wrote: > >>> It is also very easy for an application to enable the options as I've >>> shown. >> >> Just not for the platforms i use, apparently.. :( > > Why not? A quick search for "tcp keepalive windows" shows this: > http://msdn.microsoft.com/en-us/library/ms819735.aspx This fixed my problem in the simple test AND in my application! No need to send keep-alive bytes on the text/html level either. I just added the "KeepAliveTime" setting with windows 7 regedit.exe in HKEY_LOCAL_MACHINE/SYSTEM/CurrentControlSet/services/Tcpip, as a REG_DWORD value, set it to decimal 25000 (so 25 seconds), rebooted, and it all works as i want it now.. Note that windows registry entries key names are case-sensitive, wrong casing and they'll be deleted on restart. Lots of thanks, Daniel. I would've never solved this on my own.. ------------------------------------------------------ (now useless) details at: http://curl.haxx.se/mail/lib-2011-02/0101.html http://readlist.com/lists/lists.php.net/php-general/16/81195.html ---- Server IP: 83.137.20.135 Probable Submitter: 82.161.37.94 ---- Manual Page -- http://www.php.net/manual/en/function.curl-exec.php Edit -- https://master.php.net/note/edit/102396 Del: integrated -- https://master.php.net/note/delete/102396/integrated Del: useless -- https://master.php.net/note/delete/102396/useless Del: bad code -- https://master.php.net/note/delete/102396/bad+code Del: spam -- https://master.php.net/note/delete/102396/spam Del: non-english -- https://master.php.net/note/delete/102396/non-english Del: in docs -- https://master.php.net/note/delete/102396/in+docs Del: other reasons-- https://master.php.net/note/delete/102396 Reject -- https://master.php.net/note/reject/102396 Search -- https://master.php.net/manage/user-notes.php