Download shows Garbage with Downloading

Phoca Download - download manager
truediamond
Phoca Newbie
Phoca Newbie
Posts: 5
Joined: 29 Jan 2014, 14:34

Download shows Garbage with Downloading

Post by truediamond »

Hello.

I am hoping that someone can help me!
I use Phocadownload on my site, and have done for many a year.
It was brought to my attention that when you try to download a document it just displays rubbish rather than allowing you to open it/save it

It opens up in the same window with stuff like this:

%PDF-1.4 %Ç쏢 5 0 obj <> stream xœÍ[[odÅV$òxž’„}¿ðK”­ NxyÛc¯³öØë hÿH~o¾îsº«Î™{/ÁJlOw×µ«¾ªšÑ>ëD/U'ÒŸ²8ºØûðKߝÞì=Û3Ê÷1ºÎyéz绋=U¨ÏǏ2„á£tž¬äuçÉÞWïw›½g6dqÚ…Îx9ÜÓ&ßË*„îÓ˽/ð'k×}ù—qq} ÅB¯Óyƒ¯.ºO@,EsNöG#ó¡ìdн뼓}ÀÞÁÅÞ¢[ügïÏóljÛÅž±F1S‡ÕíµegŽ¨vç²l‹cí´¬w²R#ák}ç”\úøqKúp™‹KÒ^Õ-VÇޙ΅¿æ~ùâ5øÂu:ÚÎë™ÃA¡›ÊÈbï•p‰à_‹-¡–0",~¼Ü7½5RÙÅO°œ|ï§Ë}ž`ð͘ò3Àv±GNëàŠµêµê¼ï… CY§‚Âj?ô¶ÈqÓ¨ìdAEÏ‹ÞhëDöÄ{)¸Ûâ‰tôت§p½í…uV%g࢕1Âõ6i+cr‹êm´qp 'àFõxÁÅVec„Ž‹`7Ò3$‡kÄIzdŽŸÈx#ë a7áM÷-¹½\©Éo0Й ‰“·{iôÚùv€tÀÞS2UQò»%î=PÁ™>„'¿]¦M¯Vˆ‚Ò?ˆÍì됣h½â¦ù>¥§(WˆwáSÔçùþ,ö€àèR€Ò­·ÂT@rÐÂz,½1“ðžã×…U¤q(ô¨¡%]~—ÐÞ"iG­-sÁº,•4#X˜ø X¾.Ä ±ü=j£·>˜ï6ÁWB†ö’ñ}@™6L.a?;‡¨¸ºÌJ&â]Z2ÞK»Æ{#9ã?,Qùm„9ŒÁ;Í%Æu`n ß¼Û´’ÙþJ8¼¤&aùö°Z§ò–MTXþ¦Z4 jñ „;)´E£C$¼Õâóԁ

I uninstalled PhocaDownload, and re-instatlled the latest version, but its still doing this?

Any ideas?

TD
User avatar
Jan
Phoca Hero
Phoca Hero
Posts: 48568
Joined: 10 Nov 2007, 18:23
Location: Czech Republic
Contact:

Re: Download shows Garbage with Downloading

Post by Jan »

Hi, do you get this problem in different browsers, the code of the PDF is OK, maybe there is some limit on the server which somehow changes the download of the file - instead of displaying the document the source code is displayed. :idea:

Jan
If you find Phoca extensions useful, please support the project
truediamond
Phoca Newbie
Phoca Newbie
Posts: 5
Joined: 29 Jan 2014, 14:34

Re: Download shows Garbage with Downloading

Post by truediamond »

Hi Jan,
Thanks for the response.

It is happening for me in IE, Safari and Firefox

I have checked with my internet provider and this is their response:
"When accessing the pdf file directly, it displays ok, as it also does if a simple html link to the document.
It would seem that the problem is due to the coding of the link pointing to the pdf file
."
This is the latter part of the link when i click on the download button :

index.php?option=com_phocadownload&view=category&download=2:junior-section-child-protection-policy&id=4:junior-documents&Itemid=783

is it correct to have the colons I have highlighted??

Any other suggestions?
TD
User avatar
Jan
Phoca Hero
Phoca Hero
Posts: 48568
Joined: 10 Nov 2007, 18:23
Location: Czech Republic
Contact:

Re: Download shows Garbage with Downloading

Post by Jan »

Hi, the link si correct.

For now I cannot say what can be wrong, maybe there is some server settings which is in conflict (I don't say it is not correctly set but it is just in conflict)

Tested on many servers (with different OS, settings, etc.), the code was reviewed by many users in 7 years and together we have selected the method of download (headers) which works.

See e.g.:
https://www.phoca.cz/joomla3demo/phoca-d ... -documents

I think, the one action you can do, is to modify the code, e.g. the headers and test what is working on your server :idea:

e.g. headers are set in: administrator/components/com_phocadownload/libraries/phocadownload/download/download.php

As written above, many users (maybe over 100) added different tips in the 7 year history of the extension so I think the best solution for the the download feature was selected. But it always depends on different factors (server, browser, ...) if the download will be Ok. :idea:
If you find Phoca extensions useful, please support the project
truediamond
Phoca Newbie
Phoca Newbie
Posts: 5
Joined: 29 Jan 2014, 14:34

Re: Download shows Garbage with Downloading

Post by truediamond »

Thanks Jan.
I'll keep searching.

Remember the downloads were working up until somepoint recently, so I am sure that there is something thats changed that is probably outwith Phoca!
truediamond
Phoca Newbie
Phoca Newbie
Posts: 5
Joined: 29 Jan 2014, 14:34

Re: Download shows Garbage with Downloading

Post by truediamond »

Jan wrote: e.g. headers are set in: administrator/components/com_phocadownload/libraries/phocadownload/download/download.php
hi Jan.
I'm afraid i don't have this path.... There is no folder called libraries under the com_phocadownload
(nor does the zip file for version 1.3.9 contain this folder)

Is this the correct path? (Perhaps this si the problem?)

I cannot find any library that has the phocadownload/download/download.php file in it under either the administartor OR the front end component

TD
User avatar
Jan
Phoca Hero
Phoca Hero
Posts: 48568
Joined: 10 Nov 2007, 18:23
Location: Czech Republic
Contact:

Re: Download shows Garbage with Downloading

Post by Jan »

Hi, this is the path of latest release (3)

In 1.3.9 - it is in:
components/com_phocadownload/helpers/phocadownload.php

Jan
If you find Phoca extensions useful, please support the project
truediamond
Phoca Newbie
Phoca Newbie
Posts: 5
Joined: 29 Jan 2014, 14:34

Re: Download shows Garbage with Downloading

Post by truediamond »

Thanks Jan.
Finally worked out what the issue is...There was another plugin on the site that had a blank line outside the php tags. This was messing up the PHP headers, causing phocadownload to treat the code the way it is..

Glad to see that phocadownload is not the problem!

Thanks for your help

TD
User avatar
Jan
Phoca Hero
Phoca Hero
Posts: 48568
Joined: 10 Nov 2007, 18:23
Location: Czech Republic
Contact:

Re: Download shows Garbage with Downloading

Post by Jan »

Ok
If you find Phoca extensions useful, please support the project
Post Reply