FAQ
Edit report at http://pear.php.net/bugs/bug.php?id=18206&edit=1

ID: 18206
Updated by: paul@pixellab.co.uk
Reported By: paul at pixellab dot co dot uk
Summary: Mail_Queue produces error messages
Status: Open
Type: Bug
-Package: PEAR
+Package: Mail_Queue
Operating System: Centos 5.5
Package Version: 1.9.1
PHP Version: 5.3.5
Roadmap Versions:
New Comment:

-Package: PEAR
+Package: Mail_Queue
edit to put against Mail_Queue package.


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

[2011-01-21 18:42:19] pixel_paul

Description:
------------
when running the example code for Mail_Queue errors are generated.

if this script is activated via cron, the script hangs.


Test script:
---------------
$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

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

Search Discussions

  • Till at Jan 24, 2011 at 12:41 pm
    Edit report at http://pear.php.net/bugs/bug.php?id=18206&edit=1

    ID: 18206
    Updated by: till@php.net
    Reported By: paul at pixellab dot co dot uk
    Summary: Mail_Queue produces error messages
    -Status: Open
    +Status: Bogus
    Type: Bug
    Package: Mail_Queue
    Operating System: Centos 5.5
    PHP Version: 5.3.5
    Roadmap Versions:
    New Comment:

    -Status: Open
    +Status: Bogus
    Sorry, but your problem does not imply a bug in PEAR itself. For a
    list of more appropriate places to ask for help using PEAR, please
    visit http://pear.php.net/support/ as this bug system is not the
    appropriate forum for asking support questions.

    Thank you for your interest in PEAR.

    Activate xdebug or xhprof and find the cause of the error. I'd also dig
    into "cannot initialize container".


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

    [2011-01-24 11:19:09] pixel_paul

    -Package: PEAR
    +Package: Mail_Queue
    edit to put against Mail_Queue package.

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

    [2011-01-21 18:42:19] pixel_paul

    Description:
    ------------
    when running the example code for Mail_Queue errors are generated.

    if this script is activated via cron, the script hangs.


    Test script:
    ---------------
    $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

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

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
grouppear-bugs @
categoriesphp
postedJan 24, '11 at 10:17a
activeJan 24, '11 at 12:41p
posts2
users2
websitepear.php.net

2 users in discussion

Till: 1 post Paul: 1 post

People

Translate

site design / logo © 2022 Grokbase