You are here: Re: Best way to mass mail « PHP « IT news, forums, messages
Re: Best way to mass mail

Posted by Joshua May on 10/17/96 11:27

You have to be careful, though, because I had this problem..

I had PHP running as a CGI on the host with Apache, and Apache had a
nasty habit of terminating the CGI communicationg before PHP had
finished mailing everyone, even if set_time_limit(0); was set (well,
even if set_time_limit(arbitrarily_big_number); was used).

I ended up using an exec call to a shell script, which executed the PHP
CLI binary with a custom php.ini, and as a background process. The mails
successfully send, now. And yes, it's a convoluted way, but as it turns
out, it was the only way to properly background it and run all the way
until it ends.

So be careful if you decide to rely on set_time_limit()..

Josh.

Manuel Lemos wrote:
> Hello,
>
> on 09/12/2005 10:50 AM Ryan A said the following:
>
>> The thing that bothers me the most is if the program times out..., how
>> do I
>> start again from
>> the ones that have not been sent?
>
>
> Use set_time_limit(0); and your script will never timeout. Anyway, long
> standing scripts should be run off your Web server, maybe started from
> by cron.
>

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация