I failed to note that you're using PHP5, as I was testing in PHP4. When I switched the script over to PHP5, I started to notice issues with PHP5's mime_magic support.
Here's what I did. Uncomment the php_mime_magic.dll extension line in your php.ini file, then find this header:
;;;;;;;;;;;;;;;;;;;
; Module Settings ;
;;;;;;;;;;;;;;;;;;;
and add this directly after it:
[Mime Magic]
mime_magic.magicfile = c:/php/magic.mime
mime_magic.debug = Off
Make sure you replace the magicfile path with the correct path for your system.
What's curious is that I see this in my phpinfo output now: mime_magic support | invalid magic file, disabled. Despite its claim, mime_content_type() still works and indeed returned the correct value for an AVI file (using our modified version, with the new AVI stuff at the top).
EDIT: Okay, I found the issue that causes PHP5 to say it's an invalid MIME file, but it should still process it... mine appears to do so. The solution would be to point PHP to use the magic file provided by Apache2 (and add the AVI line to that, if you chose to do this).