• 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/

Viewing 9 replies - 1 through 9 (of 9 total)
  • 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();
    }

    Thread Starter jofefe

    (@jofefe)

    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.

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

    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.

    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?

    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.

    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?

    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.

    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

Viewing 9 replies - 1 through 9 (of 9 total)
  • The topic ‘Files downloaded by customers in my wp e-commerce are corrupt’ is closed to new replies.