WordPress.org

Ready to get started?Download WordPress

Forums

Email Before Download
[resolved] Download ZIP archive corrupt, PHP Warning added to download file by your Plugin (5 posts)

  1. flag
    Member
    Posted 4 months ago #

    I have a ZIP archive for download (archive.zip).
    Problem

    - Your plugin adds PHP errors on top of a ZIP download file like so, which makes the ZIP archive corrupt:

    <br />
    <b>Warning</b>:  fseek() [<a href='function.fseek'>function.fseek</a>]: stream does not support seeking in <b>/home/flag/public_html/cmswp/wp-content/plugins/email-before-download/download.php</b> on line <b>225</b><br />

    - If I manually removed the lines in a text/hex/binary editor, the ZIP archive worked just find.

    So your plugin seems to redirect any error "stderr" to the download stream.

    Please help!

    https://wordpress.org/plugins/email-before-download/

  2. flag
    Member
    Posted 4 months ago #

    Maybe I found the bug:

    1. Edit email-before-download/download.php

    2. Change it to the following at line with fseek:

    // -- prevent adding php fseek warning within ZIP download file
    	$g_CURRENT_ERROR_LEVEL = error_reporting();
    	error_reporting(0);
      fseek($handle,$begin,0);
    	error_reporting($g_CURRENT_ERROR_LEVEL);

    3. Save.

    4. A message to the plugin developer: Please update your Plugin as soon as possible.

  3. flag
    Member
    Posted 4 months ago #

    Please update your Plugin as soon as possible.

  4. mandsconsulting
    Member
    Plugin Author

    Posted 4 months ago #

    Hi flag,
    Thank you for reporting this issue and suggesting solution. We are going to update our plugin soon and will probably add this code our plugin to prevent the issue.
    Can you tell us what version of Download Monitor you are using and what are its and Email Before Download's settings you use. We need that to know the use case when it breaks. Are you using masked option and force download option together?

  5. flag
    Member
    Posted 4 months ago #

    - Download Monitor: Version 1.4.3
    - "and what are its and Email Before Download's settings you use." - I do not understand your message here. / I used GMAIL.
    - masked option and force download option together: What's this?
    (I enabled
    - X-Accel-Redirect / X-Sendfile
    and
    - Prevent hotlinking
    within Download Manager. But no difference.)

    The problem is within your plugin (Email Before Download)

    <b>Warning</b>:  fseek() [<a href='function.fseek'>function.fseek</a>]: stream does not support seeking in <b>/home/flag/public_html/cmswp/wp-content/plugins/email-before-download/download.php</b> on line <b>225

Reply

You must log in to post.

About this Plugin

About this Topic