Unable to write to destination /tmp
Hi all,
Im just reaching out here as i seem to have exhausted all other avenues.
We have installed the wkhtmltopdf package on our cPanel server to generate PDF's on the fly, all was working perfectly on our old server but a fault on that meant we had to move. Since the migration we have been getting the following when a PDF is trying to be generated:
If i ssh in as root and try and generate the PDF via command line it works fine, generating the file and passing all tests. If i login as a standard cPanel user via shell and try it im getting the same "Error: Unable to write to destination" Any help would be greatly appreciated!
PHP Fatal error: Uncaught exception 'Exception' with message 'Could not create PDF: Could not run command /usr/local/bin/wkhtmltopdf --margin-top '0' --margin-right '5' --margin-bottom '0' --margin-left '5' --image-quality '100' --viewport-size '1280x1024' 'http://www.domainname.com/vehicle/single-vehicle-pdf.php?id=242' '/tmp/tmp_wkhtmlto_pdf_2yhUV3.pdf'If i ssh in as root and try and generate the PDF via command line it works fine, generating the file and passing all tests. If i login as a standard cPanel user via shell and try it im getting the same "Error: Unable to write to destination" Any help would be greatly appreciated!
-
Hello :), What is the permission of your /tmp directory ? Please setup 1777 permission to your /tmp directory OR change your output path in your wkhtmltopdf comamnd. 0 -
Hello :) Could you also verify if you are using CageFS with Cloud Linux? Thank you. 0
Please sign in to leave a comment.
Comments
2 comments