Download doc/docx files unreadable

Phoca Download - download manager
lopezan
Phoca Newbie
Phoca Newbie
Posts: 9
Joined: 23 Nov 2015, 12:30

Download doc/docx files unreadable

Post by lopezan » 14 Dec 2020, 21:53

I use PhocaDownload (last version) on Joomla 3.9.23.
When i try to download doc/docx files, all of this are unreadable. If I download and open it from ftp or without using PhocaDownload, it are perfectly readable.
Can anyone help me?

Thanks and regards.
Angelo

christine
Phoca Hero
Phoca Hero
Posts: 2163
Joined: 28 Nov 2010, 17:20

Re: Download doc/docx files unreadable

Post by christine » 14 Dec 2020, 22:53

Hi,

check this please: Under Options:
Allowed File Types (Download) - Set allowed file types for frontend download. Default list of filetypes is not complete and should be modified to fit your needs.
Kind regards
Christine

lopezan
Phoca Newbie
Phoca Newbie
Posts: 9
Joined: 23 Nov 2015, 12:30

Re: Download doc/docx files unreadable

Post by lopezan » 14 Dec 2020, 23:07

Hi,

I have alreadt this type of files in the list:

{doc=application/msword}
{docx=application/vnd.openxmlformats-officedocument.wordprocessingml.document}

what can be the problem?

Thx

lopezan
Phoca Newbie
Phoca Newbie
Posts: 9
Joined: 23 Nov 2015, 12:30

Re: Download doc/docx files unreadable

Post by lopezan » 14 Dec 2020, 23:14

Before upgrade to the last version of Phocadownload, all worked fine.

Regards

christine
Phoca Hero
Phoca Hero
Posts: 2163
Joined: 28 Nov 2010, 17:20

Re: Download doc/docx files unreadable

Post by christine » 14 Dec 2020, 23:26

Hi,
lopezan wrote:
14 Dec 2020, 23:14
Before upgrade to the last version of Phocadownload, all worked fine.
Do you mean new version 3.2.2?
https://www.phoca.cz/download/category/ ... -component

Kind regards
Christine

lopezan
Phoca Newbie
Phoca Newbie
Posts: 9
Joined: 23 Nov 2015, 12:30

Re: Download doc/docx files unreadable

Post by lopezan » 14 Dec 2020, 23:33

yes, 3.2.2

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

Re: Download doc/docx files unreadable

Post by Jan » 15 Dec 2020, 17:26

Hi, there were no changes regarding download among these versions. Are you sure, nothing changed on server settings (as mostly Phoca Download only gives instructions to server and browser how to handle the files and the communication takes place between browser and server).

What does exactly mean 'unreadable'? Can you provide a link to the files of the file itself: Sometimes it happens that e.g. server renders a php error to the document and such document is then damaged - but when viewing it e.g. in text editor, the error can be read and corrected on server. So maybe, probably this can be the problem (that some new error is rendered to document).

Jan
If you find Phoca extensions useful, please support the project

lopezan
Phoca Newbie
Phoca Newbie
Posts: 9
Joined: 23 Nov 2015, 12:30

Re: Download doc/docx files unreadable

Post by lopezan » 16 Dec 2020, 22:24

Hi,

i have created two sample pages.
From the first one you can download a docx file using a standard link, and it works fine. The link is:
https://www.fw3.it/index.php?option=com ... Itemid=335

From the second one, you can download the same docx file using Phocadownload component. And it is downloaded corrupted. The link is:
https://www.fw3.it/index.php?option=com ... Itemid=336

Prior to upgrade Phocadownload component, all works fine.

To access to the site, the username/password is:

test/test

The site configuration is:
Joomla! 3.9.23 Stable [ Amani ] 24-November-2020 15:00 GMT
MYSQL 5.7.32
PHP 7.4.10
Phocadownload 3.2.2



Thanks and regards.

lopezan
Phoca Newbie
Phoca Newbie
Posts: 9
Joined: 23 Nov 2015, 12:30

Re: Download doc/docx files unreadable

Post by lopezan » 19 Dec 2020, 16:44

Hello,
any news?

Regards

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

Re: Download doc/docx files unreadable

Post by Jan » 19 Dec 2020, 18:37

Hi, both files are identical except the first character:

Image

Your server adds empty space before rendering the file ... this can be e.g. displaying of some error message (without text, but leaving empty character, etc. etc.)

Really hard to say - there can be a lot of possible parts which can do it - on server, in Joomla! - e.g. some system plugin, etc. So for test, you can e.g. disable system plugins to be 100% that noone can influence the output, but I think, this will be no the case, as the output is cleaned before downloading:

Image

So the only idea I have is to debug the file:
administrator\components\com_phocadownload\libraries\phocadownload\download\download.php (from part ob_end_clean(); to exit;) and try to check which part adds the empty space there :idea:

If this will be not found, then the only way is to use direct download in Phoca Download :idea:

Jan
If you find Phoca extensions useful, please support the project

Post Reply