I am downloading a JSON tệp tin from an online source & & when it runs through the loop I am getting this error:

Fatal error: Maximum execution time of 30 seconds exceeded in C:wampwww empfetch.php on line 24



Your loop might be endless. If it is not, you could extend the maximum execution time lượt thích this:

ini_set("max_execution_time", "300"); //300 seconds = 5 minutesand

set_time_limit(300);can be used to lớn temporarily extkết thúc the time limit.

Bạn đang xem: Maximum Execution Time Exceeded In Wordpress



I had the same problem và solved it by changing the value for the param max_execution_time in php.ini, lượt thích this:

max_execution_time = 360 ; Maximum execution time of each script, in seconds (I CHANGED THIS VALUE)max_input_time = 120 ; Maximum amount of time each script may spkết thúc parsing request data;max_input_nesting_level = 64 ; Maximum input đầu vào variable nesting levelmemory_limit = 128M ; Maximum amount of memory a script may consume (128MB by default)I hope this could help you.


All the answers above sầu are correct, but I use a simple way lớn avoid it in some cases.

Just put this comm& in the begining of your script:

I ran inlớn this problem while upgrading to WordPress 4.0. By mặc định WordPress limits the maximum execution time to 30 seconds.

Add the following code to lớn your .htaccess file on your root directory of your WordPress Installation to over-ride the default.

php_value max_execution_time 300 //where 300 = 300 seconds = 5 minutes
Edit php.ini

Find this line:

max_execution_timeChange its value khổng lồ 300:

max_execution_time = 300300 means 5 minutes of execution time for the http request.

Your script is timing out. Take a look at the set_time_limit() function to lớn up the execution time. Or profile the script lớn make it run faster :)

if all the above sầu didn"t work for you then add an .htaccess file lớn the directory where your script is located và put this inside

php_value post_max_kích cỡ 200Mphp_value upload_max_filekích cỡ 200Mphp_value memory_limit 300Mphp_value max_execution_time 259200php_value max_input_time 259200php_value session.gc_maxlifetime 1200this was the way I solved my problem , neither ini_set("max_execution_time", 86400); nor set_time_limit(86400) solved my problem , but the .htaccess method did.

We can solve sầu this problem in 3 different ways.

1) Using php.ini file

2) Using .htaccess file

3) Using Wp-config.php tệp tin ( for Wordpress )

Follow the path /etc/php5(your php version)/apache2/php.ini.

mở cửa it và mix the value of max_execution_time lớn a desired one.

Xem thêm: Top 5 Giống Chó Con Dễ Thương Giá Rẻ Nhất Thế Giới Ai Cũng Nên Mua

Maybe kiểm tra for any thing that you have changed under the php.ini tệp tin.For example I changed the ";intl.default_locale =" to lớn ";intl.default_locale = en_utf8" in order lớn enable the "Internationalization extension (Intl)" without adding the "extension=php_intl.dll" then this same error occurred. So I suggest khổng lồ kiểm tra for similar mistakes.

To extover your max_execution_time you can use either ini_phối or set_time_limit.

// Set maximum execution time to 10 seconds this wayini_set("max_execution_time", 10);// or this wayset_time_limit(10);!! But be aware that, both functions restarts also counting of time script has already taken to lớn executesleep(2);ini_set("max_execution_time", 5);register_shutdown_function(function() var_dump(microtime(true) - $_SERVER<"REQUEST_TIME_FLOAT">););for(;;);//// var_dump outputs float(7.1981489658356)//so if you want to lớn phối exact maximum amount of time script can run, your command must be very first.

Differences between those two functions are

You can vì chưng it easily with WHM. Just got to:

WHM -> Service Configuration -> PHP configuration

editor-> max_execution_time=30

( 30 is mặc định change it lớn whatever value u want)

Increase your script execution time by adding the following line at top of the PHPhường script.

ini_set("max_execution_time", 120); //120 seconds = 2 minutesReference has taken from Increase the PHP.. Script Execution Time

I have sầu same problem in WordPress site, I added in .htaccess tệp tin then working fine for me.

php_value max_execution_time 6000000
I have sầu make some changes in my case in: xamppphpMyAdminlibrariesconfig.default.php

i have searched for : $cfg<"ExecTimeLimit"> và change the value at right side...

Xem thêm: Các Loại Hình Kinh Doanh Dịch Vụ Là Gì? Các Loại Hình Thức Và Sản Phẩm Dịch Vụ

You can change Right h& Value lớn any higher value, like "5000". & it works.

Highly active question. Earn 10 reputation in order lớn answer this question. The reputation requirement helps protect this question from spam và non-answer activity.

Not the answer you're looking for? Browse other questions tagged php json or ask your own question.

Showing Fatal error: Maximum execution time of 30 seconds exceeded when I search for a column which have sầu 11,960 rows