Page 1 of 1

[SOLVED] your "perpetual while() loop" suugestion

Posted: Mon Jul 30, 2007 7:24 pm
by phait
hi,

Your suggestion talks of a perpetual while loop running in the background and sleeping for a few seconds after every loop when sending a large batch of emails.

I am curious how you get around the timeout / execution settings in php.ini if it is running perpetually? .. or have I misunderstood (quite possibly)?

I'm thinking of options like:
max_execution_time;
max_input_time;
(and possibly) default_socket_timeout.

All have values set and you have to modify them, obviously you need to know how to long to extend them, but if the loop is perpetual then how do you get around this?

I've had some problems with scripts timing out when sending large batches and so I'm very curious :)

cheers,
paul

Posted: Mon Jul 30, 2007 7:33 pm
by feyd

Posted: Tue Jul 31, 2007 2:33 am
by Chris Corbyn
Don't ever try this from a web browser though.... it will have to be invoked from the command line ;)

Posted: Tue Jul 31, 2007 4:07 am
by phait
@feyd
GAH! of course, I'd totally forgotten about this option and now I recall that I was using that a couple of years ago to solve a similar problem. What a doofus I am! Thanks for the reminder.

@d11wtg
yup. no problems there.

thanks for the replies.

paul.