Web design, programming, graphics, and pretty much anything else I care about.

mime

WebFM and mime types

WebFM calls the deprecated mime_content_type() function which returned the file type for MP4s as text/plain rather than video/mp4. The file /etc/httpd/conf/magic had to be modified by adding 2 lines:

4   string   ftypmp42   video/mp4
4   string   ftypisom   video/mp4

To verify that this worked:

echo "<?php echo mime_content_type('/mnt/video/PA/Walzer.hi.mp4'); ?>" | php

returned

video/mp4

(it returned text/plain before the change)