0

I have encountered this error when trying to run a code.

Fatal error: Maximum execution time of 300 seconds exceeded in C:\xampp\htdocs\abc_app\application\libraries\Curl.php on line 329

line 329 is $this->response = curl_exec($this->session);.

After googling I changed below in php.ini,

max_execution_time = 90000
max_input_time = -1
memory_limit = 1280M

But error still come. Please help me.

tenten
  • 1,276
  • 2
  • 26
  • 54
  • You can even directly change it in PHP using `ini_set('max_execution_time', 90000);` – DrKey Jul 28 '17 at 09:14
  • possible duplicate https://stackoverflow.com/questions/7680572/fatal-error-maximum-execution-time-of-300-seconds-exceeded – Val Jul 28 '17 at 09:14
  • Did you add the directives in the correct section, or just add them at the end? – Phylogenesis Jul 28 '17 at 09:14
  • Possible duplicate of [Fatal error: Maximum execution time of 30 seconds exceeded](https://stackoverflow.com/questions/5164930/fatal-error-maximum-execution-time-of-30-seconds-exceeded) – roberto06 Jul 28 '17 at 09:15
  • Did you really make that typo in the php settings your code above shows? – arkascha Jul 28 '17 at 09:18
  • Did you really restart your http server process after changing the php settings? – arkascha Jul 28 '17 at 09:18

1 Answers1

2

The problem is a underscope in variable define:

max_execution_time = 90000 
MikeSouto
  • 265
  • 1
  • 7
  • Sorry I am new. Do you want remove my answer? – MikeSouto Jul 28 '17 at 09:19
  • No, totally fine. Simply always remember to put a little text, plain code answers are not good answers. Doesn't need to be a lot of text, what you've done is totally enough. – Twinfriends Jul 28 '17 at 09:28