Page 1 of 1

need help figuring this out (timeout error)

Posted: Mon Jun 29, 2009 5:47 pm
by natronp
trying to debug a php script and am getting errors in these two lines:

$lines = file($url_path.'/admin/lists/'.$new_file_name);
foreach($lines as $key=>$val) {

the first line has the timeout error. i can see the files on the server so i know they have been uploaded and should exist in the location.
the second line obviously fails because the first fails...

not sure what to do next in terms of troubleshooting.. any help?

Re: need help figuring this out (timeout error)

Posted: Mon Jun 29, 2009 6:01 pm
by BornForCode
How big is the file? Perhaps parsing the file is greater than default timeout limit.
To prevent this look here http://www.php.net/set_time_limit:

Re: need help figuring this out (timeout error)

Posted: Mon Jun 29, 2009 11:17 pm
by Benjamin
Read through the comments for file();