hi all !
I'm trying to print a ticket, but the page just comes blank, and in chrome I get the following error:

This page isn’t working osticket.<domain> is currently unable to handle this request.
HTTP ERROR 500

Apache reports the following error:

[Mon Jul 29 14:59:21 2019] [error] [client 192.168.98.3] PHP Warning: include(/tmp/ttfontdata/dejavusanscondensed.GDEFdata.php): failed to open stream: No such file or directory in /var/www/html/include/mpdf/vendor/mpdf/mpdf/src/Otl.php on line 135, referer: http://osticket.<domain>/scp/tickets.php?id=2865
[Mon Jul 29 14:59:21 2019] [error] [client 192.168.98.3] PHP Warning: include(): Failed opening '/tmp/ttfontdata/dejavusanscondensed.GDEFdata.php' for inclusion (include_path='./:/var/www/html/include/:/var/www/html/include/pear/') in /var/www/html/include/mpdf/vendor/mpdf/mpdf/src/Otl.php on line 135, referer: http://osticket.<domain>/scp/tickets.php?id=2865
[Mon Jul 29 14:59:21 2019] [error] [client 192.168.98.3] PHP Warning: file_get_contents(/tmp/ttfontdata/dejavusanscondensed.GSUBGPOStables.dat): failed to open stream: No such file or directory in /var/www/html/include/mpdf/vendor/mpdf/mpdf/src/Cache.php on line 68, referer: http://osticket.<domain>/scp/tickets.php?id=2865
[Mon Jul 29 14:59:21 2019] [error] [client 192.168.98.3] PHP Fatal error: Uncaught exception 'Mpdf\MpdfException' with message 'Can't open file /tmp/ttfontdata/dejavusanscondensed.GSUBGPOStables.dat' in /var/www/html/include/mpdf/vendor/mpdf/mpdf/src/Otl.php:330\nStack trace:\n#0 /var/www/html/include/mpdf/vendor/mpdf/mpdf/src/Mpdf.php(15066): Mpdf\Otl->applyOTL('Maquina da radi...', 255)\n#1 [internal function]: Mpdf\Mpdf->WriteHTML('<html>\n\n<head>\n...', 0, true, true)\n#2 /var/www/html/include/class.pdf.php(47): call_user_func_array(Array, Array)\n#3 /var/www/html/include/class.pdf.php(95): mPDFWithLocalImages->WriteHtml('<html>\n\n<head>\n...', 0, true, true)\n#4 /var/www/html/include/class.pdf.php(72): Ticket2PDF->_print()\n#5 /var/www/html/include/class.ticket.php(3119): Ticket2PDF->__construct(Object(Ticket), 'A4', NULL)\n#6 /var/www/html/scp/tickets.php(498): Ticket->pdfExport('A4', NULL)\n#7 {main}\n thrown in /var/www/html/include/mpdf/vendor/mpdf/mpdf/src/Otl.php on line 330, referer: http://osticket.<domain>/scp/tickets.php?id=2865

The files dejavusanscondensed.GSUBGPOStables.dat does not exists...

    2 months later

    Hi Kevin,
    i have the exact same problem. However, this problem has only started with the update to version 1.12. This feature has been working previously on the same server. Is there a difference between the implementation of this version of OS tickets to how it uses the directories ?
    I have multiple installation on the same server, other installation also use the root tmp directory and use it without a problem. what could cause this specific problem with this version ?

    @macsoluk

    Yes there is a complete difference with the print option as we upgraded mPDF. You'll just need to configure a tmp directory and everything will be fine.

    As you can see here, we use PHP's native method sys_get_temp_dir() to get the temp directory. If you do not have one or if it's not writable mPDF will fail and you will not get a PDF of the ticket. You can set a temp directory by following the steps here:

    I know it's plesk but the same principals apply; basically create a new tmp dir, make sure it's writable, update your sys_temp_dir setting in your php.ini file and then restart Apache/IIS (and PHP-FPM if it's running).

    Once you configure a temp directory you can do the following on command line to confirm:

    [user@hostname osTicket]$ php -a
    Interactive shell
    
    php > var_dump(sys_get_temp_dir());
    string(4) "/tmp"
    php > 

    Cheers.

      5 months later

      KevinTheJedi
      Sorry for revisiting this after while. I could not work this out so we kept working without it but now we require this feature more often than before hence i am trying to fix it again.
      I have tried to setup things as per your recommendation but i still do not seem to be able to fix this. I have tried to create the tmp folder in the root, as well as the subdomain root (support) but no luck. I always see the error 500.
      I am including a screen grab for you with 5 different piece on information to help you understand. I hope you can identify the issue.

      @macsoluk

      Well, ttfontdata/dejavusanscondensed.GSUBGPOStables.dat isn’t a file we ship with nor should be including. I would backup the site folder, move everything out, download the latest version of osTicket from our site, put only those files in the newly cleaned site folder, copy over your config file, restart the server, clear all cache and cookies, and retest.

      Cheers.

      10 days later

      Hi Kevin,
      I am confused now. where are you seeing ? "ttfontdata/dejavusanscondensed.GSUBGPOStable" ???
      also is it 100% possible to transfer existing data if i do a fresh file copy ?
      We cannot afford to lose any data as we use the system for support and it is in production.

      You posted it in your error.

      bvsantos [Mon Jul 29 14:59:21 2019] [error] [client 192.168.98.3] PHP Fatal error: Uncaught exception 'Mpdf\MpdfException' with message 'Can't open file /tmp/ttfontdata/dejavusanscondensed.GSUBGPOStables.dat' in /var/www/html/include/mpdf/vendor/mpdf/mpdf/src/Otl.php:330\nStack trace:\n#0

      17 days later

      @macsoluk This thread is for @bvsantos. @KevinTheJedi was speaking to them.

      If you are not experiencing the same things and seeing the same things as that user then perhaps you should consider following the posting guidelines and starting your own thread to get support tailored to your environment and issue.

      Please read before requesting assistance

      I will also say that every time I have seen people have a problem printing it has been a problem with their PHP accessing the tmp directory which @KevinTheJedi also suggested in this thread.

      @macsoluk

      You said you were having the "same exact issue" so I assumed that if you are having the same issue then you have the same error the OP posted above. If not then you should do as @ntozier suggested and create your own thread with pertinent information.

      Cheers.

      @KevinTheJedi @ntozier Gentlemen, my issue is indeed the same but i do seem to have permission on the tmp directory. AS included in my post i shared the images, you will notice that the directory exists as well as i have permissions to right to it. Which is now confusing me as why i cannot print. Need your expert opinion on this.

      @macsoluk

      First you can start by using a vanilla install to test with. If you are not having issues with vanilla install then you know something is wrong with your current instance's code. You will then need to clear all production files and replace with fresh v1.14.1 (don't forget to save your include/ost-config.php file so you can put it back after you put the new files in place).

      Cheers.

      @KevinTheJedi Ok Let me try a separate vanilla install on the same server and see if it work. I will need a few days to do this. I will come back to you with the results soon. thanks,

      24 days later

      Hi @KevinTheJedi @ntozier . I had some problems, trying to do a fresh install as per your recommendation. We are now discussing have a new server altogether.
      My questions is if we install a new server (new dedicated physical machine) Will it be possible to migrate the OStickets system without losing tickets and history ?
      If yes, can you point me to an article of the correct steps before we can do this. I cannot afford to lose data.
      I appreciate your help guys.

      Performing a database backup isn't really an osTicket question. It would be a MySQL or MariaDB question. There are lots of resources (both on the forums and on the internet in general) on how to perform a database backup. You would want to google it for your specific Database software. Since you appear to be running Linux you can probably just use the mysqldump command to make a back up.

      This command at the command line would do it for you:
      mysqldump ost_database_name -uyouruser -pyourpassword --single-transaction --quick --lock-tables=false > /tmp/osticket-backup-$(date +%F).sql

      You would have course have to change the following:
      ost_database_name to the name of your osticket database.
      yourdbuser to the username of the database user.
      yourpassword to the password of the database user.

      also note that it will put the back up in your /tmp directory.
      You can change the path or move it some place more appropriate.

      You should also make sure that you at least back up the /include/ost-config.php file which has the database server, dbname, dbuser, and dbuser pass, and salt in it.

      4 days later

      @ntozier I have worked with DBs a fair bit.
      So are you saying that the process is to copy database and then copy all files?
      I was thinking more of doing a fresh install of OS tickets and import data into it. This is so that i don't copy any inherent problems over. Plus i will have a newer version of mysql as well as php on the new server. Will that pose a problem ?

      The database structure is different between versions so you would likely encounter issues trying to import a 1.12.x database into a 1.14.1 database structure. If you're good with dbs then you can get around them, but it will likely be time consuming.

      You can just move the database, and install the 1.14.1 core files, copy the /include/ost-config.php file and then run the upgrader [which is what i do when i move sites / clone sites for testing]. I tell people to make sure that they back up both prior to doing things in case they need to restore for any reason.

      a year later

      Hi @ntozier. I have now used akeeba kickstart and Akeeba solo to migrate the OS Ticket to a new server.
      Although the process seems to have worked, I cannot access the page.
      I am seeing an error.: "Fatal Error: Contact system administrator."
      I have checked the following.

      1. The system is unable to connect to the database. (yes because i used kickstart and it was able to copy the database)

      2. The system is unable to load the config info from the database.(How do i check this, the file does not seem to have any details about database credentials)

      3. PHP short open tags are disabled. ( I have now enabled it)
        Please advise.

        Generally a

        macsoluk "Fatal Error: Contact system administrator."

        means that it could not connect to the database. Did you migrate the database over?

        Did you create a db user / password, and grant it permissions to the migrated database?

        Did you change the username, password, or database name? If so did ytou update your ost-config.php with the new details?