Results 1 to 4 of 4

Thread: Attachments are not being saved to File System

  1. #1
    gkelemen is offline Member
    Join Date
    Oct 2006
    Posts
    7

    Default Attachments are not being saved to File System

    Attachments in my install (Sugar 4.5.0g, SLES 10.1/Apache/MySQL) are not being saved in [sugardir]/cache/uploads. I have UTF-8 as my character set in My Account for all users and for emails as well.
    We recently switched to this new server (complete reinstall) so attachments/documents from the previous install are available. But we get a problem when we try to download .DOC or .XLS files from that install. In other words, emails with attachments that end in a .DOC or .XLS attachment still generate a "Invalid File Reference" error. Attachments and documents that are PDFs are okay. Recently attachments that are .ZIP files are not being stored. Previously received .ZIP files can be downloaded fine.
    Checking the file system for a filename with the ID referenced by the link in Sugar yields no such file. So I conclude attachments are not being saved.
    I need this fixed as I have two tech support reps coming on board and three external sales people who will be using the system very soon.
    If anyone can walk me through diagnosing and troubleshooting this problem, I would be very grateful.
    Thanks,

  2. #2
    sugarchris's Avatar
    sugarchris is offline Sugar Community Member
    Join Date
    Sep 2005
    Location
    San Francisco, CA
    Posts
    861

    Default Re: Attachments are not being saved to File System

    What are the permissions on:
    [sugardir]/cache/
    [sugardir]/cache/upload/

    Who owns them and who is Apache running as?

    How much free space is on the partition that your web documents sit on?

    Do you have a virus scanner such as ClamAV that sits in-line with your email server that may be deleting/quarantining attachments that have virii signatures?

    How big are the attachments that are going missing?

    What are the values in php.ini for the following:
    max_execution_time = 30 ; Maximum execution time of each script, in seconds
    max_input_time = 60 ; Maximum amount of time each script may spend parsing request data
    memory_limit = 38M ; Maximum amount of memory a script may consume (8MB)
    post_max_size = 8M
    upload_max_filesize = 18M

    Do you have Raw Source capture enabled? (admin->inbound email settings)

    If so, does mysql.conf have the necessary adjustments to handle large packet sizes?

    Start here, if you can answer all of these, you'll have found your problem.

  3. #3
    gkelemen is offline Member
    Join Date
    Oct 2006
    Posts
    7

    Default Re: Attachments are not being saved to File System

    Problem solved!

    Here's what I found out. The suggestion Chris made in his reply to my initial post all checked out okay.

    The problem occurs because we run two instances of SugarCRM, a production server and a backup (slower CPU). Due to a problem with PHP (error cited below), we were running the cron script on the backup. Apparently, this configuration allowed us to receive emails fine, but it was saving the attachments to the file system of the back up machine. I found this out when I compared directory listings (the backup had the file IDs I couldn't find on our production unit). I have moved the files in cache/upload to the production machine from the backup.
    When I turned off the cron script on the backup and manually checked emails (from the production site) I sent myself with attachments from another account, the files are being stored correctly on the production server's file system.

    The error we're getting with php when running the crontab script from the command line is as follows:
    Code:
    [sugardir]#  /usr/bin/php5 -f cron.php
    PHP Fatal error:  Allowed memory size of 8388608 bytes exhausted (tried to allocate 23040 bytes) in /srv/www/SugarCRM/modules/Schedulers/Scheduler.php on line 181
    On the production machine, this error was fixed by increasing the value of memory_limit to 64M from the default of 8M.

  4. #4
    sugarchris's Avatar
    sugarchris is offline Sugar Community Member
    Join Date
    Sep 2005
    Location
    San Francisco, CA
    Posts
    861

    Default Re: Attachments are not being saved to File System

    Good to hear that you've fixed your issue

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Replies: 52
    Last Post: 2012-03-22, 06:27 PM
  2. Big Security worries with Sugar!
    By mycrmspacegunnar in forum General Discussion
    Replies: 28
    Last Post: 2007-07-29, 05:27 AM
  3. Replies: 2
    Last Post: 2006-04-18, 02:47 PM
  4. Replies: 3
    Last Post: 2006-02-17, 05:12 PM
  5. PATCH: HTML Emails and Templates
    By funkypenguin in forum Downloads
    Replies: 2
    Last Post: 2005-05-31, 10:14 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •