Unable to upload files larger than 1MB

Get help from other users here.

Moderators: Developer, Contributor

Post Reply
sheel331
Posts: 20
Joined: 14 Apr 2008, 20:39

Unable to upload files larger than 1MB

Post by sheel331 »

Hello,

I seem to be having an issue where I am receiving an "application error 401" when I attempt to upload any file type larger than approximately 800KB. I have been able to upload files successfully of smaller sizes, but once I try to upload a larger file, the system proceeds as if it will successfully upload, but then gives me the "application error 401" error message.

My PHP.ini does allow for file_uploads:
; Whether to allow HTTP file uploads.
file_uploads = On

; Temporary directory for HTTP uploaded files (will use system default if not
; specified).
;upload_tmp_dir =

; Maximum allowed size for uploaded files.
upload_max_filesize = 2M

Also, the config_defaults_inc.php shows that it should allow me to upload files of larger size successfully, however I'm not able to:
/**
* --- file upload settings --------
* This is the master setting to disable *all* file uploading functionality
*
* If you want to allow file uploads, you must also make sure that they are
* enabled in php. You may need to add 'file_uploads = TRUE' to your php.ini
*
* See also: $g_upload_project_file_threshold, $g_upload_bug_file_threshold,
* $g_allow_reporter_upload
* @global int $g_allow_file_upload
*/
$g_allow_file_upload = ON;

/**
* Upload destination: specify actual location in project settings
* DISK, DATABASE, or FTP.
* @global int $g_file_upload_method
*/
$g_file_upload_method = DATABASE;

/**
* When using FTP or DISK for storing uploaded files, this setting control
* the access permissions they will have on the web server: with the default
* value (0400) files will be read-only, and accessible only by the user
* running the apache process (probably "apache" in Linux and "Administrator"
* in Windows).
* For more details on unix style permissions:
* http://www.perlfect.com/articles/chmod.shtml
* @global int $g_attachments_file_permissions
*/
$g_attachments_file_permissions = 0400;

/**
* FTP settings, used if $g_file_upload_method = FTP
* @global string $g_file_upload_ftp_server
*/
$g_file_upload_ftp_server = 'ftp.myserver.com';

/**
*
* @global string $g_file_upload_ftp_user
*/
$g_file_upload_ftp_user = 'readwriteuser';

/**
*
* @global string $g_file_upload_ftp_pass
*/
$g_file_upload_ftp_pass = 'readwritepass';

/**
* Maximum file size that can be uploaded
* Also check your PHP settings (default is usually 2MBs)
* @global int $g_max_file_size
*/
$g_max_file_size = 5000000;

/**
* Files that are allowed or not allowed. Separate items by commas.
* eg. 'php,html,java,exe,pl'
* if $g_allowed_files is filled in NO other file types will be allowed.
* $g_disallowed_files takes precedence over $g_allowed_files
* @global string $g_allowed_files
*/
$g_allowed_files = '';

/**
*
* @global string $g_disallowed_files
*/
$g_disallowed_files = '';

/**
* prefix to be used for the file system names of files uploaded to projects.
* Eg: doc-001-myprojdoc.zip
* @global string $g_document_files_prefix
*/
$g_document_files_prefix = 'doc';

/**
* absolute path to the default upload folder. Requires trailing / or \
* @global string $g_absolute_path_default_upload_folder
*/
$g_absolute_path_default_upload_folder = '';
sheel331
Posts: 20
Joined: 14 Apr 2008, 20:39

Re: Unable to upload files larger than 1MB

Post by sheel331 »

Hi everyone,

I did a little additional research on this issue and found out this was actually a mySQL issue, rather than a bugbase issue. The issue was caused by the max_allowed_packet global variable in mysql that was only set to 1MB. I changed it to 16MB and was able to upload successfully.

Thanks!
Sheel
Post Reply