If this tutorial is not what you were looking for, you still have any questions, suggestions or concerns - feel free to let us know. Please help us to serve you better!

Your Name

Your Email

Your Message (required)


Featured templates

Fatal error: Maximum execution time of 30 seconds exceeded…

If you encounter this error that means, that work to do by Apache web server to handle your task was long-time and it was stopped by time limit provided by ini configuration in php. Such task as image resizing or huge files operations can last long. You can change setting of time limit in PHP by function set time limit, where you give max execution time in seconds as parameter.

You should be aware of this error message, because it should not take more than 30s to complete a script normally. Sometime, it may because of coding mistakes like (infinity loop in your code).

We strongly recommend you to contact your hosting provider and ask them to fix the issue for you.

There are two methods to solve this problem:

Method 1:

Step 1 : Open php.ini; Step 2 : Modify the value of “max_execution_time” to a greater value say 600; Step 3: Restart Server.

Method 2 (Recommended):

Add “set_time_limit(600)” in your code, where the input parameter is the max execution time, and 0 means unlimited.

But be aware. You can hung your server if your job is endless (like never ending loop), so don’t set this value too high.

  • Shahzeb Farooq Chohan

    Thank you! This was driving me crazy! I used the config method but this was not working As I was on shared hosting so I needed to create my own php.ini but I was unsure eaziweb helped me If anyone need this

    No votes yet.
    Please wait...
Live Chat
We help you to choose the right product.
Start chat