php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #39503 curl_multi doesn't work with socks5 proxy
Submitted: 2006-11-13 18:55 UTC Modified: 2007-01-07 18:50 UTC
Votes:1
Avg. Score:4.0 ± 0.0
Reproduced:0 of 0 (0.0%)
From: type-v at mail dot ru Assigned: edink (profile)
Status: Closed Package: cURL related
PHP Version: 5.2.0 OS: Windows XP
Private report: No CVE-ID: None
 [2006-11-13 18:55 UTC] type-v at mail dot ru
Description:
------------
curl_multi_exec() doesn't work with socks5 proxy.
 It was said that it would be fixed in version 7.16.0. But there is only 7.14 available in latest cvs of php5 and php6.

When 7.16 will be available for download ?

Reproduce code:
---------------
$conn[$i]=curl_init("http://www.site.com/");
curl_setopt($conn[$i],CURLOPT_RETURNTRANSFER,true);
curl_setopt($conn[$i],CURLOPT_HEADER,false);
curl_setopt($conn[$i],CURLOPT_PROXY,$proxy);
curl_setopt($conn[$i],CURLOPT_PROXYTYPE,CURLPROXY_SOCKS5);
curl_setopt($conn[$i],CURLOPT_CONNECTTIMEOUT,10);
curl_setopt($conn[$i],CURLOPT_TIMEOUT,10);
curl_setopt($conn[$i],CURLOPT_NOSIGNAL,true);
curl_setopt($conn[$i],CURLOPT_FOLLOWLOCATION,true);

Expected result:
----------------
All is ok.

Actual result:
--------------
Curl error on handle 0: Send failure: Socket is not connected Curl error on handle 1: Send failure: Socket is not connected 
And so on.


Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2006-11-13 21:18 UTC] iliaa@php.net
Edin can you please see if we can easily upgrade libcurl for 
win32 to 7.16.0.
 [2006-11-14 20:00 UTC] edink@php.net
Bundled libcurl has been updated. You can grab the next snapshot from snaps.php.net for the updated php_curl.dll.
 [2006-12-15 18:13 UTC] type-v at mail dot ru
Thanks, I've already downloaded the new package, but there is a new bug.
SOCKS5 proxy in curl_multi cannot timeout or so.
Now the results can be like this:

Curl error on handle 1: SOCKS5 read timeout
Curl error on handle 2: Connection time-out after 13109 ms
Curl error on handle 3: Failed to receive SOCKS5 connect request ack.
Curl error on handle 4: Failed to receive SOCKS5 connect request ack.
Curl error on handle 5: Connection time-out after 33370 ms
Curl error on handle 6: Connection time-out after 35418 ms

So the whole script need 36 seconds to execute, instead of 10 !
 [2007-01-07 18:50 UTC] iliaa@php.net
This bug has been fixed in CVS.

Snapshots of the sources are packaged every three hours; this change
will be in the next snapshot. You can grab the snapshot at
http://snaps.php.net/.
 
Thank you for the report, and for helping us make PHP better.

That sounds like a libcurl limitation and there is little PHP 
can do about it.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sat Apr 27 02:01:31 2024 UTC