Downloaded files always corrupted

More
10 years 2 months ago #52348 by Natwork
Hi everyone,

since i update to J3.3.6/Flexicontent 2.2.0, all files downloaded are corrupted. I can download, but can't open files.

I have 4 type of files, everything is corrupted when downloaded (mp3, pdf, zip, dwg).

None of them can be read.
- I tried to delete them, then re-upload them, didn't work.
- I tried to download them via FTP -> files are OK
- I tried to upload them in media folder, then in secured folder, nothing worked
- I tried to change file access, nothing worked.
- I tried FlexiContent v2.2.1RC, didn't work
- I tried with file.php from github, didn't work[/list]

It is a big trouble, because the website is online, and i can't find a clue to find out where this problem come from.

Anyone else got the problem?
Any idea to solve this?

Please Log in or Create an account to join the conversation.

More
10 years 2 months ago #52349 by ggppdk
Hello

the reason for corrupt download files is (almost always) PHP notices/warning printed before HTTP header


there is a fix for 1-2 such cases already in FLEXIcontent v3 dev


you can make a patch to avoid the notice


just open the downloadable file in a TEXT editor

and view it at the very top
you should see a PHP notice / warning

copy it here


-- Flexicontent is Free but involves a big effort on our part.
Like the our support? (for a bug-free FC, despite having a long list of functions) Like the features? Like the ongoing development and future commitment to FLEXIcontent?
-- Add your voice to the FLEXIcontent JED listing with a 5-star...

Please Log in or Create an account to join the conversation.

More
10 years 2 months ago #52360 by Natwork
I downloaded a PDF, opened it in text editor, and here are the firsts line :
Code:
<br /> <b>Warning</b>: set_time_limit() has been disabled for security reasons in <b>/home/www/4127210f8367f9f95d599dbeeaf04e88/web/components/com_flexicontent/controller.php</b> on line <b>2240</b><br /> %PDF-1.6 %âãÏÓ 426 0 obj <</Linearized 1/L 864612/O 428/E 571677/N 2/T 864182/H [ 651 304]>> endobj

It seems to be a problem with set_time_limit()
When i look in joomla/php parameters, this function is disabled.

I changed the line 2240 of controller.php to add an "@".
It's not clean but as you said, files are OK now.
If there is a better fix, i'll take it ;)

Thanks for your help and your great job.

Please Log in or Create an account to join the conversation.

More
10 years 2 months ago #52366 by ggppdk
Hello

yes that is the fix that we added in FLEXIcontent v3

we added check if set_time_limit is disabled


-- Flexicontent is Free but involves a big effort on our part.
Like the our support? (for a bug-free FC, despite having a long list of functions) Like the features? Like the ongoing development and future commitment to FLEXIcontent?
-- Add your voice to the FLEXIcontent JED listing with a 5-star...

Please Log in or Create an account to join the conversation.

Moderators: vistamediajoomlacornerggppdk
Time to create page: 0.323 seconds
Cookies user preferences
We use cookies to ensure you to get the best experience on our website. If you decline the use of cookies, this website may not function as expected.
Accept all
Decline all
Essential
These cookies are needed to make the website work correctly. You can not disable them.
Display
Accept
Analytics
Tools used to analyze the data to measure the effectiveness of a website and to understand how it works.
Google Analytics
Accept
Decline
Save