WordPress.org

Ready to get started?Download WordPress

Forums

Easy Digital Downloads
[resolved] Downloads are 0 bytes (9 posts)

  1. wizdum
    Member
    Posted 2 years ago #

    Download links from the email are 0 bytes.
    I wrapped the header sending block in edd_process_download() with
    if (file_exists($requested_file)) and they do not.

    The file paths (as written by the uploader in admin) are of the form /wp-content/uploads/edd/2012/06/filename.pdf

    Removing the initial / fixes it... but why is this happening?

    http://wordpress.org/extend/plugins/easy-digital-downloads/

  2. Pippin Williamson
    Pippin's Plugins and Plugin Reviewer
    Plugin Author

    Posted 2 years ago #

    Try defining the EDD_READ_FILE_MODE constant, as described on this page: http://easydigitaldownloads.com/docs/edd_read_file_mode/

  3. wizdum
    Member
    Posted 2 years ago #

    yes, that could work.. but the problem is not that the server doesn't allow url_fopen/readfile.
    The problem is that the path provided to readfile isn't correct.

    When you add a file link in a downloads post type from the backend, it creates a file path
    /wp-content/uploads/edd/2012/06/filename.pdf

    readfile takes a file system path, not url, so it doesn't work.

  4. Pippin Williamson
    Pippin's Plugins and Plugin Reviewer
    Plugin Author

    Posted 2 years ago #

    Oh, I didn't realize the path was correct.

    If you click "File URL" before clicking "Use this File", does it insert the complete URL?

  5. Pippin Williamson
    Pippin's Plugins and Plugin Reviewer
    Plugin Author

    Posted 2 years ago #

    V1.0.8.5 should take care of this issue natively.

  6. Arthur Klein
    Member
    Posted 1 year ago #

    i am using version 1.1.1 and i have a similar problem with saying it is doing the download but then download only 25 meg of much larger files and then it cluncks out as complete but file is unusable. Are there any naming restrictions or some other systemic issues?

  7. If you add this to your functions.php does the problem go away?

    define('EDD_READ_FILE_MODE', 'header');

  8. Arthur Klein
    Member
    Posted 1 year ago #

    It definitely didn't work. what am i missing? Still tries to download 234 byte file instead of 900meg actual video mp4 file.

    did i do it ok? i added it to child theme functions.php

    `// Include the custom widgets
    include('includes/helper.php');
    include('includes/widget-func.php');
    include('includes/twitter.php');
    include('includes/blog-author.php');
    include('includes/flickr.php');
    include('includes/nomnom-slider/slider.php');
    include('custom-functions.php');

    //edd read file mode fix.
    define('EDD_READ_FILE_MODE', 'header');

    // Call the various .js files and shortcode css
    function add_nomnom_scripts(){
    wp_register_style('color_options.css', get_stylesheet_directory_uri().'/includes/color_options_css.php');
    }

  9. It sounds like a conflict with part of your hosting configuration. Do you know what your php.ini file is, and do you have access to it?

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic

Tags

No tags yet.