Bug #37597 "An error occurred while trying to process the uploaded file"
Submitted: 23 Jun 2008 21:15 Modified: 29 Sep 2008 18:55
Reporter: Marcos Hack Email Updates:
Status: No Feedback Impact on me:
None 
Category:Eventum Severity:S2 (Serious)
Version:2.1.1 OS:Linux (CentOS release 5 (Final))
Assigned to: Assigned Account CPU Architecture:Any
Tags: file upload unknown error

[23 Jun 2008 21:15] Marcos Hack
Description:
For some files (generally bigger than 1 MB) I receive the message

  "An error occurred while trying to process the uploaded file"

during file upload. I added some debug info into include/class.attachment.php file and got the following informations:

  res->getCode(): -1
  res->getMessage(): DB Error: unknown error
  res->getMode(): 1
  res->getType(): DB_Error

I tried to increase the PHP post_max_size parameter but the error remains. I checked Eventum and Apache log file but there are no error messages.

How may I get more information about this error?

Thank you,
Marcos Hack.

How to repeat:
Well, I don't known how to reproduce this problem outside my environment, I can send one of the problematic file to you.
[23 Jun 2008 21:22] Marcos Hack
I uploaded a case of file that causes the upload problem in my environment. Please take a look in file "bug-data-37597.zip" in ftp.mysql.com.
[23 Jun 2008 22:33] Marcos Hack
I got the native error code 1153 using DB::errorNative(), something as "Got a packet bigger than 'max_allowed_packet' bytes".

I changed the value of max_allowed_packet=64MB in my.cnf and the problem was solved, but I don't known if it will work for any file up to 200MB, that is the 'upload_max_filesize' configured in php.ini.
[30 Jul 2008 6:41] Bryan Alsdorf
If you are getting a DB error it isn't a problem with apache. I would try to var_dump($res); and get the complete error message.
[30 Jul 2008 15:24] Marcos Hack
Hi Bryan,

I already tried to get the vardump() but it only informed an "unknown error", nothing really useful. As I said in my last post I got the MySQL native error code 1153 related max_allowed_packet MySQL parameter.

Isn't it a problem related to the "SQL transaction size" when uploading files in Eventum? Would it not be a requirement to increase the value of max_allowed_packet MySQL parameter?
[29 Aug 2008 18:55] Bryan Alsdorf
Yes, you might need to adjust that both globally in MySQL and in your specific connection. However, I believe that some PHP builds are unable to set it to over 16MB
[29 Sep 2008 23:00] Bugs System
No feedback was provided for this bug for over a month, so it is
being suspended automatically. If you are able to provide the
information that was originally requested, please do so and change
the status of the bug back to "Open".