Error in curl Data Delivery in nginx

Source: Internet
Author: User
An error occurred while submitting the curl Data in nginx. could you tell me: & nbsp; curl method data submission, which runs on the apache server. there is no problem. & Nbsp; in the nginx service, the execution result of curl_exec ($ ch) is false, and the php will stop running only after timeout, otherwise it will remain refreshed. & Nbsp; an error occurred while submitting nginx. c curl Data
Excuse me:
The curl method submits data and runs on the apache server.
In the nginx service, the execution result of curl_exec ($ ch) is false, and the php will stop running only after the timeout, otherwise it will remain refreshed.

How to Configure nginx. conf to solve this problem. Thank you.

$ Ch = curl_init ();
Curl_setopt ($ ch, CURLOPT_URL, 'http: // 192.168.247.138: 8181/a2.php ');
Curl_setopt ($ ch, CURLOPT_RETURNTRANSFER, 1 );
Curl_setopt ($ ch, CURLOPT_TIMEOUT, 3 );
$ Data = curl_exec ($ ch );
Curl_close ($ ch );
Var_dump ($ data );
?> Share:
------ Solution --------------------
$ch = curl_init(); 
curl_setopt($ch, CURLOPT_URL,'http://192.168.247.138:8181/a2.php'); 
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); 
curl_setopt($ch, CURLOPT_TIMEOUT, 3);
$data = curl_exec($ch); 
var_dump($data);
curl_close($ch); 

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.