MySQL Error Attaching a Particular File

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Wally Hartshorn
    Member
    • Feb 2001
    • 54
    • 2.2.6

    MySQL Error Attaching a Particular File

    One of our users has been attempting to attach a PowerPoint file to a message. (I have enabled "ppt" as a valid file extension for attachments.) When he does so, the browser is filled with random characters and the following e-mail is sent to me:
    Database error in vBulletin: Invalid SQL: INSERT INTO attachment (attachmentid,userid,dateline,filename,filedata,visible) VALUES (NULL,1,990565152,'aces des plains presentation2.ppt','ÐÏࡱá\0\0\0\0\0\0\0\0\0\0\.....
    I've tried renaming the files to remove the spaces in the filename. I've also tried changing the file extension to ".doc", but I get the same result.

    The file is 1.50MB in size. I have set an upload limit of 2MB. (Specifically, 2000000.)

    I attempted to attach a PowerPoint file that was just over 2MB and got the expected "this file is too big" error message. I attempted to attach a PowerPoint file that was 700KB and it accepted it without problems. Both files has spaces in the filenames.

    Our environment
    vBulletin version: 2.0.0
    URL: forums.intranet.epa.state.il.us (behind a firewall)
    PHP version: 4.0.4pl1
    MySQL version: 3.23.32
    Apache/webserver version: 1.3.19
    Server operating system: Solaris 2.7

    Any ideas?
  • Mike Sullivan
    Former vBulletin Developer
    • Apr 2000
    • 13327
    • 3.6.x

    #2
    We need the end of the error message to do any troubleshooting.

    Comment

    • Wally Hartshorn
      Member
      • Feb 2001
      • 54
      • 2.2.6

      #3
      Sorry, I didn't realize there was any more to the e-mail following the 1.5MB of binary from the PPT file itself. (Our e-mail program is braindead and truncates things.)

      I eventually managed to read the end of the error message, which says:
      mysql error: MySQL server has gone away
      mysql error number: 2006
      Date: Tuesday 22nd of May 2001 03:59:12 PM
      Script: /forums/newthread.php
      Referer: http://forums.intranet.epa.state.il....ead&forumid=12
      Looking in /usr/local/mysql/data/spider.err, I saw this:

      010522 16:03:02 Aborted connection 2577 to db: 'vbforums' user: 'root' host: 'spider.admop.epa.state.il.us' (Got a packet bigger than 'max_allowed_packet')
      Is that related to this, or just a coincidence? Does it have anything to do with the size of the file?

      Thanks!

      Comment

      • Chris Schreiber
        Senior Member
        • Jun 2000
        • 4113
        • 4.0.x

        #4
        There's a MySQL server parameter called 'max_allowed_packet', which is probably set to 1MB... this is limiting the size of uploaded files. You need to increase this to 2MB to be able to attach a file of that size.

        Comment

        widgetinstance 262 (Related Topics) skipped due to lack of content & hide_module_if_empty option.
        Working...