PEAR Forum :: PHP Extension and Application Repository

PEAR Forum Forum Index
 FAQFAQ   SearchSearch   MemberlistMemberlist   RegisterRegister   ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 
pear mail_queue issue

 
Post new topic   Reply to topic    PEAR Forum Forum Index -> Mail
View previous topic :: View next topic  
Author Message
pixel_paul



Joined: 21 Aug 2007
Posts: 2
Location: Bristol, UK

PostPosted: Sat Feb 26, 2011 4:56 pm    Post subject: pear mail_queue issue Reply with quote

Since upgrading to PHP 5.3 I'm encountering this issue:

when running the example code for Mail_Queue errors are generated. if this script is activated via cron, the script hangs.

Test script:
---------------
Code:
$db_options['type'] = 'mdb2';
 // the others are the options for the used container
// here are some for db
$db_options['dsn'] = NEWSLETTER_DB_SETTING; $db_options['mail_table'] = NEWSLETTER_TABLE_NAME;
// here are the options for sending the messages themselves
// these are the options needed for the Mail-Class, especially used for Mail::factory()
$mail_options['driver'] = 'smtp';
$mail_options['host'] = NEWSLETTER_HOST_DOMAIN; $mail_options['port'] = 25;
$mail_options['localhost'] = NEWSLETTER_HOST_DOMAIN;
//optional Mail_smtp parameter
$mail_options['auth'] = true;
$mail_options['username'] = NEWSLETTER_EMAIL_USERNAME; $mail_options['password'] = NEWSLETTER_EMAIL_PASSWORD;
/* How many mails could we send each time the script is called */ $max_amount_mails = 100;
/* we use the db_options and mail_options from the config again */ $mail_queue =& new Mail_Queue($db_options, $mail_options);
 /* really sending the messages */ $mail_queue->sendMailsInQueue($max_amount_mails);


Expected result:
----------------
no output

Actual result:
--------------
Notice: Error in sending mail: Mail Queue Error: Cannot initialize container in /usr/share/pear/PEAR.php on line 908 until finally: Fatal error: Allowed memory size of 33554432 bytes exhausted (tried to allocate 37 bytes) in /usr/share/pear/Mail/Queue/Error.php on line 75
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    PEAR Forum Forum Index -> Mail All times are GMT + 2 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum



PEAR Forum topic RSS feed 
Powered by phpBB © 2001, 2005 phpBB Group

Provided by Ministry of Web developement