Maximum execution time of 30 seconds exceeded

If your receiving an error stating that Maximum execution time of 30 seconds exceeded, when you run a script on your website or blog, just know that you are not alone. By default, most servers are set to this 30 second execution time limit. In the following simple solution, I will show you how to increase the execution time limit, hopefully allowing you to finally execute your script successfully.

How to increase the Maximum execution time:

Increasing the maximum execution time of server side scripts can assist in giving a script enough time to run.

  1. Using an FTP client, navigate to the directory where your website is being hosted or where the script causing the problem is being run.
  2. Download the php.ini file to your desktop. If no php.ini file exists, simply download the php.ini file from the root of your server.
  3. Open the php.ini file using your favorite text editor and find the following section:
  4. max_execution_time = 30

  5. Change 30 to a higher value. For example: 90 and then save the file.
  6. Upload the modified php.ini file to the directory where your script is being run and then go test your script.

If all goes well, your script should now complete before the timeout.

Enjoy! ;)