{"id":480,"date":"2014-07-31T04:07:36","date_gmt":"2014-07-31T04:07:36","guid":{"rendered":"https:\/\/qbytes.cloud\/?p=480"},"modified":"2014-07-31T04:07:36","modified_gmt":"2014-07-31T04:07:36","slug":"curl-error","status":"publish","type":"post","link":"https:\/\/www.qbytes.cloud\/index.php\/2014\/07\/31\/curl-error\/","title":{"rendered":"Curl Error"},"content":{"rendered":"<p>[stextbox id=&#8221;warning&#8221;]Error:\u00a0SSL read: error:00000000:lib(0):func(0):reason(0), errno 104[\/stextbox]<\/p>\n<p>Getting a curl error from a php script. Try to run curl without php.<\/p>\n<p>ssh to the server<br \/>\nfind the script<\/p>\n<p>cd \/var\/www\/vhosts\/path\/to\/script<br \/>\nnano script.php<\/p>\n<p>Find the call and execute from a command line<\/p>\n<pre class=\"brush: bash; title: ; notranslate\" title=\"\">curl --verbose https:\/\/api-internal.script.com\n<\/pre>\n<p>Output:<\/p>\n<pre class=\"brush: bash; title: ; notranslate\" title=\"\">* About to connect() to api-internal.script.com port 443\n* Trying 54.183.xxx.xxx... Connection refused\n* couldn&#039;t connect to host\n* Closing connection #0\ncurl: (7) couldn&#039;t connect to host\n&#x5B;1] 418\n&#x5B;2] 419\n&#x5B;3] 420\n&#x5B;1] Done entityType=destination?searchDate=2014-08-31\n&#x5B;2]- Done partySize=4\n&#x5B;3]+ Done searchTime=12%3A00\n<\/pre>\n<p>It looks like the connection is being refused by the remote server. Curl the page directly which takes PHP out of the equation. This is the response you get when getting the URL directly from SSH.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>[stextbox id=&#8221;warning&#8221;]Error:\u00a0SSL read: error:00000000:lib(0):func(0):reason(0), errno 104[\/stextbox] Getting a curl error from a php script. Try to run curl without php. ssh to the server find the script cd \/var\/www\/vhosts\/path\/to\/script nano script.php Find the call and execute from a command line curl &#8211;verbose https:\/\/api-internal.script.com Output: * About to connect() to api-internal.script.com port 443 * Trying 54.183.xxx.xxx&#8230; &#8230; <a title=\"Curl Error\" class=\"read-more\" href=\"https:\/\/www.qbytes.cloud\/index.php\/2014\/07\/31\/curl-error\/\" aria-label=\"Read more about Curl Error\">Read more<\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[23],"tags":[],"class_list":["post-480","post","type-post","status-publish","format-standard","hentry","category-curl"],"_links":{"self":[{"href":"https:\/\/www.qbytes.cloud\/index.php\/wp-json\/wp\/v2\/posts\/480","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.qbytes.cloud\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.qbytes.cloud\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.qbytes.cloud\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.qbytes.cloud\/index.php\/wp-json\/wp\/v2\/comments?post=480"}],"version-history":[{"count":0,"href":"https:\/\/www.qbytes.cloud\/index.php\/wp-json\/wp\/v2\/posts\/480\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.qbytes.cloud\/index.php\/wp-json\/wp\/v2\/media?parent=480"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.qbytes.cloud\/index.php\/wp-json\/wp\/v2\/categories?post=480"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.qbytes.cloud\/index.php\/wp-json\/wp\/v2\/tags?post=480"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}