View Issue Details

IDProjectCategoryView StatusLast Update
0005193mantisbtbugtrackerpublic2008-07-24 16:51
ReporterMatt_wc Assigned Togiallu  
PrioritynormalSeveritymajorReproducibilityalways
Status closedResolutionduplicate 
Product Version0.19.2 
Summary0005193: Attaching a ZIP file causes an application error.
Description

When trying to attach zip files, I get an application error (see screen shot).

All other file types (and sizes) work fine.

I have tried to name the zip file different things, and upload different zip files. All of which produce the error.

Renaming the extention - Giving the file a different ext (i.e. XYZ.zip > XYZ._zip ) doesn't fix the problem.

TagsNo tags attached.

Relationships

duplicate of 0008867 closedryandesign APPLICATION ERROR 0000401 while uploading files into MySQL 
related to 0005369 closedthraxisp application error #15 with uploading bmp file bigger than 1mb 

Activities

Matt_wc

Matt_wc

2005-02-01 22:19

reporter   ~0009169

I have a screen shot (PNG file) but get an error here (bugs.mantisbt.org) when trying to upload the file. Please advise.

thraxisp

thraxisp

2005-02-02 07:56

reporter   ~0009171

Could you add the text of the errors to the report?

Matt_wc

Matt_wc

2005-02-02 21:03

reporter   ~0009175

Last edited: 2005-02-02 21:06

I'll do one better. I posted a screen shot of the error:
http://www.mattmueller.com/Attach_Problem_Screenshot.PNG

I am running:

  • Windows 2000 Server
  • PHP Version 4.3.6
  • Apache/2.0.49 (Win32) PHP Apache API Version 20020903
  • MySql Client API version 3.23.49

I used apache2triad to load up all the goodies.

My config_inc.php file includes:
$g_show_detailed_errors = ON;


My php.ini file includes:


;;;;;;;;;;;;;;;;;;;
; Resource Limits ;
;;;;;;;;;;;;;;;;;;;
max_execution_time = 30
;Maximum execution time of each script, in seconds
max_input_time = 60
;Maximum amount of time each script may spend parsing request data
memory_limit = 8M
;Maximum amount of memory a script may consume (8MB)

;;;;;;;;;;;;;;;;;
; Data Handling ;
;;;;;;;;;;;;;;;;;
; Maximum size of POST data that PHP will accept.
post_max_size = 8M
; This directive is deprecated. Use variables_order instead.
gpc_order = "GPC"


The MySql config file (my.ini) file includes:


[mysqldump]
quick
set-variable = max_allowed_packet=16M

[isamchk]
set-variable = key_buffer=8M
set-variable = sort_buffer=8M

[myisamchk]
set-variable = key_buffer=8M
set-variable = sort_buffer=8M

[mysqlhotcopy]
interactive-timeout

The MySQL server

[mysqld]
default-character-set=latin1
set-variable = key_buffer=16M
set-variable = max_allowed_packet=1M
set-variable = thread_stack=128K
set-variable = flush_time=1800


Not sure if all this extra info will help - but thought it couldn't hurt much either.

Matt_wc

Matt_wc

2005-02-02 21:04

reporter   ~0009176

The link messed up in the post, be sure to go directly to the file as it is not linked from anywhere.

thraxisp

thraxisp

2005-02-03 09:23

reporter   ~0009184

I got the screen shot, but the error message is off to the right (centered on the screen).

Matt_wc

Matt_wc

2005-02-03 19:57

reporter   ~0009194

Last edited: 2005-02-03 20:03

Ah, sorry about that.

The error reads:

Database query failed. Error received from database was 0002006: MySQL server has gone away for the query: INSERT INTO mantis_bug_file_table
(bug_id, title, description, diskfile, filename, folder, filesize, file_type, date_added, content)
VALUES

With the data you see on the screen shot following the 'VALUES'

Found this help page,

http://dev.mysql.com/doc/mysql/en/gone-away.html

but I am not sure that setting wait_timeout variable will address this, as other attachments work.

Here are a few that caught my eye under the ' Some other common reasons for the MySQL server has gone away error':


  • You tried to run a query after closing the connection to the server. This indicates a logic error in the application that should be corrected.

  • You got a timeout from the TCP/IP connection on the client side. This may happens if you have been using the commands: mysql_options(..., MYSQL_OPT_READ_TIMEOUT,...) or mysql_options(..., MYSQL_OPT_WRITE_TIMEOUT,...). In this case increasing the timeout may help solve the problem.

  • You have encountered a timeout on the server side and the automatic reconnection in the client is disabled (the reconnect flag in the MYSQL structure is equal to 0).

  • You are using a windows client and the server had dropped the connection (probably because wait_timeout expired) before the command was issued.

    The problem on windows is that in some cases MySQL doesn't get an error from the OS when writing to the TCP/IP connection to the server, but instead gets the error when trying to read the answer from connection.

    In this case, even if the reconnect flag in the MYSQL structure is equal to 1, MySQL will not automatically reconnect and re-issue the query as it doesn't know if the server did get the original query or not.

    The solution to this is to either do a mysql_ping on the connection if there has been a long time since the last query (this is what MyODBC does) or set wait_timeout on the mysqld server so high that it will in practice never time out.

  • You can also get these errors if you send a query to the server that is incorrect or too large. If mysqld receives a packet that is too large or out of order, it assumes that something has gone wrong with the client and closes the connection. If you need big queries (for example, if you are working with big BLOB columns), you can increase the query limit by setting the server's max_allowed_packet variable, which has a default value of 1MB. You may also need to increase the maximum packet size on the client end. More information on setting the packet size is given in Section A.2.9, “Packet too large”.

thraxisp

thraxisp

2005-02-04 11:28

reporter   ~0009214

How big is the .zip file?

Matt_wc

Matt_wc

2005-02-04 23:14

reporter   ~0009216

Last edited: 2005-02-05 11:34

1.1 Meg. What's weird, I can attach all other kinds of files. Word Docs, data files, text files, etc... there are some up to 3-4 meg...

I tried to upload a very small zip file (ziped up a <1k txt file) but that failed as well - same error.

I'll keep digging as well - see what I come up with.

Matt_wc

Matt_wc

2005-02-07 00:18

reporter   ~0009227

Changed the settings in my.ini:

set-variable = max_allowed_packet=1M

to

set-variable = max_allowed_packet=2M

and now it works...

Will do more testing to see what's going on...

giallu

giallu

2008-02-18 18:21

reporter   ~0017102

I think this is a duplicate of 0008867

Feel free to reopen if that is not the case.