need help figuring this out (timeout error)

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
natronp
Forum Newbie
Posts: 1
Joined: Mon Jun 29, 2009 5:44 pm

need help figuring this out (timeout error)

Post 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?
BornForCode
Forum Contributor
Posts: 147
Joined: Mon Feb 11, 2008 1:56 am

Re: need help figuring this out (timeout error)

Post 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:
User avatar
Benjamin
Site Administrator
Posts: 6935
Joined: Sun May 19, 2002 10:24 pm

Re: need help figuring this out (timeout error)

Post by Benjamin »

Read through the comments for file();
Post Reply