DEV Community

Lalit Kumar
Lalit Kumar

Posted on

Fatal error Maximum execution time of 30 seconds exceeded in xampp.

This problem usually occurs when your PHP code takes a too long time to run. The time limit is very important because it helps to prevent the abuse of the server.

Why maximum execution time error occur?

This error mostly occurs in PHP Programming language. To protect the server from abuse there is the time limit to run the PHP script. The actual time is different according to hosting companies but mostly the maximum execution time is 30 to 60 seconds because this is enough time to run the PHP scripts.

When the PHP script reaches the maximum execution time then the error occurs to maximum execution time exceeded.


title: "originally posted here 👇"

canonical_url: https://kodlogs.com/blog/215/fatal-error-maximum-execution-time-seconds-exceeded-xampp

Fixing maximum execution time exceeded error:

Without changing anything in the system configuration we can fix this problem by just following the simple steps;

  • Open file “php.ini” in the editor. This file is located under the directory “xampp/PHP/folder”.
  • Find the “max_executuion_time” line. You can also find it by using ctrl+F.
  • Modify it in the php.ini file max_executuion_time = 120 ; // This is the maximum execution time of script is in seconds
  • Modify the Excel Time Limit value in the file config.inc.php under the directory installdir/apps/phpmyadmin/htdocs/config.inc.php; $cfg[‘ExecTimeLIMIt’] = 120;
  • Save and stop the Apache server in the xampp control panel.
  • Restart the Apache server. In this way, the maximum execution time of local server Xampp can be increased.

Note:
To set the execution time-unlimited set the time limit 0 in both the above cases.
Read more in original post

Top comments (0)