#2509 Can not attach files

closed-fixed
Compose (426)
5
2007-10-07
2007-10-01
Simon Matter
No

Since upgrading to 1.4.11 I can't attach a file when composing a message. I can attach a file but when I send the message no attachment is sent with the mail. Also while in the compose window, I can attach one file, then attach a second file and the first file simply disappears. I have a heavily patches squirrelmail rpm but tried a vanilla install of 1.4.11 with the same result. My system is RHEL4 with php-4.3.9.

Discussion

1 2 3 > >> (Page 1 of 3)
  • Logged In: YES
    user_id=620333
    Originator: NO

    I am unable to duplicate this, or similar issues listed in 1805895, or 1805826.

    What are your settings for register_globals? What plugins do you have enabled?

     
  • Liviu Daia
    Liviu Daia
    2007-10-02

    Logged In: YES
    user_id=1272638
    Originator: NO

    Apache 1.3.37, PHP 4.4.7, Suhosin patch 4.4.7-0.9.6.
    register_globals = Off (along with lots of other tweaking to php.ini).

    Active plugins:
    1. abook_import_export
    2. abook_take
    3. address_add
    4. archive_mail
    5. attachment_tnef
    6. auto_prune_sent
    7. autocomplete
    8. block_attach
    9. calendar
    10. cleanup
    11. compose_chars
    12. compose_fix
    13. delete_move_next
    14. empty_trash
    15. extract
    16. folder_sizes
    17. folder_synch
    18. get_uuencode
    19. image_buttons
    20. legend
    21. listcommands
    22. login_alias
    23. mail_fetch
    24. message_details
    25. newmail
    26. preview_pane
    27. select_range
    28. sent_subfolders
    29. msg_flags
    30. show_headers
    31. show_user_and_ip
    32. smallcal
    33. squirrel_logger
    34. undelete
    35. variable_sent_folder
    36. view_as_html
    37. filters
    38. windows
    39. change_sqlpass
    40. cookie_warning

    Versions:
    abook_import_export-1.1-1.4.4.tar.gz
    address_add-2.1-1.4.0.tar.gz
    archive_mail.1.2-1.4.2.tar.gz
    attachment_tnef-0.7-1.4.0.tar.gz
    autocomplete.2.0-1.0.0.tar.gz
    auto_prune_sent-1.1.tar.gz
    block_attach.0.7-1.4.5.tar.gz
    change_sqlpass-3.3-1.2.tar.gz
    cleanup.0.2-1.4.0.tar.gz
    compatibility-2.0.4.tar.gz
    compose_chars-0.1-1.4.tar.gz
    compose_fix.tar.gz
    cookie_warning-1.1-1.4.3.tar.gz
    empty_trash-1.4-1.2.2.tar.gz
    extract.0.1-1.4.0.tar.gz
    folder_sizes-1.5-1.4.0.tar.gz
    folder_synch.0.8-1.4.0.tar.gz
    get_uuencode-3.1-1.4.x.tar.gz
    image_buttons-1.4-1.4.tar.gz
    legend.1.2-1.2.8.tar.gz
    login_alias-2.4-1.2.1.tar.gz
    msg_flags-1.4.3.1-1.4.3.tar.gz
    newuser_wiz-1.3.2.tar.gz
    preview_pane-1.2-1.4.3.tar.gz
    select_range-3.5.tar.gz
    show_headers-1.3-1.4.tar.gz
    show_user_and_ip-3.3-re-1.2.2.tar.gz
    smallcal-0.8-1.2.3.tar.gz
    squirrel_logger-2.0-1.2.7.tar.gz
    undelete.1.0-1.0.tar.gz
    variable_sent_folder.0.4-1.4.tar.gz
    view_as_html-3.7a-1.4.x.tar.gz
    windows-1.6-1.4.tar.gz

    More information:
    1. Replacing compose.php with the one from 1.4.10a appears to make the problem go away.
    2. The files to be attached remain in the data directory after the message has been sent.

     
  • Simon Matter
    Simon Matter
    2007-10-02

    Logged In: YES
    user_id=947548
    Originator: YES

    Tested on:
    php-4.2.3 / apache-1.3.27
    php-4.3.9 / apache-2.0.52

    register_globals = off

    plain vanilla SM-1.4.11, no additional plugins.

     
  • Liviu Daia
    Liviu Daia
    2007-10-02

    Logged In: YES
    user_id=1272638
    Originator: NO

    Apache 1.3.37, PHP 4.4.7, Suhosin patch 4.4.7-0.9.6.
    register_globals = Off (along with lots of other tweaking to php.ini).

    Active plugins:
    1. abook_import_export
    2. abook_take
    3. address_add
    4. archive_mail
    5. attachment_tnef
    6. auto_prune_sent
    7. autocomplete
    8. block_attach
    9. calendar
    10. cleanup
    11. compose_chars
    12. compose_fix
    13. delete_move_next
    14. empty_trash
    15. extract
    16. folder_sizes
    17. folder_synch
    18. get_uuencode
    19. image_buttons
    20. legend
    21. listcommands
    22. login_alias
    23. mail_fetch
    24. message_details
    25. newmail
    26. preview_pane
    27. select_range
    28. sent_subfolders
    29. msg_flags
    30. show_headers
    31. show_user_and_ip
    32. smallcal
    33. squirrel_logger
    34. undelete
    35. variable_sent_folder
    36. view_as_html
    37. filters
    38. windows
    39. change_sqlpass
    40. cookie_warning

    Versions:
    abook_import_export-1.1-1.4.4.tar.gz
    address_add-2.1-1.4.0.tar.gz
    archive_mail.1.2-1.4.2.tar.gz
    attachment_tnef-0.7-1.4.0.tar.gz
    autocomplete.2.0-1.0.0.tar.gz
    auto_prune_sent-1.1.tar.gz
    block_attach.0.7-1.4.5.tar.gz
    change_sqlpass-3.3-1.2.tar.gz
    cleanup.0.2-1.4.0.tar.gz
    compatibility-2.0.4.tar.gz
    compose_chars-0.1-1.4.tar.gz
    compose_fix.tar.gz
    cookie_warning-1.1-1.4.3.tar.gz
    empty_trash-1.4-1.2.2.tar.gz
    extract.0.1-1.4.0.tar.gz
    folder_sizes-1.5-1.4.0.tar.gz
    folder_synch.0.8-1.4.0.tar.gz
    get_uuencode-3.1-1.4.x.tar.gz
    image_buttons-1.4-1.4.tar.gz
    legend.1.2-1.2.8.tar.gz
    login_alias-2.4-1.2.1.tar.gz
    msg_flags-1.4.3.1-1.4.3.tar.gz
    newuser_wiz-1.3.2.tar.gz
    preview_pane-1.2-1.4.3.tar.gz
    select_range-3.5.tar.gz
    show_headers-1.3-1.4.tar.gz
    show_user_and_ip-3.3-re-1.2.2.tar.gz
    smallcal-0.8-1.2.3.tar.gz
    squirrel_logger-2.0-1.2.7.tar.gz
    undelete.1.0-1.0.tar.gz
    variable_sent_folder.0.4-1.4.tar.gz
    view_as_html-3.7a-1.4.x.tar.gz
    windows-1.6-1.4.tar.gz

    More information:
    1. Replacing compose.php with the one from 1.4.10a appears to make the problem go away.
    2. The files to be attached remain in the data directory after the message has been sent.

     
  • Simon Matter
    Simon Matter
    2007-10-02

    Logged In: YES
    user_id=947548
    Originator: YES

    I just tried it on php-5.1.6 and attachments work fine. So it looks like SM-1.4.11 is broken with PHP 4.x.

     
  • SajtXL
    SajtXL
    2007-10-02

    Logged In: YES
    user_id=1903107
    Originator: NO

    Works OK with PHP Version 5.2.4 and mySQL 5.0.45
    Works not with PHP Version 4.4.7 and mySQL 4.1.21

     
    • assigned_to: nobody --> jangliss
     
  • Logged In: YES
    user_id=620333
    Originator: NO

    Around line 380 in src/compose.php, you should see the following code:

    if (!empty($attachments)) {
    $attachments = unserialize($attachments);
    if (!empty($attachments) && is_array($attachments))
    $composeMessage->entities = $attachments;
    }

    Change that code to the following:

    if (!empty($attachments)) {
    $attachments = unserialize($attachments);
    if (!empty($attachments) && is_array($attachments)) {
    $composeMessage->entities = $attachments;
    $compose_messages[$session] = $composeMessage;
    }
    }

    This seems to have resolve the issue on my PHP 4.4.x setup, and not impacted my PHP 5.x.x setup.

     
  • Liviu Daia
    Liviu Daia
    2007-10-03

    Logged In: YES
    user_id=1272638
    Originator: NO

    This is indeed an improvement, but it only solves a part of the problem. Try this scenario:

    1. start composing a new message
    2. attach a file
    3. press the "Addresses" button and choose a "To" field
    4. get back to the compose page.

    The attachment is still dropped.

     
  • Compose, and Addressing Issue

     
1 2 3 > >> (Page 1 of 3)