Menu

#2509 Can not attach files

closed-fixed
Compose (426)
5
2007-10-07
2007-10-01
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 > >> (Page 1 of 2)
  • Jonathan Angliss

    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

     
  • Jonathan Angliss

    • assigned_to: nobody --> jangliss
     
  • Jonathan Angliss

    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.

     
  • Jonathan Angliss

    Compose, and Addressing Issue

     
  • Jonathan Angliss

    Logged In: YES
    user_id=620333
    Originator: NO

    This additional scenario is also broken in PHP 5.x too. Attached is a patch to fix both issues.
    File Added: 1805471_composeattach.patch

     
  • SajtXL

    SajtXL - 2007-10-03

    Logged In: YES
    user_id=1903107
    Originator: NO

    Sorry for my bad knowledge, but how can I add this patch?

     
  • Jonathan Angliss

    Logged In: YES
    user_id=620333
    Originator: NO

    Download the file to somewhere on the server, then from inside the root of the SquirrelMail directory (where src, class, etc can be seen), type:

    patch -p0 < /path/to/patch/1805471_composeattach.patch

    You should then see two lines come back that say it has updated compose.php, and addrbook_search_html.php.

     
  • Liviu Daia

    Liviu Daia - 2007-10-03

    Logged In: YES
    user_id=1272638
    Originator: NO

    That's it, the patch seems to fix the problem. Thank you for the quick response!

     
  • SajtXL

    SajtXL - 2007-10-03

    Logged In: YES
    user_id=1903107
    Originator: NO

    Thank You, works perfect.

     
  • Paul Lesniewski

    Paul Lesniewski - 2007-10-03

    Fix ability to add multiple attachments in 1.4.11

     
  • Paul Lesniewski

    Paul Lesniewski - 2007-10-03

    Logged In: YES
    user_id=508228
    Originator: NO

    Attached is a patch I suggest that cleans up the use of compose_messages a little more completely.
    File Added: 1.4.11_compose_attachments.patch

     
  • Simon Matter

    Simon Matter - 2007-10-04

    Logged In: YES
    user_id=947548
    Originator: YES

    I tried the updated patch 1.4.11_compose_attachments.patch and it seems to work fine for me, thanks.

     
  • Jonathan Angliss

    Logged In: YES
    user_id=620333
    Originator: NO

    This bug has been resolved.

    Please pull the latest version from the appropriate development
    tree CVS to fix your bug.

    Thank you for your help in resolving this issue.

     
  • Jonathan Angliss

    • status: open --> closed-fixed
     
  • Anonymous

    Anonymous - 2007-11-10

    Logged In: YES
    user_id=1895762
    Originator: NO

    The 2 pacth willnot work for me, but jangliss chancge in src/compose.php linje 380 work 100%
    if (!empty($attachments)) {
    $attachments = unserialize($attachments);
    if (!empty($attachments) && is_array($attachments)) {
    $composeMessage->entities = $attachments;
    $compose_messages[$session] = $composeMessage;
    }
    }

    Thanks alot

     
  • Jonathan Angliss

    Logged In: YES
    user_id=620333
    Originator: NO

    What's wrong with the second patch? The second patch also includes a fix for an additional attachments issue that my original patch doesn't handle. I'd recommend grabbing a copy of the 1.4.12-SVN snapshots.

     
  • Anonymous

    Anonymous - 2007-11-10

    Logged In: YES
    user_id=1895762
    Originator: NO

    the second patch, the file i add, can you not see after you add it, and there are no file with the mail

     
  • Jonathan Angliss

    Logged In: YES
    user_id=620333
    Originator: NO

    Weird, did you apply it after you applied the first patch? How about just grabbing a copy of the SVN snapshot from the download page?

     
  • dpjones4ic

    dpjones4ic - 2007-11-27

    Logged In: YES
    user_id=1947081
    Originator: NO

    I believe I have a related question. Please let me know if I'm not following protocol. I am using squirreloutlook-1.0.3, a variant which seems to be using SquirrelMail version: 1.4.8 as it's base.
    I am seeing the exact kind of behavior as mentioned below (only one attachment can be added and it doesn't send). I found that this only seems to happen when using the HTML composer. With plain view, attachments work.

    What do you recommend to fix this? I am running this on OpenSuSE 10.2 with PHP 5.2

    Thanks in advance.

     
1 2 > >> (Page 1 of 2)

Log in to post a comment.