Viewing 11 replies - 1 through 11 (of 11 total)
  • Plugin Author bhaldie

    (@bhaldie)

    An interesting issue, and one that is very hard to figure out. My first quick guess is a apache server setting, but what setting I don’t know. I will look around see if I can find anything but this errors are really hard to solve without being an admin.

    Thread Starter racefreak.psi

    (@racefreakpsi)

    This is not a apache server.. This is a iis server with php installed on it.

    Plugin Author bhaldie

    (@bhaldie)

    Looking at the file in a plain text editor the problem is at the very end of the document.

    A normal file at this line at the end:

    %%EOF

    Your files have this at the end:

    %%EO

    for some reason the F is being cut off in the download process, once the F is added to the file it opens with no problem.

    I’ll keep digging.

    Thread Starter racefreak.psi

    (@racefreakpsi)

    I wonder how that might get cut off..

    Plugin Author bhaldie

    (@bhaldie)

    Not sure why yet… Looks to be something to do with php and how windows handles the download request.

    Thread Starter racefreak.psi

    (@racefreakpsi)

    is there a possible fix for it?
    It worked well before.. the last 2 months it started behaving like this..

    Plugin Author bhaldie

    (@bhaldie)

    you could try this if you want. Open up the file mdocs-download.php find the this line: (should be around line 60)

    header('Content-Length: ' . filesize($file));

    change it to this:

    `header(‘Content-Length: ‘ . filesize($file)+1);’

    see if that does anything.

    Thread Starter racefreak.psi

    (@racefreakpsi)

    It seems good now.
    I hope that was the issue.
    Thanks for the support!

    Plugin Author bhaldie

    (@bhaldie)

    for some reason a the php function filesize() is return a value 1 less than expected not sure why that is so adding the +1 solved the issue.

    I’m doing some research on this issue, it’s happening for some of my plugin’s users too

    https://wordpress.org/support/topic/222-record-report-missing-very-last-value?replies=16#post-7793819

    @racefreak.psi Can you post a few details about your PHP / Apache server configuration? Or can you send them to me privately lol (at) scottkclark.com?

    So far I think these are the only three cases I can find, so I (deeply) want to figure this out as an engineer.

    Thread Starter racefreak.psi

    (@racefreakpsi)

    Sorry for the late response Scott.

    This is the info of my php server.
    I’m not running apache. IIS is what i host on.

    System Details:
    Running on: Microsoft-IIS/8.0
    Powered by: PHP/5.4.40

Viewing 11 replies - 1 through 11 (of 11 total)

The topic ‘File corrupt’ is closed to new replies.