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

d5

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)

Drupal multisite configuration

Drupal can do the following:

www.example.com
site1.example.com
site2.example.com
www.example.com/site3
www.example.com/site4

All these sites can use the same Drupal installation. The key is to point all of them at the same index.php file, which is in the root of the Drupal installation. This requires either a symbolic link to connect a site sub-directory to the installation directory, or Apache modification to do it. Once the request is received by Drupal, it will know which site to retrieve. /smoke and mirrors

WebFM icons

WebFM uses multiple methods for determining what type of file it is dealing with, and thus, what icon to display. When inserting a file into the database it used the php function mime_get_content to determine the type of file. If this function does not exist WebFM uses its own function to determine the mime type. This function is in the webfm_mime_types.inc file. Basically, it just goes by the file extension.