Support » Plugin: Simple Download Monitor » Corrupted file after download Excel-file

  • Resolved deexperte



    After download I get a scrambled/corrupted Excel-File content. The downloaded Excel is unusable.

    In log I get Notice: ob_end_clean(): failed to delete buffer. No buffer to delete in /home/stbmwt/public_html/wp/wp-content/plugins/simple-download-monitor/includes/sdm-download-request-handler.php on line 194

    Not shure if this notice is connected to the corruptioned file after download.

    Anyone with an idea for this?

    Thank you!

    Greetings Deexperte

Viewing 6 replies - 16 through 21 (of 21 total)
  • Plugin Author mra13


    No special PHP libraries are needed for it.

    It is likely you have the PHP Dispatch option enabled for the download. Some servers will not work correctly with the PHP Dispatch. It will mess up the file while streaming via PHP (like what you are seeing). This is a very server specific issue.

    You may want to try disabling the PHP Dispatch option in the download. Or try a different plugin.

    @mra13 thank you for your comment.

    What do you mean by “on some servers”?

    Do you know the server requirements?


    Solution that works for me:

    modify sdm-download-request-handler.php line 194:

    if (ob_get_length()) ob_end_clean();
    readfile( $filename );

    But this is not persistent if this php-file changes by updates.

    The best would be that the developers investigate this and modify the code.

    Considering the good properties of that plugin and the good documentation it will be worth for the plugin.


    Plugin Author mra13


    There will be other sites where the modification you made will break things. There is no one solution for this which will work on all sites. So this is not something we can address for free unfortunately.

    We do have the following action hook that you can use to override the download handling. So you can use this hook to write your custom function to handle the download request. Then it won’t get overwritten:

    do_action( ‘sdm_process_download_request’, $download_id, $download_link );

    Hello @mra13 ! It may be an idea. Can you give me a lead where I can find your default code which handle that download?



    Plugin Author mra13


    It is in the following file:


    If you do a search for the following string in that file, you should find it:

Viewing 6 replies - 16 through 21 (of 21 total)
  • You must be logged in to reply to this topic.