Skip to content
Snippets Groups Projects
  1. Sep 07, 2012
    • Jared Hancock's avatar
      Fix truncating of attachments on upload · c7ba35a9
      Jared Hancock authored
      MySQL is kind enough to quietly truncate the filedata field when attempting
      to CONCAT data beyond the size of max_allowed_packet. The simplest fix is to
      automatically adjust the max_allowed_packet to the size of the file being
      uploaded plus some extra. See MySQL bugs #22853, #34782, and #63919 for more
      discussion on the issue.
      
      The max_allowed_packet variable default to 1M, but is expandable to 1G.
      Therefore, the fixed limit of attachments for osTicket will be 1G, since it
      would be impossible for MySQL to append data after that mark. *Sigh*
      c7ba35a9
  2. Sep 05, 2012
    • Jared Hancock's avatar
      Fetch file data in chunks for downloads · f21e5c01
      Jared Hancock authored
      MySQL has a limit on the maximum amount that can be transferred in one
      statement. It's the max_allowed_packet setting. The value of this setting
      will be the approximate upper limit of attachments that can be handled by
      the database given the current access model for osTicket.
      
      The issue came up for attachment uploads and was corrected, so that uploads
      are chunk inserted into the database. Downloads, however, were forgotten.
      Strangely, it took quite a bit of debugging to track down the problem.
      
      This patch corrects attachment downloads by fetching 256kB chunks of the
      attachment at a time and sending them directly to the client. This will also
      overcome PHP's memory limit which would be the second-level blocker of
      attachment sizes. Lastly, the AttachmentFile::getData() method is simulated
      using output buffering. This will provide the same access as the previous
      getData() method; however, it is still subject ot PHP's memory limits.
      f21e5c01
  3. Aug 16, 2012
  4. Aug 13, 2012
  5. Aug 12, 2012
  6. Aug 11, 2012
  7. Aug 10, 2012
  8. Aug 09, 2012
  9. Aug 08, 2012
  10. Aug 02, 2012
Loading