HOWTO: Get around file upload size limit issues

bsoremsugar —  April 27, 2011 — 16 Comments

I saw this post on the forums last week, where the poster was struggling with his file uploads failing in Sugar. I’ve seen this quite a bit before, especially in local testing of upgrades, and it usually will manifest itself in one of two ways:

  1. During the file upload, the app will redirect back to the home page
  2. You’ll see an error message like ‘ERROR: uploaded file was too big: max filesize: 3000000′ in the page.

To solve this, you’ll need to increase the file upload limit in both PHP and Sugar. For the PHP side, this is adjusted in the upload_max_filesize and post_max_size directives, which you can define in the php.ini file like so ( adjusting the 100M value to be whatever you want the max to be ):

upload_max_filesize = 100M
post_max_size = 100M

 

If you are on a shared host and cannot access the php.ini file, or want to make this setting specific only to your SugarCRM instance, you can also put this setting in the .htaccess file in the root of the SugarCRM install if you are using Apache like so ( again adjusting the 100M value to be whatever you want the max to be ):

php_value upload_max_filesize 100M
php_value post_max_size 100M

 

Next, you will also need to adjust the $sugar_config[‘upload_maxsize’] to be the same size as the above settings in your config.php file as well. After this, you should be able to upload larger files into Sugar successfully.

16 responses to HOWTO: Get around file upload size limit issues

  1. 

    Am I correct in assuming that the equivalent value for ¬†$sugar_config[‘upload_maxsize’] is 100000000

  2. 
    Stewart Osborne July 29, 2012 at 5:17 am

    it should be noted on iis7 you would also have to add this to your web.config file

    By default it has a 30m default transfer size.

  3. 

    Im on a shared server and I get Internal Server Error after affecting the changes as suggested

  4. 
    Douglas Kelly March 2, 2013 at 2:41 pm

    I’ve done all of these things, but on Apache, so no IIS. I still can’t get an upgrade to upload. Also, I changed the settings to 40MB (40000000) in all 3 places. I had the host’s Cust Supt look in to it as well. I’ve made the changes in the software app, sugar_config and php.ini. All upgrades are less than 21MB, so 40 should suffice. Does anyone have any more insights? I’m seriously considering using a whole different package after all this.

    • 

      K – errored on 60M so I bumped up to 100M on all three. Still errors. Can anyone tell me if the 100,000,000 should be something like 102,400,00 instead, inside Sugar’s Settings?

      I can’t believe how frustrating this upgrade is. Why is it that this is the only OS server software package I use that is this difficult to upgrade? If it’s to make me want to spend money with Sugar, I can tell you I feel the opposite. I have, in the past, referred customers to use SugarCRM, but right now, I don’t feel any love towards the product. With the amount of time I’ve spent upgrading, I could have installed someone else’s package and blundered through it’s use and been more productive. I will consider removing this rant and doing up a blog post with some positivity if this ever gets worked out. Seriously, My server’s Customer Support individuals, that are good at debugging, have looked into this (based on documentation found online) and have said to post here – because they can’t figure it out.

      Is this thing on?

      • 
        Douglas Kelly March 4, 2013 at 2:27 pm

        I went back and checked phpinfo and the changes to php.ini never took. The file was updated. I restarted web service – but should have restarted apache and then tried rebooting the server. Definitely go with the 100M option, and look at updating your .htaccess file on the root of your domain.

Trackbacks and Pingbacks:

  1. Assigned To field not working in Sugar 6.2 - SugarCRM Forums - August 31, 2011

    […] […]

  2. Problems upgrading from 6.1.1 to 6.2 - May 7, 2012

    […] […]

  3. cannot upload the language pack file into sugarcrm 6.5.0 - June 22, 2012

    […] […]

  4. Can't upload file! upload_max_filesize? - August 2, 2012

    […] […]

  5. Confused very confused - September 17, 2012

    […] […]

  6. upgrading from 6.5.0 RC1 version to 6.5.5 - September 20, 2012

    […] […]

  7. Upgrade SugarCRM CE from 6.5.0 (Build 8338) to 6.5.5 - September 28, 2012

    […] […]

  8. urgent question - December 7, 2012

    […] […]

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s