Hi,
I am trying to Print the ticket, which has Image inserted in the ticket. But it throw error 500 error. When I debug the error log following error showing,

[17-Aug-2023 13:37:10 UTC] PHP Fatal error: Uncaught Error: Class "Aws\S3\S3Client" not found in phar://C:/osticket/upload/include/plugins/storage-s3.phar/storage.php:45
Stack trace:
#0 C:\osticket\upload\include\class.file.php(777): S3StorageBackend->construct(Object(AttachmentFile))
#1 C:\osticket\upload\include\class.file.php(130): FileStorageBackend::getInstance(Object(AttachmentFile))
#2 C:\osticket\upload\include\class.file.php(134): AttachmentFile->open()
#3 C:\osticket\upload\include\class.file.php(152): AttachmentFile->sendData(false)
#4 C:\osticket\upload\include\class.pdf.php(45): AttachmentFile->getData()
#5 [internal function]: mPDFWithLocalImages->{closure}(Array)
#6 C:\osticket\upload\include\class.pdf.php(40): preg_replace_callback('/"cidšŸ™[\w.-]{3...', Object(Closure), '<html>\n\n<head>\n...')
#7 C:\osticket\upload\include\class.pdf.php(101): mPDFWithLocalImages->WriteHtml('<html>\n\n<head>\n...', 0, true, true)
#8 C:\osticket\upload\include\class.pdf.php(78): Ticket2PDF->_print()
#9 C:\osticket\upload\include\class.ticket.php(3713): Ticket2PDF->
construct(Object(Ticket), 'Letter', '1', '1')
#10 C:\osticket\upload\scp\tickets.php(534): Ticket->pdfExport('Letter', '1', '1')
#11 {main}
thrown in phar://C:/osticket/upload/include/plugins/storage-s3.phar/storage.php on line 45

How can I solve this? Any know the solution.

Thanks,
Sundar

  • KevinTheJedi replied to this.
  • @KevinTheJedi Thanks for the reply, Issue solved.
    After done following changes in C:\xampp\htdocs\osTicket\upload\include\class.pdf.php, now the Print ticket working fine,

    Thanks,

    sundarpandi70

    This image is stored in S3 but saying the S3 class canā€™t be found. Do you still have this plugin installed/enabled/configured?

    Cheers.

      sundarpandi70

      Maybe try downloading the latest version of the plugin and re-installing it? It seems the phar is either corrupt or has permission issues or something as it canā€™t find the class that should exist.

      Cheers.

        KevinTheJedi After the Latest 'Attachment S3' Plugin download and Installed, still am getting the same error and cant able to print the ticket. How can I solve the issue.

        Is there any S3 Bucket permission issue?

          sundarpandi70

          No this is a PHP/server issue (ie. Class not found). The class is included in the plugin files so there is no reason for it not to work. Do you see any other errors? Are you using a shared host?

          Cheers.

          Maybe it's because I am using an older version, but that info page looks like it has some customization on it. Are there any mods, UI or otherwise installed?

            Daedalus01 You are correct, they have a 3rd party theme installed.

            sundarpandi70 You will need to remove any mods/customizations/etc. and retest. We can't assist with modified installs.

            Cheers.

            @KevinTheJedi Thanks for the reply, Issue solved.
            After done following changes in C:\xampp\htdocs\osTicket\upload\include\class.pdf.php, now the Print ticket working fine,

            Thanks,

            Write a Reply...