title: PHP 5.3.5 fileinfo() MIME Type for MS Office 2007 files - magic.mime updates?
body: <p>On a PHP upload, I'm trying to validate the MIME Type of the files being uploaded to match a valid set of MIME types for the application.  When attempting to use the fileinfo() to determine the MIME type of an Office 2007 file it is NOT detecting as their appropriate MIME Types.  Instead the MIME type response is &quot;application/zip&quot;</p>
  <p><strong>Office Document MIME types:</strong>
  <a href="http://filext.com/faq/office_mime_types.php" rel="nofollow noreferrer">http://filext.com/faq/office_mime_types.php</a></p>
  <p><strong>Example PHP Code:</strong></p>
  <blockquote>
  <p>$oFileInfo = new finfo( FILEINFO_MIME_TYPE );</p>
  <p>$sMimeType = $oFileInfo -&gt; file( $_FILES['Filedata']['tmp_name'] );</p>
  <p>echo $sMimeType;</p>
  </blockquote>
  <p><strong>Server Setup Info:</strong></p>
  <ul>
  <li>OS:  Windows Server 2003 32-bit</li>
  <li>Webserver: IIS 6.0</li>
  <li>PHP: 5.3.5 (Thread Safe) using FastCGI 1.5</li>
  <li>File: magic.mime
  <ul>
  <li>Example by darko at uvcms dot com 16-Apr-2008 09:35
  <ul>
  <li>Link: php.net/manual/en/fileinfo.installation.php</li>
  </ul>
  </li>
  <li>Size: 517 KB</li>
  <li>Source: Source Forge: GNU32 - FileType gnuwin32.sourceforge.net/packages/filetype.htm</li>
  </ul>
  </li>
  </ul>
  <p>I've found numerous posts which refer to issues with the newer Office format when downloading from a webserver.  In all these examples I haven't found anywhere that illustrates a manor of adding the new MIME types to an existing magic.mime file, or a link to a magic.mime file that already contains the Microsoft Office 2007+ MIME types.  Thanks for your assistance.</p>