WordPress.org

Ready to get started?Download WordPress

Forums

WP eCommerce
Files downloaded by customers in my wp e-commerce are corrupt (10 posts)

  1. jofefe
    Member
    Posted 1 year ago #

    Hello,
    this happened to me since I installed WP e-commerce 3.8.12.1 on WordPress 3.6.1.
    All files bought and downloaded by the customers where corrupt although they seemed to be correctly downloaded.
    I solved the problem this way...

    Affected file: "wp-content/plugins/wp-e-commerce/wpsc-includes/ajax.functions.php"

    Three lines added at about line 1092:

    } else {
    header( 'Cache-Control: must-revalidate, post-check=0, pre-check=0' );
    }
    //header( "Pragma: public" ); //existing but I commented it
    header( "Expires: 0" );

    header('Pragma: private'); //ADDED
    ob_clean(); //ADDED
    flush(); //ADDED

    CAN THIS BE ADDED TO FUTURE WP-ECOMMERCE RELEASES TO AVOID IT HAPPENING AGAIN?
    SHOULD I CONTACT ANYONE FOR THAT?

    Thanks in advance and hope this helps everybody with the same problem.

    http://wordpress.org/plugins/wp-e-commerce/

  2. whitelamp
    Member
    Posted 1 year ago #

    I reported this a while back:
    https://github.com/wp-e-commerce/WP-e-Commerce/issues/550

    My code looked like this:

    if ( ! $file_data )
    wp_die( __( 'Invalid file ID.', 'wpsc' ) );

    //DL: dom.latter@whitelamp.com; dump any unwanted characters from
    buffer, and disable to prevent memory exhaustion.
    while (ob_get_level()) {
    ob_end_clean();
    }

  3. jofefe
    Member
    Posted 1 year ago #

    Hello whitelamp, thanks for your reply.
    So I understand it will be solved by the developers for coming versions, won't it?

    In my case it happened with large files, as you said.
    Thanks again.

  4. whitelamp
    Member
    Posted 1 year ago #

    I simply don't know. I've reported it, I've proposed a fix. But nobody seems to have got involved.

  5. Morphim
    Member
    Posted 1 year ago #

    I'm not surprised. WPEC support is non existent. Funny how lacking support has been shifted to WP.org to continue to be lacked.
    Out of sight, out of mind & all that.

  6. Vincentda
    Member
    Posted 1 year ago #

    Hello Jofefe and whitelamp. I'm having this issue on a site using wp-ecommerce 3.8.12.1 and wp 3.7.1. I tried your fix in the ajax.functions file but no luck. any other suggestions?

  7. whitelamp
    Member
    Posted 1 year ago #

    You might get a clue by examining the file downloaded and compare it to the one you were expecting to get - at the binary level. You'll need a hex editor or similar to do this.

  8. Vincentda
    Member
    Posted 1 year ago #

    Thanks Whitelamp. I have no idea what i'm looking for. Do you think I could just install an old version of wp and wp-ecommerce and it would work?

  9. whitelamp
    Member
    Posted 1 year ago #

    Sure, for as long as it takes for someone to find it and hack it. If you run WordPress you *must* keep up to date.

  10. Vincentda
    Member
    Posted 1 year ago #

    Ok. thanks for the advice. What if I just tried to install an old version of wp-ecommerce.

    I haven't tried your solution. Where do I find the wpscadmin_download_file and wpsc_download_file

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic