Jump to content

Digital Download Error


Guest blinton25

Recommended Posts

Guest blinton25

Hello,

Getting this error message when a user tried to click a digital download:

<br />

<b>Warning</b>:  filesize(): Stat failed for carimusic/misc/2.asx (errno=2 - No such file or directory) in <b>/home/httpd/vhosts/earlphil.com/httpdocs/carimusic/download.php</b> on line <b>64</b><br />

<br />

<b>Warning</b>:  Cannot modify header information - headers already sent by (output started at /home/httpd/vhosts/earlphil.com/httpdocs/carimusic/download.php:64) in <b>/home/httpd/vhosts/earlphil.com/httpdocs/carimusic/download.php</b> on line <b>64</b><br />

<br />

<b>Warning</b>:  Cannot modify header information - headers already sent by (output started at /home/httpd/vhosts/earlphil.com/httpdocs/carimusic/download.php:64) in <b>/home/httpd/vhosts/earlphil.com/httpdocs/carimusic/download.php</b> on line <b>67</b><br />

<br />

<b>Warning</b>:  readfile(carimusic/misc/2.asx): failed to open stream: No such file or directory in <b>/home/httpd/vhosts/earlphil.com/httpdocs/carimusic/download.php</b> on line <b>68</b><br />

Under product type I tried both:

carimusic/misc/2.asx

and

/home/httpd/vhosts/earlphil.com/httpdocs/carimusic/misc/2.asx

but got the same error.

Any idea why this is occuring?

Link to comment
Share on other sites

Guest reeko357

Same here.

It's driving me crazy.

<br />

<b>Warning</b>:  filesize(): Stat failed for home/USERNAME/downloads/overstanding160.mp3 (errno=2 - No such file or directory) in <b>/home/USERNAME/public_html/carboncube/download.php</b> on line <b>64</b><br />

<br />

<b>Warning</b>:  Cannot modify header information - headers already sent by (output started at /home/USERNAME/public_html/carboncube/download.php:64) in <b>/home/USERNAME/public_html/carboncube/download.php</b> on line <b>64</b><br />

<br />

<b>Warning</b>:  Cannot modify header information - headers already sent by (output started at /home/USERNAME/public_html/carboncube/download.php:64) in <b>/home/USERNAME/public_html/carboncube/download.php</b> on line <b>67</b><br />

<br />

<b>Warning</b>:  readfile(home/USERNAME/downloads/overstanding160.mp3): failed to open stream: No such file or directory in <b>/home/USERNAME/public_html/carboncube/download.php</b> on line <b>68</b><br />




Here's the download.php, does this look right?




mySQLSafe(base64_decode($_GET['oid']))." AND ".$glob['dbprefix']."CubeCart_Downloads.productId = ".$db->mySQLSafe($_GET['pid'])." AND accessKey = ".$db->mySQLSafe($_GET['ak'])." AND noDownloads<".$config['dnLoadTimes']." AND  expire>".time();

        

        $download = $db->select($query);

        

        if($download == TRUE){

        

                if(eregi("ftp://",$download[0]['digitalDir']) || eregi("http://",$download[0]['digitalDir']) || eregi("https://",$download[0]['digitalDir'])){

                

                $record['noDownloads'] = "noDownloads + 1";

                $where = "cart_order_id = ".$db->mySQLSafe(base64_decode($_GET['oid']))." AND productId = ".$db->mySQLSafe($_GET['pid'])." AND accessKey = ".$db->mySQLSafe($_GET['ak']);

                $update = $db->update($glob['dbprefix']."CubeCart_Downloads", $record, $where);

                

                header("Location: ".$download[0]['digitalDir']);

                exit;

                

                } else {

                

                $record['noDownloads'] = "noDownloads + 1";

                $where =  "cart_order_id = ".$db->mySQLSafe(base64_decode($_GET['oid']))." AND ".$glob['dbprefix']."CubeCart_Downloads.productId = ".$db->mySQLSafe($_GET['pid'])." AND accessKey = ".$db->mySQLSafe($_GET['ak']);

                

                $update = $db->update($glob['dbprefix']."CubeCart_Downloads", $record, $where);

                

                header("Cache-Control: must-revalidate, post-check=0, pre-check=0");

                header("Content-Type: application/octet-stream");

                header("Content-Length: " . filesize($download[0]['digitalDir']));

                $filename = explode("/",$download[0]['digitalDir']);

                $parts = count($filename);

                header("Content-Disposition: attachment; filename=".$filename[$parts-1]);

                readfile($download[0]['digitalDir']);

                exit;

                

                }

        

        

        } else {

        

        header("Location: index.php?act=dnExpire");

        exit;

        }

        

?>

Any Help?

TIA

Link to comment
Share on other sites

Guest blinton25

Hello,

I got it resolved by using the url to the file (http://domainname/filename.exe), the link was still obfuscated, which was my main concern.

Link to comment
Share on other sites

Guest reeko357

It works fine in a public folder...but on my end..the link was as clear as day.

I've already got people attempting fraudulent purchases. I don't want to give them any room to start snooping around :D

What bothers me is that I have it working on one server (non cpanel) and not the other (cpanel)

I wonder if safe mode has anything to do with it?

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...