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:
- During the file upload, the app will redirect back to the home page
- 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.