Answer the question
In order to leave comments, you need to log in
Why is WebCP FastCGI FAIL: No environment variables found error displayed when calling cURL in PHP?
When I make a cURL request (curl_exec), I get an error as a result:
WebCP FastCGI FAIL: No environment variables found.
$body = 'text content';
$curl_url = 'https://example.org/api/';
$myCurl = curl_init();
$curl_headers = array('content-type' => 'text/plain');
curl_setopt_array($myCurl, array(
CURLOPT_URL => $curl_url,
CURLOPT_HTTPHEADER => $curl_headers,
CURLOPT_RETURNTRANSFER => true,
CURLOPT_POST => true,
CURLOPT_POSTFIELDS => $body
));
$response = curl_exec($myCurl);
print_r($response);
curl_close($myCurl);
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question