Difference between revisions of "Troubleshooting of curl errors"

From LemonWiki共筆
Jump to navigation Jump to search
m
Line 1: Line 1:
[https://curl.haxx.se/ cUrl] "is used in command lines or scripts to transfer data."[https://curl.haxx.se/]
+
[https://curl.haxx.se/ cUrl] "is used in command lines or scripts to transfer data."[https://curl.haxx.se/] (alternative: [https://packagist.org/packages/curl/curl cURL class for PHP])
  
 
== How to resolve cUrl error (#5): Unsupported proxy syntax ==
 
== How to resolve cUrl error (#5): Unsupported proxy syntax ==

Revision as of 15:03, 22 May 2020

cUrl "is used in command lines or scripts to transfer data."[1] (alternative: cURL class for PHP)

How to resolve cUrl error (#5): Unsupported proxy syntax

Condition: the username of socks5 proxy contains @ symbol such as [email protected]

curl_setopt($ch, CURLOPT_PROXY, 'socks5://username:[email protected]:12345');
// result is ok

curl_setopt($ch, CURLOPT_PROXY, 'socks5://[email protected]:[email protected]:12345');
// met cUrl error (#5): Unsupported proxy syntax

Solution: Escape the special symbol[1] using URL Encode and Decode - Online or urlencode function

curl_setopt($ch, CURLOPT_PROXY, 'socks5://bob%40email.com:[email protected]:12345');
// result is ok

How to resolve cUrl error (#56): OpenSSL SSL_read: No error.

Condition: The curl vesion 7.67.0 on windows met problem. Result of curl_version returned:

version: Array
(
    [version_number] => 475904
    [age] => 5
    [features] => 2953117
    [ssl_version_number] => 0
    [version] => 7.67.0
    [host] => x86_64-pc-win32
    [ssl_version] => OpenSSL/1.1.1d
    [libz_version] => 1.2.11
)

Solution: Use other version of curl command or curl on Cygwin or cURL class for PHP.

Related articles

References


Troubleshooting of ...

Template