Corrupted file (most often when it is too big)

More
10 years 6 months ago #55981 by bendeb
Hello,

I use Flexicontent 3.0 RC and Joomla 3.4.x.

I encountered a problem with files download (not related to 3.0 RC because it happened before, since many time).
For me and many users, file download works good, no problem.

But I have some users that can't download certain files, essentially if they are too big (> 100 mo).
If I try to download these files, it works for me.

I asked an user to send me the corrupted file (PDF) to see the problem. The file is corrupted, I open it with notepad++ to match the error message, but I can't find anything.
I have read many topics here that mentionned this bug (this topic for example : www.flexicontent.org/forum/9-support/520...comme-corrompus.html ) but it don't help me :unsure:
And it's difficult to debug it because for me all is working :silly:

Here are the txt of a corrupted pdf file (only the firsts lines) an user send me.

This browser does not support PDFs. Please download the PDF to view it: Download PDF



I can give you admin access (Joomla, FTP, phpmyadmin...) if you want to see the bug.

Thank in advance. :)

Bye.

Flexicontent 4.1.0b1
Joomla 3.9.18

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

More
10 years 6 months ago #55988 by ggppdk
Hello

you said you opened the corrupted file

so there is no PHP warning or notice at the begining and at the end of the file ?


-- 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 review. Thanks!

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

More
10 years 6 months ago #55994 by bendeb
Hello ggppdk, thank for your reply. :)

For the firsts lines, you can see them in the attach file above.

I look at the end of the file and I see this :
Code:
¡Y¾¬žfü}îØ¬¯<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN"> <html><head> <title>200 OK</title> </head><body> <h1>OK</h1> <p>The server encountered an internal error or misconfiguration and was unable to complete your request.</p> <p>Please contact the server administrator, postmaster@www.mysite.fr and inform them of the time the error occurred, and anything you might have done that may have caused the error.</p> <p>More information about this error may be available in the server error log.</p> </body></html>

Flexicontent 4.1.0b1
Joomla 3.9.18

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

More
10 years 6 months ago - 10 years 6 months ago #55996 by ggppdk
Hello

the message does not say what happened, instead it says that the error is inside web server log
-- by looking at the server log you will probably find what is happening

Guessing:
I guess the maximum PHP execution time is exhausted

Test this fix:
Edit file:
components/com_flexicontent/controller.php

After:
Code:
function download() {
add:
Code:
if(!ini_get("safe_mode")) @set_time_limit( 150 ); // try to set execution time 2.5 minutes

Also you could try to increase: max_execution_time of all scripts

Also (not related to your issue), v3.0.2 has been released


-- 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 review. Thanks!
Last edit: 10 years 6 months ago by ggppdk.

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

More
10 years 6 months ago #55997 by bendeb
In the error logs, I have many errors of this type :

(9)Bad file descriptor: failed to stat user mapfile, referer: http://www......html

(104)Connection reset by peer: FastCGI: comm with server "/homez.742/xxxxx/www/index.php" aborted: read failed, referer:

Handler for fastcgi-script returned invalid result code 1, referer: http://www........html

They happen only on certains IP. I don't know if this is linked to file download bug.

I'll try your php code and I'll be back. Thank :)

I have installed FC 3.0.2, very nice features added ! Thank for all.

Flexicontent 4.1.0b1
Joomla 3.9.18

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

More
10 years 6 months ago #55999 by ggppdk
Hello

ok the file read is aborted , but it does not say why,

please try the fix suggested above regarding the max execution, to see if it corrects the issue


-- 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 review. Thanks!

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

More
10 years 6 months ago #56005 by ggppdk
Hello

the above will probably not work, because we already have:

if ( !FLEXIUtilities::funcIsDisabled('set_time_limit') ) @set_time_limit(0);

you may try asking your web-host provider to help

we are doing 2 things, to allow large downloads
- try to set no execution limit (the statement above)
- we do not read the file into memory because we want to avoid memory exhausted errors,
instead we read it in parts via a lopp and send it to the user's browser

try downloading the file via a downloads manager and set into the manager a slow speed e.g. 50 Kbytes / sec, does the download corrupt ?


-- 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 review. Thanks!

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

More
10 years 6 months ago #56006 by bendeb
I'm waiting for my users replies about this bug if your fix correct it or not.
For me, all is working so I have to wait them :D

One user say me that he can download the above corrupted file, so it seems to be working, but I prefer to have others replies before concluding it is OK. :)

Flexicontent 4.1.0b1
Joomla 3.9.18

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

More
10 years 6 months ago #56015 by bendeb
It seems not working finally :unsure:

Is the user connexion can cause the corrupt file ? If the user have a slow connexion to Internet for example.

try downloading the file via a downloads manager and set into the manager a slow speed e.g. 50 Kbytes / sec, does the download corrupt ?

Which download manager ? :huh:

you may try asking your web-host provider to help

What can I say to them in order that they correct the bug ? I know nearly nothing in server config.

Thank again :)

Flexicontent 4.1.0b1
Joomla 3.9.18

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

More
10 years 6 months ago #56019 by ggppdk
Hello

you missed a later response, yes we had the code already
Code:
the above will probably not work, because we already have: if ( !FLEXIUtilities::funcIsDisabled('set_time_limit') ) @set_time_limit(0);

about download test, just send me a PM with a link and i will make this test,

the purpose of the test is to determine if a slow connection will cause some timeout on the server side


-- 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 review. Thanks!

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

Moderators: vistamediajoomlacornerggppdk
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