1
Fatal error: Maximum execution time of 30 seconds exceeded in C:\Program Files (x86)\Zend\Apache2\htdocs\tokopetaninew\branches\development\lib\Zend\Locale\Format.php on line 442
Array
(
    [type] => 1
    [message] => Maximum execution time of 30 seconds exceeded
    [file] => C:\Program Files (x86)\Zend\Apache2\htdocs\tokopetaninew\branches\development\lib\Zend\Locale\Format.php
    [line] => 442
)

i have install magento in my localhost with zend server and port localhost:8080 and i got that error message, please help me

2 Answers2

5

Change the max_execution_time

ini_set('max_execution_time', 300); //300 seconds = 5 minutes
Narayan
  • 1,670
  • 1
  • 19
  • 37
  • 1
    While this does solve the problem indeed, setting the execution time to such high values is always risky. Imaging having a quad core with four people reaching your script which runs five minutes. Your server will be occupied for the next five minutes and not beign able to take any more requests (appears dead from outside). – Fabian S. Jun 07 '17 at 06:28
  • 1
    @FabianSchöner agreed with your replay also. – Narayan Jun 07 '17 at 06:31
  • any sugestion? @FabianSchöner change the max_execution_time can't be work too :( – Fashah Darullah Jun 07 '17 at 06:36
  • While I agree with @FabianSchöner, it should be added that for come cases increasing the max_excution_time would be a good solution. Especially with backend operations. For front-end operations this indeed created a way too easy denial-of-service "handle". – Tero Lahtinen Dec 17 '18 at 10:22
1

Every script has a maximum running time ("max execution time"). Depending on your php configuration it can be several values (appearing to be 30 seconds in your case).

Your script is taking longer than this 30 seconds to execute so the server interrupts it and cancels the script giving you this error.

Possible solutions:

Be careful with increasing the max execution time above a specific point tho. Keep in mind a running script will occupy one core of your server. In case you have a quad core and 4 scripts are running for five minutes your server will appear dead for that time as no requests can be taken while the others run.

Fabian S.
  • 2,441
  • 2
  • 24
  • 34
  • i already change the execution time and when i load my web page, the browser download the file of html and stop load the page, any solution? – Fashah Darullah Jun 07 '17 at 06:38