There are two methods to solve this problem (Fatal error: Maximum execution time of 30 seconds exceeded).
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
Done.
Method 2 (Recommended):
Add "set_limit_time(600)" in your code, where the input parameter is the max execution time, and 0 means unlimited.
Explanation:
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).
However, you may really need to execute heavy code in many cases, then I would recommend you to use the method 2 to solve this problem.
No comments:
Post a Comment