How do I add MIME file types?

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

How do I add MIME file types?

Postby wtd » 29. October 2012 15:20

I am running a HTML5 video on my test index.php page in XAMPP and the video played one time only when I launched the page for the very first time in XAMPP, but will not play any more, even after a page reload or even closing the browser and trying again. I recall that I had this issue on my paid web hosting site where the actual page is and they told me to:
"Please, add these types to .htaccess or hosting server:"

AddType audio/ogg oga ogg
AddType video/ogg ogv
AddType video/mp4 .mp4
AddType video/webm .webm

I did and the video played. Question is, do I need to add these video MIME file types in XAMPP and how?

Thanks!!
wtd
 
Posts: 3
Joined: 29. October 2012 15:03
XAMPP Version: 5.6.3
Operating System: Windows 7 Pro 64-bit

Re: How do I add MIME file types?

Postby Altrea » 29. October 2012 18:41

Hi wtb (there is ALWAYS time for a short salutation, especially if you are asking for help on a volunteer community board. You are expecting polite answeres i guess, so please be polite too),

wtd wrote:AddType audio/ogg oga ogg
AddType video/ogg ogv
AddType video/mp4 .mp4
AddType video/webm .webm
[...]
do I need to add these video MIME file types in XAMPP and how?

In your file \xampp\apache\conf\mime.types which is already included and active are most of this MIME-Types already listed exept for webm.

best wishes,
Altrea
We don't provide any support via personal channels like PM, email, Skype, TeamViewer!

It's like porn for programmers 8)
User avatar
Altrea
AF Moderator
 
Posts: 6583
Joined: 17. August 2009 13:05
XAMPP Version: 5.5.19
Operating System: W7Ux64

Re: How do I add MIME file types?

Postby wtd » 30. October 2012 01:49

Altrea wrote:Hi wtb (there is ALWAYS time for a short salutation, especially if you are asking for help on a volunteer community board. You are expecting polite answeres i guess, so please be polite too),

wtd wrote:AddType audio/ogg oga ogg
AddType video/ogg ogv
AddType video/mp4 .mp4
AddType video/webm .webm
[...]
do I need to add these video MIME file types in XAMPP and how?

In your file \xampp\apache\conf\mime.types which is already included and active are most of this MIME-Types already listed exept for webm.

best wishes,
Altrea


"Mr." Altrea,

I take offense and find it actually shocking that you would in any way think that I am not being polite! Nothing in my post is impolite! Actually your reply is impolite and immature to suggest that I need to "ALWAYS" take time for a short salutation. Get real...it's just a forum, not a letter to the president of the US! This is the first time I have posted on the forum and there are many posts that do not have a "short salutation"! You really need think before you post something that can really offend someone and that is not being polite or mature! For example, your reply contains an ending signature: "It's like porn for programmers 8)" Here's my signature that I use on my email "There is no freedom like not having to impress everybody. - @JoyceMeyer"

A forum is a place to discuss and respond to questions and sometimes, again, because it's just a forum and not a formal letter, failing to use a short salutation is not a lack of not being polite. I am an adult and your opening statement was very immature, impolite and justify's an apology.

I hope my reply is not deleted and that other people on this forum way in on this. If it is deleted, that say's a lot. I have my copy.

Now back to my question I posted. Your answer fails to tell me if I can add webm and how?



Again, I greatly appreciate any help from you and others and I thank you!

Sincerely,

wtd
wtd
 
Posts: 3
Joined: 29. October 2012 15:03
XAMPP Version: 5.6.3
Operating System: Windows 7 Pro 64-bit

Re: How do I add MIME file types?

Postby JJ_Tagy » 30. October 2012 02:22

You missed his answer inside. All your mime types are already in the mime.types file except for the webm. Just add it to the existing file.

The other thing is, what browser are you using to try and play the video? According to W3, certain browsers only support certain video types. http://www.w3schools.com/html/html5_video.asp
JJ_Tagy
 
Posts: 536
Joined: 30. January 2012 13:44
XAMPP Version: 1.8.3
Operating System: Windows 7 x64

Re: How do I add MIME file types?

Postby wtd » 30. October 2012 02:43

JJ_Tagy wrote:You missed his answer inside. All your mime types are already in the mime.types file except for the webm. Just add it to the existing file.

The other thing is, what browser are you using to try and play the video? According to W3, certain browsers only support certain video types. http://www.w3schools.com/html/html5_video.asp


Hey JJ,

Thanks for your help. I am using Firefox 16.02 and my site that's on my paid host account plays the video fine in all browsers when I added these mime video types for HTML5 video. I am just running locally (for web site testing and design changes) XAMPP, but like I said it played the video one time only the very first time I loaded my site and now it will not play the video when using XAMPP. I made no changes anywhere. Very strange. That's when I remembered a long time ago that my paid web host told me to add those HTML5 video mime type to the .htaccess

I am assuming that's why it will not play. I even tried Chrome, IE, Opera and Safari. I also have not made any changes with any files yet to my site. It stopped working after the first test launch and quit.

I am at loss as to how to add the mime type like webm?

Your help is greatly appreciated!

wtd
wtd
 
Posts: 3
Joined: 29. October 2012 15:03
XAMPP Version: 5.6.3
Operating System: Windows 7 Pro 64-bit

Re: How do I add MIME file types?

Postby JJ_Tagy » 30. October 2012 03:06

Assuming you installed xampp in C:, you would navigate to C:\xampp\apache\conf and edit the file called mime.types with your favorite text editor. Go to the bottom somewhere around line 1057 and add your webm entry (without the dot). Use the existing items as an example.
JJ_Tagy
 
Posts: 536
Joined: 30. January 2012 13:44
XAMPP Version: 1.8.3
Operating System: Windows 7 x64

Re: How do I add MIME file types?

Postby Altrea » 30. October 2012 06:17

Hi wtd,

My mother always told me to use the words "Hello", "Please", "Thank you" and "Good Bye". And thats the amount of politeness i am expecting here too. As i said, we are all volunteers here. We are spending our freetime here trying to solve problems we don't have on our own. It doesn't cost you more then 5 Seconds to write down a Hello in the first line. I don't think that i expect too much here.

Just because this is a virtual place here doesn't mean that the conversation rules are different than the ones when you meet something on the street or in an office. I don't believe that your first sentence if you are calling an IT support hotline is "My computer is showing the message...", you will probably start with "Hello, my name is ... I am having a weird problem with my computer". Behind every computer here is a human being typing on his keyboard. Please take this in mind.

best wishes,
Altrea
We don't provide any support via personal channels like PM, email, Skype, TeamViewer!

It's like porn for programmers 8)
User avatar
Altrea
AF Moderator
 
Posts: 6583
Joined: 17. August 2009 13:05
XAMPP Version: 5.5.19
Operating System: W7Ux64


Return to XAMPP for Windows

Who is online

Users browsing this forum: No registered users and 25 guests