sumfun1 Posted July 12, 2005 Share Posted July 12, 2005 When I run a test download of an mp3 everything works fine accept after the file is downloaded it changes from 3 to 4 mb in size to 4 to 600 kb and won't play. I have tried zipping and rar the file still the same. In downloads folder everything is correct in size. any help is greatly appreciated running osCommerce 2.2-MS2 with header tags contribution sumfun Link to comment Share on other sites More sharing options...
sumfun1 Posted July 16, 2005 Author Share Posted July 16, 2005 When I run a test download of an mp3 everything works fine accept after the file is downloaded it changes from 3 to 4 mb in size to 4 to 600 kb and won't play.I have tried zipping and rar the file still the same. In downloads folder everything is correct in size. any help is greatly appreciated running osCommerce 2.2-MS2 with header tags contribution sumfun <{POST_SNAPBACK}> Does anyone seem to have any help to this matter? I really hope so Sumfun Link to comment Share on other sites More sharing options...
user99999999 Posted July 16, 2005 Share Posted July 16, 2005 Are you using download by redirect? Link to comment Share on other sites More sharing options...
sumfun1 Posted July 16, 2005 Author Share Posted July 16, 2005 I have tried both through pay pal and after on the test, I even had a friend pay to test it same situation. Have a look you can select pay by check or money order and still receieve the download witout me allowing: its all a mess. Ill send someone 20 bucks if they can help. I have tried allowing shipped, processing you name it I have tried it. store for view to help Sumfun Link to comment Share on other sites More sharing options...
user99999999 Posted July 16, 2005 Share Posted July 16, 2005 Here is some info I posted before. http://www.oscommerce.com/forums/index.php?showtopic=150154 You will need to change catalog/includes/modules/downloads.php to check the order status. select orders_id, orders_status... if (orders_status < X) { //Payment not complete } else { //download links } There are two methods for downloading you select in admin->configure->downloads. If using download by redirect you need to do something to replace the tep_unlink_temp_dir function so it doesnt clobber download links in use by someone else like a cron job that deletes links 30min old If using the direct method the current readfile() reads the whole file in memory and will probably exceed the 2-4Meg script limit in php.ini. Below is an alternate code Also whenever sending header('Content-Type: NOT text/html) you can view the result file in your text editor because it may contain a php error message. catalog/download.php header('Content-Description: File Transfer'); header('Content-Type: application/octet-stream'); header('Content-Length: ' . filesize(DIR_FS_DOWNLOAD . $downloads['download_filename'])); header('Content-Disposition: attachment; filename=' . basename(DIR_FS_DOWNLOAD . $downloads['download_filename'])); $chunksize = 32 * 1024; $buffer = ''; $handle = fopen(DIR_FS_DOWNLOAD . $downloads['download_filename'], 'rb'); if ($handle === false) { die; } while (!feof($handle)) { $buffer = fread($handle, $chunksize); echo $buffer; } fclose($handle); Link to comment Share on other sites More sharing options...
Sierrab Posted August 24, 2005 Share Posted August 24, 2005 Error..Posting...Sorry Link to comment Share on other sites More sharing options...
Mediajuggle Posted August 24, 2005 Share Posted August 24, 2005 Also, I'd be wary of the legality of selling mp3's of major label artists which the majors in the US refuse to do. You could be heading for trouble. Nicely designed though... My Contribution Music Download Store Template http://www.oscommerce.com/community/contributions,4275 Link to comment Share on other sites More sharing options...
Sierrab Posted August 24, 2005 Share Posted August 24, 2005 Also, I'd be wary of the legality of selling mp3's of major label artists which the majors in the US refuse to do. You could be heading for trouble.Nicely designed though... <{POST_SNAPBACK}> Thanks Cartel, no problem with the label in this instance the artist owns his own label!! Now if only I could sort this issue with the size of the downloads causing grief, I could move on to the next store!! Link to comment Share on other sites More sharing options...
Mediajuggle Posted August 24, 2005 Share Posted August 24, 2005 Thanks Cartel, no problem with the label in this instance the artist owns his own label!!Now if only I could sort this issue with the size of the downloads causing grief, I could move on to the next store!! <{POST_SNAPBACK}> Hey Steve, As for the downloads legality... I was referring to sumfun1's site as he has R Kelly and Pussycat dolls downloads. Are you having problems with the downloading of the mp3 or the Flac files? My Contribution Music Download Store Template http://www.oscommerce.com/community/contributions,4275 Link to comment Share on other sites More sharing options...
Sierrab Posted August 24, 2005 Share Posted August 24, 2005 Hey Steve,As for the downloads legality... I was referring to sumfun1's site as he has R Kelly and Pussycat dolls downloads. Are you having problems with the downloading of the mp3 or the Flac files? <{POST_SNAPBACK}> The FLAC files, the MP3 for the most part are fine Steve Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.