you must compile php with the configure switch enablemimemagic to get support for mimetype functions the extension needs a copy of the magicmime as distributed with the file command this file also part of most recent linux distributions and usually stored in the usrsharemisc directory 