Page 1 of 1

Running a very long script

Posted: Tue Aug 26, 2008 7:16 am
by jamesbrauman
Hello everyone, first post here :)

I am attempting to run a php script that needs to access over 4000 html pages, extract content from these pages, and save the content to my mysql database. I have been able to get the script to run for long periods of time, however after some unknown amount of time the connection between PHP and MYSQL goes strange, and Mysql keeps inserting blank rows instead of rows populated with data, even though I know that the rows I sent to mysql are populated (this is after a couple of hours running.)

Help?

Re: Running a very long script

Posted: Wed Aug 27, 2008 12:44 am
by eskio
Hi,

I am not sure but try this

set_time_limit(0); at the top of your page.

And under phpmyadmin folder in config.inc.php change the default value of 300 by 0
$cfg['ExecTimeLimit'] = 300; // maximum execution time in seconds (0 for no limit)

Re: Running a very long script

Posted: Wed Aug 27, 2008 8:17 am
by Chalks
4000 pages at one time? I would definitely split that up into batches of 50 or so, no chance I would do that all at once.