I'm using cURL with PHP and getting the following error after sometime (I guess after 300 sec):
Fatal error: Maximum execution time of 500 seconds exceeded.
I googled this and found some solutions that are also not working for me, such as:
ini_set('MAX_EXECUTION_TIME', -1);
error_reporting(1); // to display only fatal error
set_time_limit(0);
I've tried both MAX_EXECUTION_TIME
and MAX_INPUT_TIME
and set them to -1
but nothing is helping me.
Update
I've used this as well:
ignore_user_abort(true);
ini_set('MAX_EXECUTION_TIME', 0);
error_reporting(1);
set_time_limit(0);
and inside cURL
curl_setopt($s, CURLOPT_TIMEOUT, 0);
but it is still giving me the following error:
Fatal error: Maximum execution time of 500 seconds exceeded in D:\wamp\www\optimized.php on line 321