Hesk Attachments not working

Helpdesk for my helpdesk software

Moderator: mkoch227

Post Reply
Tinydan
Posts: 29
Joined: Wed Nov 06, 2013 2:09 pm

Hesk Attachments not working

Post by Tinydan »

Script URL:
Version of script: 2.5.2
Hosting company:
URL of phpinfo.php:
URL of session_test.php:
What terms did you try when SEARCHING for a solution:

Hesk Attachments

Write your message below:

The attachment functionality of Hesk doesn't seem to be working and I'm not sure why. I've tried entering attachments through email, admin and customer forms and the result seems to be the same. A file gets uploaded but when its downloaded its corrupt. I've gone onto our server and tried getting the uploaded files of myself but it seems that certain ones upload fine while others aren't.

I've done a couple of tests.

Text files upload fine and can be downloaded by the user.
Excel files are corrupt.
Pictures don't show at all.

The files on the server seem to have some form of protection. I tried opening them on our web server and it says access denied. I'm sure this issue isn't meant to happen and I'm not sure what's caused it. I have a feeling that its a server side issue, maybe a permission issue (the files might be locked by something?).

I've managed to get some copies of the files off our server onto my own machine. It required admin rights to copy them on the server first then out of the server onto my machine. The files are all fine and complete so its not an issue of the file being uploaded and corrupted.

Anyone had similar issues or input to give? I'm unwilling to change the file permissions unless its absolutely necessary for hesk's functionality.
Klemen
Site Admin
Posts: 10147
Joined: Fri Feb 11, 2005 4:04 pm

Re: Hesk Attachments not working

Post by Klemen »

I can't test to be sure since you didn't post a link to your help desk, but this usually means some additional bytes are added to your files.

Most likely a hidden utf-8 byte order mark or a char resulting from editing files.

If you modified any of the files (even if it was just a small text change) try uploading the original ones again.
Klemen, creator of HESK and PHPJunkyardWas this helpful? You can buy me a drink here Image

Image You should follow me on Twitter here

Help desk software | Cloud help desk | Guestbook | Link manager | Click counter | more PHP Scripts ...

Also browse for php hosting companies, read php books, find php resources and use webmaster tools
Ciastek
Posts: 2
Joined: Wed Apr 30, 2014 9:23 am

Re: Hesk Attachments not working

Post by Ciastek »

Hello,
I'd like to apologize for bumping such an old thread, but I have quite the same problem as the creator of this thread, and there's no solution to it whatsoever.
As creator stated, attachments downloaded from server seem to be corrupted, and it happens to every type of attachment extension except .pdf, since it's been set to "protected from editing". Attachments copied over remotely seem to work just perfect, while downloaded by HESK not. Just mentioned HESK is running on XAMPP 1.8.3, Windows Server 2003, inside-network only. Could it be a problem with wrong permission settings of "attachments" folder?

Best regards,
Ciastek
Klemen
Site Admin
Posts: 10147
Joined: Fri Feb 11, 2005 4:04 pm

Re: Hesk Attachments not working

Post by Klemen »

This is not a permissions issue, but like said most likely likely a hidden utf-8 byte order mark or a char resulting from editing files.

If you modified ANY of HESK files (even if it was just a small text change) try uploading the original ones again and see if that fixes the issue.
Klemen, creator of HESK and PHPJunkyardWas this helpful? You can buy me a drink here Image

Image You should follow me on Twitter here

Help desk software | Cloud help desk | Guestbook | Link manager | Click counter | more PHP Scripts ...

Also browse for php hosting companies, read php books, find php resources and use webmaster tools
Tinydan
Posts: 29
Joined: Wed Nov 06, 2013 2:09 pm

Re: Hesk Attachments not working

Post by Tinydan »

Ok after having read Kelemen's response I went through and checked what could be the cause of this issue. I've found that modifying the text.php file in the language folder causes some issues with the website. Modifying and saving the file using the default windows notepad seems to break the file which causes the files to be corrupted when downloaded.

I suggest opening the default text.php file in an editor like Notepad++ making the changes there then saving the resulting file to the server. If the error was like mine then it should be fixed.
Klemen
Site Admin
Posts: 10147
Joined: Fri Feb 11, 2005 4:04 pm

Re: Hesk Attachments not working

Post by Klemen »

Exactly, Notepad saves all UTF-8 files with the byte order mark which is causing problems, hence the knowledgebase article also recommends using Notepad++ that can handle UTF-8 encoding without BOM:
http://www.hesk.com/knowledgebase/index.php?article=34
Klemen, creator of HESK and PHPJunkyardWas this helpful? You can buy me a drink here Image

Image You should follow me on Twitter here

Help desk software | Cloud help desk | Guestbook | Link manager | Click counter | more PHP Scripts ...

Also browse for php hosting companies, read php books, find php resources and use webmaster tools
Tinydan
Posts: 29
Joined: Wed Nov 06, 2013 2:09 pm

Re: Hesk Attachments not working

Post by Tinydan »

Learn something new every day :D
Ciastek
Posts: 2
Joined: Wed Apr 30, 2014 9:23 am

Re: Hesk Attachments not working

Post by Ciastek »

It worked like a charm. Thank you, gentleman.
Post Reply