PHP function doesn't process everything it needs to

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
weblucky
Forum Newbie
Posts: 3
Joined: Fri Feb 22, 2008 5:00 pm

PHP function doesn't process everything it needs to

Post by weblucky »

Hello,
I am trying to process some data from different RSS sources, but it takes some time and my functions stops processing all the results after some time, leaving about 50% of unprocessed data. Could you advise me please what should I do so my data is fully processed?
Thanks.
User avatar
RobertGonzalez
Site Administrator
Posts: 14293
Joined: Tue Sep 09, 2003 6:04 pm
Location: Fremont, CA, USA

Re: PHP function doesn't process everything it needs to

Post by RobertGonzalez »

If it is timing our your server then I would suggest paring down the feeds you are reading. Generally the server processing time limit is 30 seconds. If it is taking that long to get though half of the feeds then you are pulling in way to much information and really not serving up any information in a timely manner to your users.
weblucky
Forum Newbie
Posts: 3
Joined: Fri Feb 22, 2008 5:00 pm

Re: PHP function doesn't process everything it needs to

Post by weblucky »

Actually this php functionality is supposed to run on a scheduled basis (as a batch) to fetch in the information. Then information is braken into different themes to represent to user by another php to give it back to user (this works fine).

Is there any way I can say php to ignore any time outs and do what ever it is asked to do?
User avatar
anjanesh
DevNet Resident
Posts: 1679
Joined: Sat Dec 06, 2003 9:52 pm
Location: Mumbai, India

Re: PHP function doesn't process everything it needs to

Post by anjanesh »

set_time_limit();
This function has no effect when PHP is running in safe mode. There is no workaround other than turning off safe mode or changing the time limit in the php.ini.
So this is probably impossible to do in PHP6.
weblucky
Forum Newbie
Posts: 3
Joined: Fri Feb 22, 2008 5:00 pm

Re: PHP function doesn't process everything it needs to

Post by weblucky »

It seems working. Thank you very much.
Post Reply