twbsd.org
 
  Select Language: Home  SmbFTPD Forum 
Bug Tracker
Forum -> Bug Tracker
Can not upload file (The file size is about 900k)
Morris Chen -
Hi Mr. Wang,
I got a problem for file uploading. The erroe message is shown below,

2006: MySQL server has gone away

ADOConnection._Execute(insert into document_table(document_id, subject, created_by,
        last_update, description, filename, filedata, group_class, allow_..., false) % line  854, file: adodb.inc.php
ADOConnection.Execute(insert into document_table(document_id, subject, created_by,
        last_update, description, filename, filedata, group_class, allow_...) % line   96, file: document_donew.php

MySQL server has gone away

Could you please give some hits to me for resolving this issue? Thanks a lot.

Morris
Alex -
I am not sure about this error.

Please refer to http://dev.mysql.com/doc/refman/5.1/en/gone-away.html

I guess you would have to enlarge the "max_allowed_packet" of MySQL
Ken Tseng -
When i got the error for file uploading in feedback_site

2006: MySQL server has gone away

i try to modify setting

-------------------------------------------------

(1) php.ini
upload_max_filesize = 4M


(2) my.ini   (MySQL)
[mysqld]

# The TCP/IP Port the MySQL Server will listen on
port=3306

# The max packet the MySQL Server will allowed
max_allowed_packet = 4M

-------------------------------------------------

summary i guest Alex is right,

"max_allowed_packet" need equal value at "upload_max_filesize"
Ken Tseng -
last you can type command in MySQL

show variables like 'max_allowed_packet';

then you can got the setting like this

mysql> show variables like 'max_allowed_packet';
+--------------------+---------+
| Variable_name      | Value   |
+--------------------+---------+
| max_allowed_packet | 4194304 |
+--------------------+---------+
1 row in set (0.00 sec)

Copyright © 2002-2024 Alex Wang from www.twbsd.org. All rights reserved.