Re: Mime-type handling

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



mime types are very unreliable and should never be used for file type
authentication (they can also be faked by users).  Instead you could try
using the extension of the file or an identifying statement in the file.

On 12/8/05, Manuel Vacelet <manuel.vacelet@xxxxxxxxx> wrote:
>
> Hi all,
>
> I'm facing a bad behaviour of 'file' command used by fileinfo PECL module
> (recommanded for mime-type checking):
> * Some Microsoft Excel documents are detected as Microsoft Word documents
> * Some HTML files are just text/plain
> * ...
>
> I tested on multiple machines (with different version of file) and I
> sometimes obtain a diffrent behaviour but never the one expected :/ I also
> looked for the latest version of file but it seems that the file used to
> detect the mime-type is out of date...
>
> My questions are:
> * If you already encounter this problem, how did you solve it ?
> * Where can I find an up-to-date version of magic number list usable with
> file for mime type checking ?
>
> Thanks,
> Regards,
> Manuel
>
>

[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux