How to download mp3 from a server containing xampp

Problems with the Windows version of XAMPP, questions, comments, and anything related.

How to download mp3 from a server containing xampp

Postby tiagoarcosta » 09. August 2014 02:20

I have a notebook containing xampp installed, whose configuration file httpd.conf apache contains the following passage:
--------------------------------------------------------------------------------------------------
ScriptAlias /Downloads/ "C:/Users/Name/Downloads/"
<Directory "C:/Users/Name/Downloads">
Require all granted
Options Indexes FollowSymLinks MultiViews
AllowOverride All
Order allow,deny
Allow from all
</Directory>
---------------------------------------------------------------------------------------------------
In the folder C:/Users/Name/Downloads/ contains "01.bat" and "01.mp3" files.
When typing in the browser's address "http://localhost/Downloads/01.bat", it downloads the file "01.bat" successfully.
The same does not happen when typing "http://localhost/Downloads/01.mp3" because it returns the message: "Internal Server Error (error 500)". In addition, the Apache error.log file displays the related "01.mp3" file error message:
---------------------------------------------------------------------------------------------------
[Fri Aug 08 20:57:49.404396 2014] [win32:error] [pid 1008:tid 1664] [client 127.0.0.1:37803] AH02102: C:/Users/Name/Downloads/01.mp3 is not executable; ensure interpreted scripts have "#!" or "'!" first line
[Fri Aug 08 20:57:49.405397 2014] [cgi:error] [pid 1008:tid 1664] (9)Bad file descriptor: [client 127.0.0.1:37803] AH01222: don't know how to spawn child process: C:/Users/Name/Downloads/01.mp3
---------------------------------------------------------------------------------------------------
What to do to download the file "01.mp3" by the browser?
tiagoarcosta
 
Posts: 3
Joined: 09. August 2014 01:56
Operating System: Windows 8 Single Language

Re: How to download mp3 from a server containing xampp

Postby Nobbie » 09. August 2014 13:21

tiagoarcosta wrote:What to do to download the file "01.mp3" by the browser?


Remove the "ScriptAlias" Directive, why did you do that? A ScriptAlias means, that all files are executable files (CGI). Why??

Or simply put 01.mp3 somewhere else. But i still cannot see, why you defined a ScriptAlias for the Download folder - this seems to be quite useless (and annoying as well).

P.S.: Anyway, this is very very strange configuration and environment. Are you planning to Download form and into the same folder? If the Download goes to C:/Users/Name/Downloads (what is standard behaviour), you copy an existing on itself?!?!

What is the idea of that configuration?
Nobbie
 
Posts: 13170
Joined: 09. March 2008 13:04

Problem solved!

Postby tiagoarcosta » 09. August 2014 19:16

Thank you, problem solved.

It was only replace "ScriptAlias​​" by "Alias​​" which solved.
tiagoarcosta
 
Posts: 3
Joined: 09. August 2014 01:56
Operating System: Windows 8 Single Language


Return to XAMPP for Windows

Who is online

Users browsing this forum: jeanneotts and 122 guests