ID:               27371
 Updated by:       [EMAIL PROTECTED]
 Reported By:      wilhelm dot hagg at web dot de
-Status:           Feedback
+Status:           No Feedback
 Bug Type:         Mail related
 Operating System: Linux, Kernel 2.4.25
 PHP Version:      4.3.4
 New Comment:

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.




Previous Comments:
------------------------------------------------------------------------

[2004-02-23 16:41:25] [EMAIL PROTECTED]

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
http://bugs.php.net/bugs-generating-backtrace.php

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-02-23 16:09:33] wilhelm dot hagg at web dot de

Description:
------------
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>

<?php

$db_connection = mysql_pconnect("localhost","wwwrun","abc");

mysql_select_db("cdzirkel",$db_connection);



  $offer_text="CD's   (http://cd.cdzirkel.de)\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 Nowhere...fast\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 (http://maxi.cdzirkel.de) \n \n DVD's
 (http://dvd.cdzirkel.de) \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 (http://buch.cdzirkel.de) \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 CdZirkel.de. \n\n$offer_text \n\nDein CdZirkel
Team \n\nHier kannst Du diesen Service abbestellen:\n 
http://cdzirkel.de/index.php?Update=1&iid=$iid \n(Oder in Deinen
Einstellungen unter Profil)","From: [EMAIL PROTECTED]");               
                                                                       
                                                 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:



CREATE TABLE user (

  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 '',

  PRIMARY KEY  (id)

) TYPE=MyISAM;



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.


------------------------------------------------------------------------


-- 
Edit this bug report at http://bugs.php.net/?id=27371&edit=1

Reply via email to