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

ID: 18335
Updated by: jon@php.net
Reported By: dunix at gmx dot de
Summary: Attachments broken
-Status: Open
+Status: Closed
Type: Bug
Package: Net_SMTP
Operating System: Gentoo Linux
Package Version: 1.5.0
PHP Version: 5.3.5
-Assigned To:
+Assigned To: jon
Roadmap Versions:
New Comment:

-Status: Open
+Status: Closed
-Assigned To:
+Assigned To: jon
I applied a simpler version of the suggested patch. It looks like the
problem was just
that the default timeout value was spelled 'null' instead of '0'.


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

[2011-03-10 23:46:06] #518b37bce9d66ccceca

It seems like the timeout is the problem. I'll add a patch that fixed
the problem for me. Though, I'm not sure if it fixes the problem at the
right place. Maybe Net_Socket should make sure that only int values can
be passed to socket_set_timeout() ?

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

[2011-03-03 18:23:37] dunix

Description:
------------
After updating from 1.4.1 to 1.5.0, attachments in some mails are
broken. I'm using Net_SMTP with Horde and Imp. The attachment mime part
is always cut off at the same position.

Amavis notices the following:
Mar 3 18:04:33 mail amavis[21946]: (21946-09) WARN: MIME::Parser
error: part did not end with expected boundary
After going back to 1.4.1, the problem disappeared.

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

Search Discussions

  • Mail at Mar 13, 2011 at 11:40 am
    Edit report at http://pear.php.net/bugs/bug.php?id=18335&edit=1

    ID: 18335
    Comment by: mail@dunix-data.de
    Reported By: dunix at gmx dot de
    Summary: Attachments broken
    Status: Closed
    Type: Bug
    Package: Net_SMTP
    Operating System: Gentoo Linux
    Package Version: 1.5.0
    PHP Version: 5.3.5
    Assigned To: jon
    Roadmap Versions:
    New Comment:

    1.5.1 is still broken for me.

    Seems like setting a '0' timeout doesn't work. Maybe setting no timeout
    at all if no timeout is requested is better?


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

    [2011-03-11 06:25:47] jon

    -Status: Open
    +Status: Closed
    -Assigned To:
    +Assigned To: jon
    I applied a simpler version of the suggested patch. It looks like the
    problem was just
    that the default timeout value was spelled 'null' instead of '0'.

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

    [2011-03-10 23:46:06] #518b37bce9d66ccceca

    It seems like the timeout is the problem. I'll add a patch that fixed
    the problem for me. Though, I'm not sure if it fixes the problem at the
    right place. Maybe Net_Socket should make sure that only int values can
    be passed to socket_set_timeout() ?

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

    [2011-03-03 18:23:37] dunix

    Description:
    ------------
    After updating from 1.4.1 to 1.5.0, attachments in some mails are
    broken. I'm using Net_SMTP with Horde and Imp. The attachment mime part
    is always cut off at the same position.

    Amavis notices the following:
    Mar 3 18:04:33 mail amavis[21946]: (21946-09) WARN: MIME::Parser
    error: part did not end with expected boundary
    After going back to 1.4.1, the problem disappeared.

    ------------------------------------------------------------------------
  • Dunix at Mar 13, 2011 at 11:42 am
    Edit report at http://pear.php.net/bugs/bug.php?id=18335&edit=1

    ID: 18335
    Updated by: dunix@gmx.de
    Reported By: dunix at gmx dot de
    Summary: Attachments broken
    -Status: Closed
    +Status: Open
    Type: Bug
    Package: Net_SMTP
    Operating System: Gentoo Linux
    -Package Version: 1.5.0
    +Package Version: 1.5.1
    PHP Version: 5.3.5
    Assigned To: jon
    Roadmap Versions:
    New Comment:

    -Status: Closed
    +Status: Open
    -Package Version: 1.5.0
    +Package Version: 1.5.1



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

    [2011-03-13 12:43:15] passembk

    1.5.1 is still broken for me.

    Seems like setting a '0' timeout doesn't work. Maybe setting no timeout
    at all if no timeout is requested is better?

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

    [2011-03-11 06:25:47] jon

    -Status: Open
    +Status: Closed
    -Assigned To:
    +Assigned To: jon
    I applied a simpler version of the suggested patch. It looks like the
    problem was just
    that the default timeout value was spelled 'null' instead of '0'.

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

    [2011-03-10 23:46:06] #518b37bce9d66ccceca

    It seems like the timeout is the problem. I'll add a patch that fixed
    the problem for me. Though, I'm not sure if it fixes the problem at the
    right place. Maybe Net_Socket should make sure that only int values can
    be passed to socket_set_timeout() ?

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

    [2011-03-03 18:23:37] dunix

    Description:
    ------------
    After updating from 1.4.1 to 1.5.0, attachments in some mails are
    broken. I'm using Net_SMTP with Horde and Imp. The attachment mime part
    is always cut off at the same position.

    Amavis notices the following:
    Mar 3 18:04:33 mail amavis[21946]: (21946-09) WARN: MIME::Parser
    error: part did not end with expected boundary
    After going back to 1.4.1, the problem disappeared.

    ------------------------------------------------------------------------
  • Jon at Mar 21, 2011 at 3:44 am
    Edit report at http://pear.php.net/bugs/bug.php?id=18335&edit=1

    ID: 18335
    Updated by: jon@php.net
    Reported By: dunix at gmx dot de
    Summary: Attachments broken
    Status: Assigned
    Type: Bug
    Package: Net_SMTP
    Operating System: Gentoo Linux
    Package Version: 1.5.1
    PHP Version: 5.3.5
    Assigned To: jon
    Roadmap Versions:
    New Comment:

    Could someone try one of these suggestions and report back? Or perhaps
    provide
    some more details on how to reproduce this problem?

    I'm afraid I'm not seeing the problem here, so it's difficult for me to
    determine how to
    fix it correctly.


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

    [2011-03-13 12:45:01] dunix

    -Status: Closed
    +Status: Open
    -Package Version: 1.5.0
    +Package Version: 1.5.1


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

    [2011-03-13 12:43:15] passembk

    1.5.1 is still broken for me.

    Seems like setting a '0' timeout doesn't work. Maybe setting no timeout
    at all if no timeout is requested is better?

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

    [2011-03-11 06:25:47] jon

    -Status: Open
    +Status: Closed
    -Assigned To:
    +Assigned To: jon
    I applied a simpler version of the suggested patch. It looks like the
    problem was just
    that the default timeout value was spelled 'null' instead of '0'.

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

    [2011-03-10 23:46:06] #518b37bce9d66ccceca

    It seems like the timeout is the problem. I'll add a patch that fixed
    the problem for me. Though, I'm not sure if it fixes the problem at the
    right place. Maybe Net_Socket should make sure that only int values can
    be passed to socket_set_timeout() ?

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

    [2011-03-03 18:23:37] dunix

    Description:
    ------------
    After updating from 1.4.1 to 1.5.0, attachments in some mails are
    broken. I'm using Net_SMTP with Horde and Imp. The attachment mime part
    is always cut off at the same position.

    Amavis notices the following:
    Mar 3 18:04:33 mail amavis[21946]: (21946-09) WARN: MIME::Parser
    error: part did not end with expected boundary
    After going back to 1.4.1, the problem disappeared.

    ------------------------------------------------------------------------
  • Mail at Mar 21, 2011 at 8:05 am
    Edit report at http://pear.php.net/bugs/bug.php?id=18335&edit=1

    ID: 18335
    Comment by: mail@dunix-data.de
    Reported By: dunix at gmx dot de
    Summary: Attachments broken
    Status: Assigned
    Type: Bug
    Package: Net_SMTP
    Operating System: Gentoo Linux
    Package Version: 1.5.1
    PHP Version: 5.3.5
    Assigned To: jon
    Roadmap Versions:
    New Comment:

    Not sure if this helps, but e-mails / attachments have to be of a
    certain size. The e-mails are usually cut off at around 65KB. This is
    almost always reproductible. Around 5% of these e-mails get through
    without being cut off.


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

    [2011-03-21 04:46:44] jon

    Could someone try one of these suggestions and report back? Or perhaps
    provide
    some more details on how to reproduce this problem?

    I'm afraid I'm not seeing the problem here, so it's difficult for me to
    determine how to
    fix it correctly.

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

    [2011-03-13 12:45:01] dunix

    -Status: Closed
    +Status: Open
    -Package Version: 1.5.0
    +Package Version: 1.5.1


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

    [2011-03-13 12:43:15] passembk

    1.5.1 is still broken for me.

    Seems like setting a '0' timeout doesn't work. Maybe setting no timeout
    at all if no timeout is requested is better?

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

    [2011-03-11 06:25:47] jon

    -Status: Open
    +Status: Closed
    -Assigned To:
    +Assigned To: jon
    I applied a simpler version of the suggested patch. It looks like the
    problem was just
    that the default timeout value was spelled 'null' instead of '0'.

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

    [2011-03-10 23:46:06] #518b37bce9d66ccceca

    It seems like the timeout is the problem. I'll add a patch that fixed
    the problem for me. Though, I'm not sure if it fixes the problem at the
    right place. Maybe Net_Socket should make sure that only int values can
    be passed to socket_set_timeout() ?

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

    The remainder of the comments for this report are too long. To view
    the rest of the comments, please view the bug report online at
    http://pear.php.net/bugs/bug.php?id=18335
  • Jon at Mar 22, 2011 at 4:49 am
    Edit report at http://pear.php.net/bugs/bug.php?id=18335&edit=1

    ID: 18335
    Updated by: jon@php.net
    Reported By: dunix at gmx dot de
    Summary: Attachments broken
    Status: Assigned
    Type: Bug
    Package: Net_SMTP
    Operating System: Gentoo Linux
    Package Version: 1.5.1
    PHP Version: 5.3.5
    Assigned To: jon
    Roadmap Versions:
    New Comment:

    Great; it sounds like this is reproducible for many people. Could you
    trying
    attempting some of the timeout changes suggested in the comments to see
    if they
    make a difference?


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

    [2011-03-21 09:07:43] passembk

    Not sure if this helps, but e-mails / attachments have to be of a
    certain size. The e-mails are usually cut off at around 65KB. This is
    almost always reproductible. Around 5% of these e-mails get through
    without being cut off.

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

    [2011-03-21 04:46:44] jon

    Could someone try one of these suggestions and report back? Or perhaps
    provide
    some more details on how to reproduce this problem?

    I'm afraid I'm not seeing the problem here, so it's difficult for me to
    determine how to
    fix it correctly.

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

    [2011-03-13 12:45:01] dunix

    -Status: Closed
    +Status: Open
    -Package Version: 1.5.0
    +Package Version: 1.5.1


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

    [2011-03-13 12:43:15] passembk

    1.5.1 is still broken for me.

    Seems like setting a '0' timeout doesn't work. Maybe setting no timeout
    at all if no timeout is requested is better?

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

    [2011-03-11 06:25:47] jon

    -Status: Open
    +Status: Closed
    -Assigned To:
    +Assigned To: jon
    I applied a simpler version of the suggested patch. It looks like the
    problem was just
    that the default timeout value was spelled 'null' instead of '0'.

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

    The remainder of the comments for this report are too long. To view
    the rest of the comments, please view the bug report online at
    http://pear.php.net/bugs/bug.php?id=18335
  • Mail at Mar 22, 2011 at 10:42 pm
    Edit report at http://pear.php.net/bugs/bug.php?id=18335&edit=1

    ID: 18335
    Comment by: mail@dunix-data.de
    Reported By: dunix at gmx dot de
    Summary: Attachments broken
    Status: Assigned
    Type: Bug
    Package: Net_SMTP
    Operating System: Gentoo Linux
    Package Version: 1.5.1
    PHP Version: 5.3.5
    Assigned To: jon
    Roadmap Versions:
    New Comment:

    Sorry for the confusion, dunix and passembk are both my accounts.

    I could reproduce the problem on two different machines. The patch that
    I attached fixed it on both of them.

    Let me know if you need more information or if there is anything else
    that I could test.


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

    [2011-03-22 05:52:05] jon

    Great; it sounds like this is reproducible for many people. Could you
    trying
    attempting some of the timeout changes suggested in the comments to see
    if they
    make a difference?

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

    [2011-03-21 09:07:43] passembk

    Not sure if this helps, but e-mails / attachments have to be of a
    certain size. The e-mails are usually cut off at around 65KB. This is
    almost always reproductible. Around 5% of these e-mails get through
    without being cut off.

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

    [2011-03-21 04:46:44] jon

    Could someone try one of these suggestions and report back? Or perhaps
    provide
    some more details on how to reproduce this problem?

    I'm afraid I'm not seeing the problem here, so it's difficult for me to
    determine how to
    fix it correctly.

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

    [2011-03-13 12:45:01] dunix

    -Status: Closed
    +Status: Open
    -Package Version: 1.5.0
    +Package Version: 1.5.1


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

    [2011-03-13 12:43:15] passembk

    1.5.1 is still broken for me.

    Seems like setting a '0' timeout doesn't work. Maybe setting no timeout
    at all if no timeout is requested is better?

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

    The remainder of the comments for this report are too long. To view
    the rest of the comments, please view the bug report online at
    http://pear.php.net/bugs/bug.php?id=18335
  • Daniel Oconnor at Mar 27, 2011 at 12:51 pm
    Edit report at http://pear.php.net/bugs/bug.php?id=18335&edit=1

    ID: 18335
    Updated by: daniel.oconnor@gmail.com
    Reported By: dunix at gmx dot de
    Summary: Attachments broken
    Status: Assigned
    Type: Bug
    Package: Net_SMTP
    Operating System: Gentoo Linux
    Package Version: 1.5.1
    PHP Version: 5.3.5
    Assigned To: jon
    Roadmap Versions:
    New Comment:

    1.5.0 appeared to exhibit this behaviour for us, and 1.5.1 resolved it.
    WFM.


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

    [2011-03-22 23:44:46] passembk

    Sorry for the confusion, dunix and passembk are both my accounts.

    I could reproduce the problem on two different machines. The patch that
    I attached fixed it on both of them.

    Let me know if you need more information or if there is anything else
    that I could test.

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

    [2011-03-22 05:52:05] jon

    Great; it sounds like this is reproducible for many people. Could you
    trying
    attempting some of the timeout changes suggested in the comments to see
    if they
    make a difference?

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

    [2011-03-21 09:07:43] passembk

    Not sure if this helps, but e-mails / attachments have to be of a
    certain size. The e-mails are usually cut off at around 65KB. This is
    almost always reproductible. Around 5% of these e-mails get through
    without being cut off.

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

    [2011-03-21 04:46:44] jon

    Could someone try one of these suggestions and report back? Or perhaps
    provide
    some more details on how to reproduce this problem?

    I'm afraid I'm not seeing the problem here, so it's difficult for me to
    determine how to
    fix it correctly.

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

    [2011-03-13 12:45:01] dunix

    -Status: Closed
    +Status: Open
    -Package Version: 1.5.0
    +Package Version: 1.5.1


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

    The remainder of the comments for this report are too long. To view
    the rest of the comments, please view the bug report online at
    http://pear.php.net/bugs/bug.php?id=18335
  • Jon at Mar 28, 2011 at 3:53 pm
    Edit report at http://pear.php.net/bugs/bug.php?id=18335&edit=1

    ID: 18335
    Updated by: jon@php.net
    Reported By: dunix at gmx dot de
    Summary: Attachments broken
    -Status: Assigned
    +Status: Feedback
    Type: Bug
    Package: Net_SMTP
    Operating System: Gentoo Linux
    Package Version: 1.5.1
    PHP Version: 5.3.5
    Assigned To: jon
    Roadmap Versions:
    New Comment:

    -Status: Assigned
    +Status: Feedback
    The attached patch changed the behavior to only set the socket timeout
    if a
    connection timeout was specified. That effectively removes all
    non-default timeout
    behavior, which is not the goal of the feature.

    In its default mode, the current 1.5.1 code should default to an
    infinite socket timeout
    (timeout = 0).

    So I'm a little confused what's causing the problematic behavior (an
    overly-short
    timeout that's tearing down the connection for large transfers).


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

    [2011-03-27 13:53:55] doconnor

    1.5.0 appeared to exhibit this behaviour for us, and 1.5.1 resolved it.
    WFM.

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

    [2011-03-22 23:44:46] passembk

    Sorry for the confusion, dunix and passembk are both my accounts.

    I could reproduce the problem on two different machines. The patch that
    I attached fixed it on both of them.

    Let me know if you need more information or if there is anything else
    that I could test.

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

    [2011-03-22 05:52:05] jon

    Great; it sounds like this is reproducible for many people. Could you
    trying
    attempting some of the timeout changes suggested in the comments to see
    if they
    make a difference?

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

    [2011-03-21 09:07:43] passembk

    Not sure if this helps, but e-mails / attachments have to be of a
    certain size. The e-mails are usually cut off at around 65KB. This is
    almost always reproductible. Around 5% of these e-mails get through
    without being cut off.

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

    [2011-03-21 04:46:44] jon

    Could someone try one of these suggestions and report back? Or perhaps
    provide
    some more details on how to reproduce this problem?

    I'm afraid I'm not seeing the problem here, so it's difficult for me to
    determine how to
    fix it correctly.

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

    The remainder of the comments for this report are too long. To view
    the rest of the comments, please view the bug report online at
    http://pear.php.net/bugs/bug.php?id=18335
  • Mail at Mar 30, 2011 at 11:04 am
    Edit report at http://pear.php.net/bugs/bug.php?id=18335&edit=1

    ID: 18335
    Comment by: mail@dunix-data.de
    Reported By: dunix at gmx dot de
    Summary: Attachments broken
    Status: Feedback
    Type: Bug
    Package: Net_SMTP
    Operating System: Gentoo Linux
    Package Version: 1.5.1
    PHP Version: 5.3.5
    Assigned To: jon
    Roadmap Versions:
    New Comment:

    I don't know if this is helpful, but I installed xdebug to trace the
    problem. Here is the relevant output:

    The first trace shows what happened when the e-mail got through without
    being cut off:
    0,6897 18185088 -> Net_SMTP->_send($data = '...')
    /usr/share/php/Net/SMTP.php:1036
    0,6897 18310152 -> Net_SMTP->_debug($message =
    '...') /usr/share/php/Net/SMTP.php:250
    0,6897 18185088 -> Net_Socket->write($data = '...',
    $blocksize = ???) /usr/share/php/Net/SMTP.php:252
    0,6897 18185184 -> is_resource(resource(108) of
    type (stream)) /usr/share/php/Net/Socket.php:379
    => TRUE
    0,6897 18185184 -> is_null(NULL)
    /usr/share/php/Net/Socket.php:383
    => TRUE
    0,6897 18185184 -> fwrite(resource(108) of type
    (stream), '...') /usr/share/php/Net/Socket.php:384
    => 124991
    => 124991
    The second trace shows what happend when the same e-mail was cut off:
    0,6897 18109824 -> Net_SMTP->_send($data = '...')
    /usr/share/php/Net/SMTP.php:1036
    0,6897 18234888 -> Net_SMTP->_debug($message =
    '...') /usr/share/php/Net/SMTP.php:250
    0,6897 18109824 -> Net_Socket->write($data = '...',
    $blocksize = ???) /usr/share/php/Net/SMTP.php:252
    0,6897 18109920 -> is_resource(resource(108) of
    type (stream)) /usr/share/php/Net/Socket.php:379
    => TRUE
    0,6897 18109920 -> is_null(NULL)
    /usr/share/php/Net/Socket.php:383
    => TRUE
    0,6897 18109920 -> fwrite(resource(108) of type
    (stream), '...') /usr/share/php/Net/Socket.php:384
    => 65536
    => 65536
    Additionally, the fwrite function generated the following notice:
    fwrite(): send of 8192 bytes failed with errno=11 Resource temporarily
    unavailable in /usr/share/php/Net/Socket.php on line 384


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

    [2011-03-28 16:55:37] jon

    -Status: Assigned
    +Status: Feedback
    The attached patch changed the behavior to only set the socket timeout
    if a
    connection timeout was specified. That effectively removes all
    non-default timeout
    behavior, which is not the goal of the feature.

    In its default mode, the current 1.5.1 code should default to an
    infinite socket timeout
    (timeout = 0).

    So I'm a little confused what's causing the problematic behavior (an
    overly-short
    timeout that's tearing down the connection for large transfers).

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

    [2011-03-27 13:53:55] doconnor

    1.5.0 appeared to exhibit this behaviour for us, and 1.5.1 resolved it.
    WFM.

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

    [2011-03-22 23:44:46] passembk

    Sorry for the confusion, dunix and passembk are both my accounts.

    I could reproduce the problem on two different machines. The patch that
    I attached fixed it on both of them.

    Let me know if you need more information or if there is anything else
    that I could test.

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

    [2011-03-22 05:52:05] jon

    Great; it sounds like this is reproducible for many people. Could you
    trying
    attempting some of the timeout changes suggested in the comments to see
    if they
    make a difference?

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

    [2011-03-21 09:07:43] passembk

    Not sure if this helps, but e-mails / attachments have to be of a
    certain size. The e-mails are usually cut off at around 65KB. This is
    almost always reproductible. Around 5% of these e-mails get through
    without being cut off.

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

    The remainder of the comments for this report are too long. To view
    the rest of the comments, please view the bug report online at
    http://pear.php.net/bugs/bug.php?id=18335

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
grouppear-bugs @
categoriesphp
postedMar 11, '11 at 5:22a
activeMar 30, '11 at 11:04a
posts10
users4
websitepear.php.net

People

Translate

site design / logo © 2022 Grokbase