|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #27371 php scipt crashes
Submitted: 2004-02-23 16:09 UTC Modified: 2004-03-08 07:11 UTC
From: wilhelm dot hagg at web dot de Assigned:
Status: No Feedback Package: Mail related
PHP Version: 4.3.4 OS: Linux, Kernel 2.4.25
Private report: No CVE-ID: None
View Add Comment Developer Edit
Anyone can comment on a bug. Have a simpler test case? Does it work for you on a different platform? Let us know!
Just going to say 'Me too!'? Don't clutter the database with that please — but make sure to vote on the bug!
Your email address:
Solve the problem:
27 - 15 = ?
Subscribe to this entry?

 [2004-02-23 16:09 UTC] wilhelm dot hagg at web dot de
While sending emails with the mail() function in a loop, php  stops immediately (crashes ??). Unfortuately, this happens not every time, only some times. There is no message in the log files, it just stops.

Reproduce code:
<!doctype html public "-//w3c//dtd html 4.0 transitional//en">
<html> <head> <body>
$db_connection = mysql_pconnect("localhost","wwwrun","abc");

  $offer_text="CD's   (\n \n deaf dumb blind\n clawfinger\n \n live aus R?delheim\n R?delheim Hartreim Projekt\n \n 4 gewinnt\n Die fantastischen Vier\n \n soundtrack\n blade 2\n \n Betty\n Helmet\n \n ready an' willing\n whitesnake\n \n use your brain\n clawfinger\n \n wie Mutter und Tochter\n Badesalz\n \n Under the pink\n Tori Amos\n \n dark side of the moon\n Pink Floyd\n \n Talk On Corners\n The Corrs\n \n\n Fury in the slaughterhouse\n \n Jahmekya\n Ziggy Marley\n \n smash\n offspring\n \n Greatest hits\n Whitesnake\n \n Das ist nicht die ganze Wahrheit\n Die ?rzte\n \n Herzeleid\n Rammstein\n \n digimortal\n fear factory\n \n in concert with the London symphony orchestra\n deep purple\n \n time to move\n h-blockx\n \n america's least wanted\n ugly kid joe\n \n without you I'm nothing\n placebo\n \n Maxi's ( \n \n DVD's  ( \n \n daredevil\n \n \n blade2 ungek?rzt\n \n \n blade\n \n \n the cell (mit J.Lo)\n \n \n matrix 1\n \n \n im Bann des Psychopathen\n \n \n B?cher ( \n \n Werner - Oder Was?\n Br?sel\n \n";                                                                                                                                               $uqid = mysqlquery("SELECT * FROM user");                                       while( $ures = mysql_fetch_array($uqid) ) {                                       $iid = $ures[id];                                                               $email = $ures[email];                                                          $name = $ures[name];                                                            $familyname = $ures[familyname];                                                                                                                                mail($email, "Neue Angebote bei CdZirkel", "Hallo $name $familyname ! \n\nBrandneu: Hier sind die neuesten Angebote bei \n\n$offer_text \n\nDein CdZirkel Team \n\nHier kannst Du diesen Service abbestellen:\n$iid \n(Oder in Deinen Einstellungen unter Profil)","From:");                                                                                                                                         echo "$email <br>";                                                           }                                                                               echo "DONE";                                                                  ?>                                                                              </body> </html>

Expected result:
Should send an email to each user in db-table user and print a line with the email address on the result http-page.

The code requires a mysqldatabase cdzirkel (passw. abc) that holds a table with all users:

  id int(1) unsigned NOT NULL auto_increment,
  email varchar(100) NOT NULL default '',
  password varchar(100) default '',
  name varchar(100) default '',
  familyname varchar(100) default '',

Currently there are roughly 300 users in the database.

Actual result:
It stops (sometimes) in between.

I also checked the return code of the mail function. Whenever it returned the code was o.k. So i think it hangs or it crashes.


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2004-02-23 16:41 UTC]
Thank you for this bug report. To properly diagnose the problem, we
need a backtrace to see what is happening behind the scenes. To
find out how to generate a backtrace, please read

Once you have generated a backtrace, please submit it to this bug
report and change the status back to "Open". Thank you for helping
us make PHP better.

 [2004-03-08 07:11 UTC]
No feedback was provided. The bug is being suspended because
we assume that you are no longer experiencing the problem.
If this is not the case and you are able to provide the
information that was requested earlier, please do so and
change the status of the bug back to "Open". Thank you.

PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sat Apr 13 19:01:29 2024 UTC