LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 04-20-2006, 04:06 PM   #1
MarcusG
LQ Newbie
 
Registered: Feb 2005
Location: New York City
Distribution: Slackware
Posts: 22

Rep: Reputation: 15
m4a corruption at download


I am hosting a private site so I can access a hard drive full of m4a files remotely. I can listen to these files directly off the usb hard drive no problem with linux apps or ms apps. These files are not protected. The site is apache running on slackware 10.2. The client-side computers are either Slackware 10.2 or windows XP—same problem for each. It is a secure/protected site for my listening pleasure. Everything seems to work perfectly. A php script reads the chosen file prompting a download/execute prompt in firefox. But when the m4a files are downloaded from the site they are corrupted. I ran md5sum (slackware md5) on the original and the downloaded m4a file to check for corruption; they are different. And each download of a particular m4a file is the same--ie. no variation in how a given file is corrupted. The downloaded files are also ~30 bits larger than the original of, say, 4.3 mb file. Each file is found and saved exactly as they are named with the m4a extension. Copying the m4a from the usb hard drive to a linux file causes no corruption. This is a high-speed connection.

Cause? Solution? Further tests?
What could the increase in filesize indicate? Evil headers? Any experience with this?
m4a files are evil and programmed to explode on download?
Am I missing something from the basic php script that would cause this (below)?
No media application that could play the originals can deal with the downloaded files.
Does not work with Firefox or IE or Konqueror.

$ctype=application/m4a;
header("Pragma: public");
header("Expires: 0");
header("Cache-Control: must-revalidate, post-check=0, pre-check=0");
header("Cache-Control: private",false);
header("Content-Type: $ctype");
header("Content-Disposition: attachment; filename=\"".basename($filename)."\";" );
header("Content-Transfer-Encoding: binary");
header("Content-Length: ".filesize($filename));
readfile("$filename");
exit();

PS: I want to make this work with my project. I don't want the solution to be "use ftp". This should not be happening.

-MarcusG
 
Old 04-21-2006, 09:30 AM   #2
UK MAdMaN
Member
 
Registered: Jul 2004
Location: Manchester, England
Distribution: Gentoo
Posts: 211

Rep: Reputation: 30
Does you have problems with any other types of files, e.g. jpegs?
 
Old 04-21-2006, 10:11 AM   #3
MarcusG
LQ Newbie
 
Registered: Feb 2005
Location: New York City
Distribution: Slackware
Posts: 22

Original Poster
Rep: Reputation: 15
I did not create the site to offer the selection and transfer of other types of files. If a jpeg downloads correctly, this signals what kind of problem? If a jpeg downloads incorrectly, this signals what kind of problem? I am not familiar with isolating the bugs in such circumstances. I am going to convert a selection of m4a files to mp3 files over the weekend and see what happens when they download. I suspect it will work. I wanted to avoid this conversion assuming the problem was caused by something missing in the download prompt script. The files are clearly transfering, just not intact.
 
Old 04-21-2006, 10:54 AM   #4
UK MAdMaN
Member
 
Registered: Jul 2004
Location: Manchester, England
Distribution: Gentoo
Posts: 211

Rep: Reputation: 30
If other file type downloads have problems, it would suggest either the download script or your RAM. To eliminate it being RAM, you'd download from another computer.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
converting m4a to mp3 jonfa Linux - General 77 06-24-2013 10:39 AM
Getting 1.3.1 amarok to play m4a neogeek23 Linux - Software 10 09-23-2006 02:10 PM
*.m4a ? JoeUser11 Linux - Newbie 5 04-16-2005 11:13 AM
Rhythmbox and M4A laurentbon Linux - Software 4 03-27-2005 01:17 AM
Can't get m4a files to play Xyre Linux - Software 20 09-08-2004 06:20 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 10:43 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration