You are here: Re: Getting multiple emails from a single mail()... « PHP Programming Language « IT news, forums, messages
Re: Getting multiple emails from a single mail()...

Posted by crazycooter on 08/02/07 15:07

This app has the developmestruction scheme (http://
worsethanfailure.com/Articles/The_Developmestuction_Environment.aspx)
so it took a while to find the right thing to comment out such that I
was able to isolate the problem. The feed back above pointed me in the
right direction and I found something I probably wouldn't have
otherwise.

I don't fully understand all the mechanics here and since the security
model of the site will change I don't have time to dig and fix. It
looks like broken authentication code, but maybe it really works.
<shrugs/>

Here it is...

$auth_usr = $_SERVER['PHP_AUTH_USER'];
$auth_pswd = $_SERVER['PHP_AUTH_PW'];


if(!$auth_usr)
{ header('WWW-Authenticate: Basic realm="Auth"');
}
elseif(in_array(strtolower($auth_usr), $usr))
{ $access = 2;
}

If I comment this code out, I only get one email. If I leave this code
in, I get five emails. I can only assume its bouncing back and forth
to the client for the auth, each time causing the page to reload and
running the mail code again.

Debugging output didn't help (unless it would have been to a log file)
since its only going to show output for the last request which
actually rendered.

Thanks all!

CrazyCooter

 

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

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