The permissions on (root)/tef_artifacts is 755.
Recall: I can successfully upload an attachment to a ticket, and successfully fetch (download) an attachment on a ticket... but I can't print a ticket with attachments.
Print Ticket doesn't work for Agents, no errors
And what are the permissions and ownership of your PHP temp dir?
Also take a look at this post.
https://forum.osticket.com/d/93500-printing-tickets-does-not-work-in-1-11-stable/21
- Edited
From above:
Ours is 755, owner = redactedUserName:redactedUserName
Regarding this other support ticket... we don't see any errors anywhere (see my OP).
I created the temp.php file that will echo the location of the system temp directory.
The output is correct:
[redactedUserName public_html]$ php tjtest.php
/tmp
We successfully upgraded our implementation to 1.15.4 today, without a change in behavior for printing tickets that contain attachments.
We still don't have a resolution for this.
After upgrading and 2 more months of experimenting, we can't find a consistent reason why some tickets aren't printing.
Do we have any more options or troubleshooting procedures?
Thanks in advance.
Your initial issue is that one of the attachments doesn't exist (as you mentioned) so when you go to print with attachments it goes to grab the file and fatally fails as it’s not found. Why doesn’t it exist? That’s unknown at this point. It could be permission/ownership issues, it can be /tmp dir issues, it could have been deleted on the server, it can be all sorts of things. If the majority of attachments are being saved to the file system successfully then you really need to investigate on the server end of things to see why certain files don’t exist when others do. Are there intermittent issues happening that is causing this? Is there something cleaning the disk and removing files unintentionally? There are just so many possibilities.
I would say if you have a current example of this then check a recent backup of your server (or whatever drive that has the attachments) to see if it ever existed and vanished at some point or never existed at all. This can help you narrow down where this is stemming from.
I can say from the software side of things it doesn’t really make sense that most of your attachments are saved just fine and some are just plain missing. I mean in normal situations it should have the same connection, same path, same permissions every single time.
Cheers.
I think this can be nudged forward by examining only the case where the documents are on the filesystem, and ignoring the "missing documents" problem for now.
Use Case:
Create a ticket.
Document is uploaded to a ticket, and ticket saved successfully.
We navigate to the ticket again, we can see the document attachment link.
We can click on the link, a new browser windows opens (blank) and the document downloads into our local downloads folder.
The downloaded document can be opened and viewed normally.
We then attempt print the ticket with attachments... this fails. We get a blank screen (as above) and no downloaded file.
We again attempt print the ticket without attachments... this also fails. We get a blank screen (as above) and no downloaded file.
Then you should be seeing errors somewhere. If it’s failing then there has to be errors.
Cheers.
- Edited
Right. We've been asking where we should find the errors.
We don't see them in the OST admin System Logs, we don't see them in our Apache/PHP Logs (WHM > CPanel > Errors).
We're not sure that the observed ABEND is a failure...
In other words, it appears to successfully do nothing.
One of the reasons we think so, is because its inconsistent - some tickets will print, others won't. Seems unlikely to be a permissions issue on specific folder or php file, because of the inconsistent success that we observe.
For example, we would expect the wrong permissions on /tmp to affect the printing of ALL tickets, not SOME of the tickets.
Thoughts?
- Edited
The most common logs are general server logs, webserver error logs, PHP error logs, MySQL/MariaDB error logs, osTicket System Logs, and Browser Console logs.
Since you are using CPanel you might have specific security rules blocking it. You should also check to see if any of your security rules are blocking some requests. You will need to refer to your setup’s documentation on how to check your security rules/logs.
Cheers.
For the benefit of others:
THIS ISSUE WAS RESOLVED BY INCREASING THE PHP MEMORY_LIMIT TO 200MB ON THE INSTALLATION (HOME) DIRECTORY
KevinTheJedi Thank you very much for your post, it worked for me. I'm using osTicket v1.18.1, I took advantage of the directory that I had created to store the attachments and it already had the necessary permissions.