From: [EMAIL PROTECTED] Operating system: Linux (dist. unknown) PHP version: 4.2.2 PHP Bug Type: Scripting Engine problem Bug description: Script re-executes instead of timing out
I have a script I've used to send MIME-encoded mails. The script reads in an address file, explodes it into an array then sends a mail message to each address. I tested the script before with some 30-40 addresses and it worked fine. Then I commented out the line that sends the mail and instead printed the address to make sure the addresses are correct before sending. Being fairly confident I then un-commented the line, removed the print() and re-ran the script. Once. My browser didn't receive a reply in the next 20 minutes. I never repeated the request. However, I know the script has run at least nine times, with no loop in it that could possibly cause that. The effect being, that a load of people have received a lot of what they now consider spam, and are rather angry. So, am I looking at a) a bug or a feature of the browser that caused the page to be re-requested (at least nine times) b) a bug in php that caused a re-run instead of a timeout or c) my reflection in the mirror as I realise that the error has been mine? Here's the offending script: <?php error_reporting(E_ALL); include('htmlMimeMail.php'); $mail = new htmlMimeMail(); $logo = $mail->getFile('xxxx.gif'); $fd = fopen("xxxx.txt","r"); $rivi = ''; while (!feof($fd)) { $rivi .= fgets($fd, 1000); } fclose ($fd); $sendTo = explode("\n",$rivi); $html = $mail->getFile('xxxx.html'); $mail->setHtml($html); $mail->addHtmlImage($logo, 'xxxx.gif', 'image/gif'); $mail->setFrom('"xxxxxx" <[EMAIL PROTECTED]>'); $mail->setSubject('xxxxxxxxx'); $mail->setHeader('X-Mailer', 'xxxxxxxx'); $count = 0; foreach($sendTo as $rec) { $result = $mail->send(array($rec), 'mail'); $count++; } echo "$count Mails sent!"; ?> -Lauri Kotilainen- -- Edit bug report at http://bugs.php.net/?id=19715&edit=1 -- Try a CVS snapshot: http://bugs.php.net/fix.php?id=19715&r=trysnapshot Fixed in CVS: http://bugs.php.net/fix.php?id=19715&r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=19715&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=19715&r=needtrace Try newer version: http://bugs.php.net/fix.php?id=19715&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=19715&r=support Expected behavior: http://bugs.php.net/fix.php?id=19715&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=19715&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=19715&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=19715&r=globals PHP 3 support discontinued: http://bugs.php.net/fix.php?id=19715&r=php3 Daylight Savings: http://bugs.php.net/fix.php?id=19715&r=dst