On Tue, Jun 21, 2011 at 07:41:36PM -0700, Ray Van Dolson wrote: > Running MediaWiki 1.16 on a RHEL5.x server (PHP 5.1.x.) and am trying > to find the "best" way to handle .docx and other compressed file > formats. > > I can of course use $wgVerifyMimeType = false, but I'd rather find a > way to handle this differently. > > Is this something that might be handled better if I updated to PHP 5.3 > (RHEL5 provides a supported version)? If it relies on the MIME magic > files from the "file" utility still, I'm guessing it still won't > work... > > Debug logs show the following: > > MimeMagic::__construct: loading mime types from > /srv/syswiki.esri.com/wiki/includes/mime.types > MimeMagic::__construct: loading mime info from > /srv/syswiki.esri.com/wiki/includes/mime.info > MimeMagic::doGuessMimeType: ZIP header present at end of /tmp/phpESAce0 > MimeMagic::detectZipType: > /^mimetype(application\/vnd\.oasis\.opendocument\.(?:chart-template|chart|formula-template|formula|graphics-template|graphics|image-template|image|presentation-template|presentation|spreadsheet-template|spreadsheet|text-template|text-master|text-web|text))/ > MimeMagic::detectZipType: unable to identify type of ZIP archive > MimeMagic::guessMimeType: final mime type of /tmp/phpESAce0: application/zip > MediaHandler::getHandler: no handler found for application/zip. > File::getPropsFromPath: /tmp/phpESAce0 loaded, 177153 bytes, application/zip. > MacBinary::loadHeader: header bytes 0 and 74 not null > MimeMagic::doGuessMimeType: ZIP header present at end of /tmp/phpESAce0 > MimeMagic::detectZipType: > /^mimetype(application\/vnd\.oasis\.opendocument\.(?:chart-template|chart|formula-template|formula|graphics-template|graphics|image-template|image|presentation-template|presentation|spreadsheet-template|spreadsheet|text-template|text-master|text-web|text))/ > MimeMagic::detectZipType: unable to identify type of ZIP archive > MimeMagic::guessMimeType: final mime type of /tmp/phpESAce0: application/zip > > It's somewhat odd that FileInfo isn't being used (I have the extension > installed, showing up in phpInfo() and also $wgLoadFileinfoExtension = > true is set). > > Any thoughts or ideas would be appreciated.
Apologies for replying to my own post, but it looks like this may have been addressed[1] although the modified code is certainly not present in my 1.16 version (perhaps this fix is only in 1.17+?). Ray [1] https://bugzilla.wikimedia.org/show_bug.cgi?id=24073 _______________________________________________ MediaWiki-l mailing list [email protected] https://lists.wikimedia.org/mailman/listinfo/mediawiki-l
