jwstockwell Posted July 27, 2006 Share Posted July 27, 2006 Running a script trying to insert 40,000 + zipcodes into a table:I don't think I see it in the apache error log but I'll ask anyway.Is this from mysql or apache?Fatal error: Maximum execution time of 30 seconds exceeded in C:\Program Files\Apache Group\Apache2\htdocs\add_zipcodes.php on line 580and what do I need to change to fix it?TIAJim Link to comment https://forums.phpfreaks.com/topic/15797-server-timeout/ Share on other sites More sharing options...
wildteen88 Posted July 27, 2006 Share Posted July 27, 2006 This is from PHP. By defualt PHPs max execution time of a script is 30secs which more than enough for a script. However in your case it appears your SQL query is taking a lot of processing time, prehaps due to too many overheads or sommit. To solve this, find and edit your php.ini file. Find the following line within the php.ini:[code]max_execution_time = 30 ; Maximum execution time of each script, in seconds[/code]Change 30 to 60.Save the php.ini. Now you'll need to restart Apache in order for the updated php setting to take affect. If that fails to work go for 120. I wouldn't advise you to go over 120 secounds. As a script shouldn't need to take 2mins or more to execute. Link to comment https://forums.phpfreaks.com/topic/15797-server-timeout/#findComment-64601 Share on other sites More sharing options...
jwstockwell Posted July 27, 2006 Author Share Posted July 27, 2006 THANK YOU! Link to comment https://forums.phpfreaks.com/topic/15797-server-timeout/#findComment-64603 Share on other sites More sharing options...
shocker-z Posted July 27, 2006 Share Posted July 27, 2006 if you prefer just this page to have long timeout then you could tryset_time_limit (120);RegardsLiam Link to comment https://forums.phpfreaks.com/topic/15797-server-timeout/#findComment-64604 Share on other sites More sharing options...
kenrbnsn Posted July 27, 2006 Share Posted July 27, 2006 Using[code]<?php set_time_limit(0); ?>[/code]allows unlimited time, which can lead to problems if you have an infinate loop in your code... :)Ken Link to comment https://forums.phpfreaks.com/topic/15797-server-timeout/#findComment-64609 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.