Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

In this Discussion

osTicket v1.10 (stable) and Maintenance Release v1.9.15 are now available! Go get it now

DB Error #1062

Everyday I receive mails with this error. Whole message in attachment.
As I understand this happens when users trying to attache something.
However, no one complains about attachments in servicedesk....

[INSERT INTO `ost_attachment` SET `file_id` = 1733, `type` = 'D', `object_id` = 8222, `name` = 'screenshot-BdLc']

Duplicate entry '8222-1733-D' for key 'file-type'<br /> <br />


    edited November 2016

  • Sorry, forgot to describe configuration on host provider:

    Updated from 1.9.14 to 1.10

    PHP 5.5.38

  • I have exactly the same issue.  I searched forum and tried the following command to resolve this issue:
    /usr/bin/php <path to osticket>/setup/cli/manage.php file migrate -b D -m F

    The reason is: osTicket still saves attachments in database even though the plugin or configuration suggests filesystem is the selection.  Therefore, we have to manually migrate the file to filesystem.

    At last, I created a cron job to do this daily:
    0 0 * * * /usr/bin/php <path to osticket>/setup/cli/manage.php file migrate -b D -m F

    This cron job is a root cron job, somehow it doesn't work with an apache user job.

    Hope this helps.
Sign In or Register to comment.