Mantis file upload problem

By default mantis ( or used to) save files in database (MySQL here).

One fellow here tried to upload a 2MB PDF file and got an “APPLICATION ERROR #401“.

Googling for the problem it was suggested to check for $g_max_file_size in Mantis configuration  upload_max_filesize in php.ini, both configurations  were set to 10MB ( by default mantis is 5 MB).

The real culprit was MySQL configuration  max_allowed_packet, in my server this option max_allowed_packet as 1 MB.

To set this variable to 10MB without stopping the server, log into MySQL with proper root permissions and follow as:

SET GLOBAL max_allowed_packet=10485760;


where 10485760 is 1024*1024*10


  1. Leave a comment

Leave a Reply

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

You are commenting using your 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

%d bloggers like this: