Attachments open as garbage code within Browsers

Helpdesk for my helpdesk software

Moderator: mkoch227

Post Reply
windowsuserinbox
Posts: 3
Joined: Mon Oct 29, 2012 12:58 pm

Attachments open as garbage code within Browsers

Post by windowsuserinbox »

Hello,

Which ever type of file attachment that have been added to the knowledgebase the files such as PDF or word documents open within the web browsers Firefox or MSIE as opposed to downloading the files for example.

Instead of opening the files the browsers shows the following garbage codes despite having set the appropriate permissions to the attachment folder of Hesk.

Garbage example when trying to open a PDF file from the knowledgebase.

(REMOVED)

I would appreciate your help over this issue.

Many thanks,

Kind regards,

Trevor
Klemen
Site Admin
Posts: 10147
Joined: Fri Feb 11, 2005 4:04 pm

Re: Attachments open as garbage code within Browsers

Post by Klemen »

My best bet is that something is causing your PHP to send out headers before the download script sends the "Content-Disposition: attachment" header that should force browsers to download files.

Have you been modifying *any* HESK files manually? Try uploading *all* original HESK files to the server again (except hesk_settings.inc.php) even if all you did was open and close a file in an editor.

To get any further help you will need to provide the information asked for when starting a new thread.
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
windowsuserinbox
Posts: 3
Joined: Mon Oct 29, 2012 12:58 pm

Re: Attachments open as garbage code within Browsers

Post by windowsuserinbox »

Many thanks for your advice; however I do not know whether it is worth mentioning but I am able to open text files however pdf and word files are not opening since they are still showing garbaged code in the browser.

Many thanks,

Kind regards

Trevor
Klemen
Site Admin
Posts: 10147
Joined: Fri Feb 11, 2005 4:04 pm

Re: Attachments open as garbage code within Browsers

Post by Klemen »

Have you tried as suggested?

I'm afraid all I can do is wild guesses without having access to your help desk to test it.
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
windowsuserinbox
Posts: 3
Joined: Mon Oct 29, 2012 12:58 pm

Re: Attachments open as garbage code within Browsers

Post by windowsuserinbox »

Thanks Klemen, I left it for a couple of hours and tested the links. it is now possible to open files without having changed anything. THANKS THOUGH for your help

Kind regards

Trevor
Post Reply