开发者

PHP / MySQL: Cannot submit a 2,5MB-File to the DB

开发者 https://www.devze.com 2023-02-03 21:53 出处:网络
I\'m trying to upload a File into my MySQL-DB. The blob-field is declared as longblob (->4GB size). If I upload a file with 200KB, it gets correctly saved, but if I upload 2MB, there is no error (MAX_

I'm trying to upload a File into my MySQL-DB. The blob-field is declared as longblob (->4GB size). If I upload a file with 200KB, it gets correctly saved, but if I upload 2MB, there is no error (MAX_FILE_SIZE is more than 20MB), but the INSERT statement开发者_开发百科 does not create any Record.

I cannot execute the statement manually because the binary code of the file is too big.

Is there any limit of file upload by the HTTP Server (or PHP's $_FILES-var?)

Thx for help


Check the setting of max_allowe_packet MySQL server variable. If it's too small, and your host won't increase it for you, you will need to split your fle into smaller parts and upload them part by part apending new packets to already uploaded ones.

See also: http://dev.mysql.com/doc/refman/5.5/en/packet-too-large.html


Yes, there is a limit with your PHP server of the maximum file size allowed to upload.

You could try using a software like MySQL Workbench and edit the database directly from your computer.

0

精彩评论

暂无评论...
验证码 换一张
取 消