Corrupted files

Home \ forums/topic \ Corrupted files
Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #149
    Tom Naegele
    Participant

    Hi Michael,

    I just purchased your plugin and installed it with Joomla 1.7. Now I have a problem with corrupted PowerPoint files (same problem with PDF). If I click your disc-icon to save the file, it’s corrupted, left click on the filename downloads correctly.

    The corrupted PowerPoint file can be opened and contains text (I deleted directory names):

    <b>Warning</b>: filesize() [function.filesize]: stat failed for Units.ppt in <b>/plugins/content/easyfolderlistingpro/download.php</b> on line <b>4</b>

    <b>Warning</b>: Cannot modify header information – headers already sent by (output started at /plugins/content/easyfolderlistingpro/download.php:4) in <b>/plugins/content/easyfolderlistingpro/download.php</b> on line <b>4</b>

    <b>Warning</b>: Cannot modify header information – headers already sent by (output started at /plugins/content/easyfolderlistingpro/download.php:4) in <b>/plugins/content/easyfolderlistingpro/download.php</b> on line <b>5</b>

    <b>Warning</b>: Cannot modify header information – headers already sent by (output started at /plugins/content/easyfolderlistingpro/download.php:4) in <b>/plugins/content/easyfolderlistingpro/download.php</b> on line <b>6</b>

    <b>Warning</b>: Cannot modify header information – headers already sent by (output started at /plugins/content/easyfolderlistingpro/download.php:4) in <b>/plugins/content/easyfolderlistingpro/download.php</b> on line <b>7</b>

    <b>Warning</b>: readfile() [function.readfile]: URL file-access is disabled in the server configuration in <b>/plugins/content/easyfolderlistingpro/download.php</b> on line <b>8</b>

    <b>Warning</b>: readfile(Units.ppt) [function.readfile]: failed to open stream: no suitable wrapper could be found in <b>/plugins/content/easyfolderlistingpro/download.php</b> on line <b>8</b>

    Thanks for your help!

    Tom

    #1242
    Michael Gilkes
    Keymaster

    @Tom. Thanks for posting to my support site. These errors could result from a couple of different things. I think it could result from a server configuration. I think your files are being corrupted because you fopen_wrappers may be disabled or turned off in PHP. You are going to need to enable allow_url_fopen in your PHP.ini configuration. You do this by editing your PHP.ini file and placing:

    allow_url_fopen = On

    Please see the following for more information: http://us.php.net/readfile#refsect1-function.readfile-notes

    Please let me know if this works.

    #1243
    Tom Naegele
    Participant

    Hi Michael,

    unfortunately allow_url_fopen = On doesn’t work.

    However file size changes.

    On: 600kB, Off:3kB (should be 598kB).

    But the file is still corrupted.

    I will set the Download Target to none and will use Link to Files.

    Thanks for your help.

    Tom

    #1244
    Michael Gilkes
    Keymaster

    @Tom. Thanks for the feedback. I think that enabling allow_url_open is part of the solution, from what you describe. I can tell that by the file size difference.

    Is it that you are still getting the same exact error(s) now, or is it a different error?

    I would love for you to work with me to get this resolved.

    By the way, did you try changing the Content-type to “force-download”?

    #1245
    Tom Naegele
    Participant

    Michael,

    the last 2 warnings (URL file-access,no suitable wrapper) disappear, if allow_url_fopen = On. The first 5 are the same.

    I changed “force-download”, but the files are still corrupted.

    I also tried Joomla 1.6.5. Same problem.

    You can test the problem here:

    http://j17.start.he-hosting.de/index.php/easyfolder

    Click the disc-icon, download and open the jpg/gif.

    I can mail Joomla and FTP Login data.

    However on this server we can change only few PHP Variables due to provider restrictions.

    Tom

    #1246
    Michael Gilkes
    Keymaster

    @Tom. Ok, that’s some great feedback. Errors 2 to 5 are a result of the first error being displayed on the screen. So, you really only have one error left.

    Ok, I just tested that link from my browser, and it downloaded without any problems, when when I try to open it it is indeed corrupt.

    I was doing some research, and issue could be a couple of different things. It could be a zip compression setting: http://stackoverflow.com/questions/6276879/php-download-script-for-zip-files-corrupting-the-file

    It could be an incompatible encoding of the download.php file itself: http://stackoverflow.com/questions/6328750/how-do-i-fix-this-php-download-script-which-is-corrupting-files

    The best thing to do is to search for web for various download scripts, and test them to see what works. Once you find one that works, just use the code in the download.php file. Of course, I am assuming to understand PHP. However, I believe that ultimately this is a server configuration issue, as others have experienced this problem: http://www.hotscripts.com/forums/php/47774-download-script-not-sending-file-size-header-corrupt-files-since-using-remote-file-server.html

Viewing 6 posts - 1 through 6 (of 6 total)
  • The topic ‘Corrupted files’ is closed to new replies.