in this article, I will share with you how to resolve HTTP/2 stream 0 was not closed cleanly: PROTOCOL_ERROR (err 1) error in PHP cURL. recently i was work in one PHP application and I got this issue when I try to call one third party API in my PHP application using the cURL. API working fine in my local but it's not working in my client's live site. when I call API then sometimes got the response and sometimes I got a NULL response from the API server. then i apply curl_error
function in my code and I find the actual issue.
HTTP/2 stream 0 was not closed cleanly: PROTOCOL_ERROR (err 1) this issue actually comes when your cURL version is old in your cPanel. but here i resolved this issue add the following line in my cURL request.
add the following line in cURL request.
curl_setopt($curl, CURLOPT_HTTP_VERSION, CURL_HTTP_VERSION_1_1);
i hope you like this small article.
Hi, My name is Harsukh Makwana. i have been work with many programming language like php, python, javascript, node, react, anguler, etc.. since last 5 year. if you have any issue or want me hire then contact me on [email protected]
PHP Parse and Process XML data
Sometimes working with 3rd party API, yo...How to prepend a string in PHP
Use the PHP Concatenation Operator Th...How to Generate PDF in React using jsPDF
In this tutorial, we are going to look a...Run Two Skype Account in Ubuntu System
In this article, i will share with you h...Curl error HTTP/2 stream 0 was not closed cleanly: PROTOCOL_ERROR (err 1)
When I was working with one curl request...