60 second timeouts

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
wschaepe01
Forum Newbie
Posts: 3
Joined: Tue Aug 26, 2008 8:54 am

60 second timeouts

Post 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
User avatar
Ziq
Forum Contributor
Posts: 194
Joined: Mon Aug 25, 2008 12:43 am
Location: Russia, Voronezh

Re: 60 second timeouts

Post by Ziq »

try use

Code: Select all

 
set_time_limit(0);
 
This function has no effect when PHP is running in safe mode.
wschaepe01
Forum Newbie
Posts: 3
Joined: Tue Aug 26, 2008 8:54 am

Re: 60 second timeouts

Post 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
Post Reply