Issue
I want to test whether everything is okay or not with the curl in my PHP installation,
I tried the below code, but it I got internal server error! Would anybody help me with this.
<?php
// Create a cURL handle
$ch = curl_init('http://xx.xx.xx.xxx/Dinga/');
// Execute
curl_exec($ch);
// Check if any error occurred
if (!curl_errno($ch)) {
$info = curl_getinfo($ch);
echo 'Took ', $info['total_time'], ' seconds to send a request to ', $info['url'], "\n";
}
// Close handle
curl_close($ch);
?>
Solution
Add the following code in the start and try again.
ini_set('display_startup_errors', 1);
ini_set('display_errors', 1);
error_reporting(E_ALL);
And if there is any parsing issue, then you will have to edit php.ini file and set this param
display_errors = on
Answered By - Shozab Hasan Answer Checked By - Katrina (WPSolving Volunteer)