Page 1 of 2

Error downloading files

Posted: 26 Jan 2014, 15:03
by ust711
Hi,

I installed a few weeks ago the Phoca Download extension. It's a wonderful extension, like other extensions provided by Phoca, congratulations !!!

But, now I have a (big) problem. I have some PDF's files uploaded in the folder "phocadownload" using Phoca Download (Back End). When I put a plugin in an article to download a PDF, downloading is okay but after when I open my downloaded PDF, I become a error message in Adobe Acrobat Reader, it says that it cannot open the file, which seems to be corrupted and Adobe cannot repare it...

I uninstalled this extension today, and reinstallated it, but always have the same problem... I tried also many other extensions but Phoca Download is for me the best one, other extensions are not as complete as Phoca...

The only thing that works is to enable the direct link to the file. But in this case, when the visitor clics on the link, the file opens in the same (or a new window). I would like the file to be downloaded directly by the visitors.

Please help me help me !!! Thank you in advance !

Greetings, UST711

Re: Error downloading files

Posted: 28 Jan 2014, 00:36
by Jan
Hi, hmmm, Phoca Download does not change the files, it just give information from server to browser about downloading.

Are you able to open the PDF in Acrobat reader. If you open it in editor, see if the PDF has right header (just compare it with PDF which works)

Jan

Re: Error downloading files

Posted: 01 Feb 2014, 13:41
by ust711
Jan wrote:Are you able to open the PDF in Acrobat reader. If you open it in editor, see if the PDF has right header (just compare it with PDF which works)
PDF can be open in Acrobat Reader before uploading to server and when downloaded directly from the server.
When I download it using Phoca Download :
- if direct download is disabled in the file options, the file can be downloaded using the plugin in an article (on my site that's the method I am using). But then, it cannot be opened...
- if direct download is enabled in the file options, the PDF file will open in the web browser by clicking on the link in the article.

Greetings,
UST711

Re: Error downloading files

Posted: 05 Feb 2014, 01:17
by Jan
Hi, I mean the PDF which cannot be opened, just open it in editor and see the header of the pdf (but it should be the PDF document which cannot be opened in Acrobat Reader - to see the source code of the wrong PDF)

Jan

Re: Error downloading files

Posted: 05 Feb 2014, 15:48
by ust711
Okay, but the problem happens with every PDF I've uploaded on my site, unfortunately... So there is maybe another problem, maybe with the server or with the files CHMOD.

My site is running with Joomla 2.5.17, the server has PHP 5.2.9 installed. If you need other informations about the system, I'll give you them.

Re: Error downloading files

Posted: 05 Feb 2014, 18:42
by Jan
Hi, I mean, to see source code of one file - of one corrupted PDF - only for test - to see the source code if it does not include any wrong strings inside - e.g. some error messages from server, etc. - some strings added to the PDF which can prevent it from opening - to discover if this is not the thing, which can cause the problems.

Jan

Re: Error downloading files

Posted: 09 Feb 2014, 13:42
by ust711
Hi, could you explain me how to see the source code of a PDF file ? I'm sorry but I really don't know how to do it...

Re: Error downloading files

Posted: 10 Feb 2014, 14:35
by redmoskito
Hi, I've got the same problems. Here is the part of a broken PDF:

Code: Select all

%PDF-1.4
%âãÏÓ
17 0 obj
<</Linearized 1/L 470344/O 19/E 283185/N 2/T 470011/H [ 537 237]>>
endobj
               
48 0 obj
<</DecodeParms<</Columns 5/Predictor 12>>/Filter/FlateDecode/ID[<DE1F34DBE5134EEDA6BEA4F2F47568CB><F4C73CA18B9CFB4495C446375CF9D5D4>]/Index[17 55]/Info 16 0 R/Length 138/Prev 470012/Root 18 0 R/Size 72/Type/XRef/W[1 3 1]>>stream
hÞbbd```b``þ"’@$ÓOÉÖï‘Œñ`vˆd­³cÁìÇ`õ`ö0YÖ{¬«,R
I“«À¶tÈPm©´DjIF·"°lXöˆ©‘Í Ùr°íŒü ’}%ü·t5ÐýÀºŒüÏÀÄú À
Phoca did work for years without any problems.

Re: Error downloading files

Posted: 11 Feb 2014, 13:21
by Jan
Hmmm, this seems like right PDF file with correct header - can you let me know the link to download this file so I can test it.

ust711
Instead of opening the PDF in Acrobat reader, open it in text editor (notepad, notepad++) and see the header (first e.g. 10 lines) - if the PDF is correct you should see something like it is listed in previous topic.

Jan

Re: Error downloading files

Posted: 12 Feb 2014, 12:22
by ust711
Okay thank you, I opened one broken file in Notepad++ here are the first 25 rows :

Code: Select all

<script>
  (function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
  (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
  m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
  })(window,document,'script','//www.google-analytics.com/analytics.js','ga');

  ga('create', 'UA-47269435-1', 'graap.ch');
  ga('send', 'pageview');

</script>
%PDF-1.3
%Äåòåë§ó ÐÄÆ
4 0 obj
<< /Length 5 0 R /Filter /FlateDecode >>
stream
x+TT(TÐH-JN-()MÌQ(Ê
˜Zšë™)
Greetings,
UST711