{"id":1486,"date":"2024-01-08T05:44:22","date_gmt":"2024-01-08T05:44:22","guid":{"rendered":"https:\/\/www.devopssupport.in\/blog\/?p=1486"},"modified":"2024-01-08T05:44:24","modified_gmt":"2024-01-08T05:44:24","slug":"laravel-error-local-info-curl-error-3","status":"publish","type":"post","link":"https:\/\/www.devopssupport.in\/blog\/laravel-error-local-info-curl-error-3\/","title":{"rendered":"Laravel error: local.INFO: cURL error 3"},"content":{"rendered":"\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"321\" src=\"https:\/\/www.devopssupport.in\/blog\/wp-content\/uploads\/2024\/01\/image-10-1024x321.png\" alt=\"\" class=\"wp-image-1487\" srcset=\"https:\/\/www.devopssupport.in\/blog\/wp-content\/uploads\/2024\/01\/image-10-1024x321.png 1024w, https:\/\/www.devopssupport.in\/blog\/wp-content\/uploads\/2024\/01\/image-10-300x94.png 300w, https:\/\/www.devopssupport.in\/blog\/wp-content\/uploads\/2024\/01\/image-10-768x241.png 768w, https:\/\/www.devopssupport.in\/blog\/wp-content\/uploads\/2024\/01\/image-10.png 1372w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p>cURL errors are a common stumbling block for developers, and one such error, &#8220;cURL error 3,&#8221; often leads to head-scratching moments. The cURL error 3, as indicated in the Laravel logs (<code>local.INFO: cURL error 3<\/code>), signifies a problem during the execution of a cURL request. More specifically, it points to issues related to network connectivity, DNS resolution, or accessibility of the specified URL.<\/p>\n\n\n\n<ol class=\"wp-block-list\">\n<li><strong>Misconfigured URL:<\/strong>\n<ul class=\"wp-block-list\">\n<li>The URL specified in the cURL request may be incorrect or improperly formatted.<\/li>\n<\/ul>\n<\/li>\n\n\n\n<li><strong>DNS Resolution Problems:<\/strong>\n<ul class=\"wp-block-list\">\n<li>Issues with resolving the domain name specified in the URL.<\/li>\n<\/ul>\n<\/li>\n\n\n\n<li><strong>Network Connectivity Issues:<\/strong>\n<ul class=\"wp-block-list\">\n<li>Problems with internet connectivity or restrictions, such as firewalls, preventing the cURL request.<\/li>\n<\/ul>\n<\/li>\n<\/ol>\n\n\n\n<p>In my case:<\/p>\n\n\n\n<p>Upon investigation, it was discovered that the root cause of the cURL error 3 in this scenario was a configuration oversight. Specifically, the necessary configuration parameters were not defined in the<strong> <code>config\/app.php<\/code><\/strong> file of the Laravel application.<\/p>\n\n\n\n<p>Here&#8217;s the snippet of the missing configuration:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>'DOCTORS_M_MANAGEMENT_BASE_URL' => env('DOCTORS_M_MANAGEMENT_BASE_URL', 'not found in .env file'),\r\n'DOCTORS_OAUTH_TOKEN_URL' => env('DOCTORS_OAUTH_TOKEN_URL', 'not found in .env file'),\r\n'DOCTORS_GRANT_TYPE' => env('DOCTORS_GRANT_TYPE', 'not found in .env file'),\r\n'DOCTORS_CLIENT_ID' => env('DOCTORS_CLIENT_ID', 'not found in .env file'),\r\n'DOCTORS_CLIENT_SECRET' => env('DOCTORS_CLIENT_SECRET', 'not found in .env file'),\r\n'DOCTORS_CREATE_DOCTOR_USER' => env('DOCTORS_CREATE_DOCTOR_USER', 'not found in .env file'),\r\n<\/code><\/pre>\n\n\n\n<p>This simple addition enabled the application to read the required values from the <code>.env<\/code> file, preventing the cURL error 3 from occurring.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>cURL errors are a common stumbling block for developers, and one such error, &#8220;cURL error 3,&#8221; often leads to head-scratching moments. The cURL error 3, as indicated&#8230; <\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[859,860,855,857,856,717,42,827,773,853,861,825,858,854],"class_list":["post-1486","post","type-post","status-publish","format-standard","hentry","category-uncategorized","tag-configuration-oversight","tag-curl-error-3","tag-curl-request","tag-dns-resolution","tag-environment-variables","tag-error-handling","tag-laravel","tag-laravel-application","tag-laravel-configuration","tag-laravel-development","tag-laravel-environment-configuration","tag-laravel-logs","tag-network-connectivity","tag-troubleshooting-curl"],"_links":{"self":[{"href":"https:\/\/www.devopssupport.in\/blog\/wp-json\/wp\/v2\/posts\/1486","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.devopssupport.in\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.devopssupport.in\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.devopssupport.in\/blog\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.devopssupport.in\/blog\/wp-json\/wp\/v2\/comments?post=1486"}],"version-history":[{"count":1,"href":"https:\/\/www.devopssupport.in\/blog\/wp-json\/wp\/v2\/posts\/1486\/revisions"}],"predecessor-version":[{"id":1488,"href":"https:\/\/www.devopssupport.in\/blog\/wp-json\/wp\/v2\/posts\/1486\/revisions\/1488"}],"wp:attachment":[{"href":"https:\/\/www.devopssupport.in\/blog\/wp-json\/wp\/v2\/media?parent=1486"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.devopssupport.in\/blog\/wp-json\/wp\/v2\/categories?post=1486"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.devopssupport.in\/blog\/wp-json\/wp\/v2\/tags?post=1486"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}