No announcement yet.

Database error uploading a zip file

  • Filter
  • Time
  • Show
Clear All
new posts

  • Database error uploading a zip file

    I have the zip attachment max size set to about 28mb. I have updated all counters.

    I'm getting this error trying to upload a 2mb zip file:

    Invalid SQL:
    INSERT INTO attachment
    (dateline, thumbnail_dateline, visible, userid, extension, filename, posthash, filehash, filesize, filedata)

    Any idea what the problem may be? I need to get these files uploaded for a customer!!!!!

  • #2
    In addition to the vB settings, the allowed size of the attachments depends on the PHP and MySQL configuration. You may need to check and change the upload size for both PHP and for MySQL. Note, you'll need to have root access to the server to do this (or have your host do it.) Make these changes to php.ini:

    upload_max_filesize = xM

    ..and my.cnf (or my.ini for Windows systems)


    Change it to the size ('x') you want in Megabytes. Restart the webserver and MySQL after making these changes.

    Note: Do NOT use MB, just M for the megabytes setting.

    You may also need to increase the memory_limit, max_execution_time and max_input_time variables in php.ini.

    Also you might want to take a look at this for other settings that affect file uploads:
    Steve Machol, former vBulletin Customer Support Manager (and NOT retired!)
    Change CKEditor Colors to Match Style (for 4.1.4 and above)

    Steve Machol Photography

    Mankind is the only creature smart enough to know its own history, and dumb enough to ignore it.


    • #3
      Thanks Steve, I'll have a look at it.

      Here's the info from the control panel home page: (I also have a 9mb file I need to upload)

      Server Type
      Web Server Apache v1.3.37
      Index Usage 1.65 MB
      PHP 4.4.7
      Attachment Usage 85.91 MB
      PHP Max Post Size 55.00 MB
      PHP Maximum Upload Size 5.00 MB
      PHP Memory Limit None
      MySQL Version 4.0.25-standard
      MySQL Packet Size 1.00 MB