Page 1 of 1

60 second timeouts

Posted: Tue Aug 26, 2008 9:02 am
by wschaepe01
I am trying to load many thousands of html files into a MySQL database with PHP on my local server, but I am consistently timed out at 60 sec.

I read in a PHP forum that if I set the max execution time from 60 sec to 0 in the PHP.ini file, the execution time would be unlimited. I found 6 PHP.ini files on my local server (xampp) and changed all the max execution times to 0.

But I still get the time out. Did I miss some ini files or does this not work to eliminate the 60 sec time out?
Is there another way (or any way) to do it?

The HTML data loads just fine into the database, but the script times out. I want to run the script until it is done, which will take a number of minutes - I have ~60,000 files to load.

Regards,
Bill Schaepe

Re: 60 second timeouts

Posted: Tue Aug 26, 2008 9:08 am
by Ziq
try use

Code: Select all

 
set_time_limit(0);
 
This function has no effect when PHP is running in safe mode.

Re: 60 second timeouts

Posted: Tue Aug 26, 2008 10:27 am
by wschaepe01
PHP is not running in safe mode.

I do not see any "set_time" line in the PHP.ini file.

Here is what my resource limits are set to now:
;;;;;;;;;;;;;;;;;;;
; Resource Limits ;
;;;;;;;;;;;;;;;;;;;

max_execution_time = 0 ; Maximum execution time of each script, in seconds
max_input_time = 60 ; Maximum amount of time each script may spend parsing request data
memory_limit = 32M ; Maximum amount of memory a script may consume (16MB)
; original settings = 60, 60 and 32M