Re: [PHP] fileinfo returning wrong mime type for Excel files

2009-07-31 Thread Ashley Sheridan
On Thu, 2009-07-30 at 21:26 -0400, b wrote: > On 07/30/2009 10:15 AM, Ashley Sheridan wrote: > > On Thu, 2009-07-30 at 07:12 -0700, Christoph Boget wrote: > >> > >> You could email it to me, which I presume is better if you replied > >> back just to me and not the list? > >> > > Just copying the l

Re: [PHP] fileinfo returning wrong mime type for Excel files

2009-07-30 Thread b
On 07/30/2009 10:15 AM, Ashley Sheridan wrote: On Thu, 2009-07-30 at 07:12 -0700, Christoph Boget wrote: >> You could email it to me, which I presume is better if you replied back just to me and not the list? Just copying the list back on in this one now. I don't know of any places that you c

Re: [PHP] fileinfo returning wrong mime type for Excel files

2009-07-30 Thread Ashley Sheridan
gt; > thnx, > Chris > > > __ > From: Ashley Sheridan > To: Christoph Boget > Sent: Thursday, July 30, 2009 10:05:33 AM > Subject: Re: [PHP] fileinfo returning wrong mime type for Excel files > > On Thu, 2009-07-30 at 07:04 -0700, Christoph B

RE: [PHP] fileinfo returning wrong mime type for Excel files

2009-07-30 Thread Bob McConnell
From: Christoph Boget >> Have you tried using 'file -i' from the command line: after all you are looking >> for a MIME type with your fileinfo... >> Having said that, with file -i on my system, Word documents are >> 'application/msword' and Excel files are 'application/octet-stream' > > $ file -i

Re: [PHP] fileinfo returning wrong mime type for Excel files

2009-07-30 Thread Christoph Boget
> The xls file I am using was generated with Excel (of Office 2007) for > the Mac.  So either you have a different magic file (assuming that's > what the file command uses) than I do or different versions of excel > contain different information. I just tried using an excel spreadsheet saved using

Re: [PHP] fileinfo returning wrong mime type for Excel files

2009-07-30 Thread Ashley Sheridan
On Thu, 2009-07-30 at 09:51 -0400, Christoph Boget wrote: > >> Having said that, with file -i on my system, Word documents are > >> 'application/msword' and Excel files are 'application/octet-stream' > > Fedora11 (2.6.29.6-213.fc11.i586) > > $ file excel.xls > > excel.xls: CDF V2 Document, Little E

Re: [PHP] fileinfo returning wrong mime type for Excel files

2009-07-30 Thread Christoph Boget
>> Having said that, with file -i on my system, Word documents are >> 'application/msword' and Excel files are 'application/octet-stream' > Fedora11 (2.6.29.6-213.fc11.i586) > $ file excel.xls > excel.xls: CDF V2 Document, Little Endian, Os: Windows, Version 5.1, Code > page: 1252, Author:

Re: [PHP] fileinfo returning wrong mime type for Excel files

2009-07-30 Thread Christoph Boget
> Have you tried using 'file -i' from the command line: after all you are > looking > for a MIME type with your fileinfo... > Having said that, with file -i on my system, Word documents are > 'application/msword' and Excel files are 'application/octet-stream' $ file -i excel.xls excel.xls: applic

Re: [PHP] fileinfo returning wrong mime type for Excel files

2009-07-30 Thread b
On 07/30/2009 08:53 AM, Peter Ford wrote: Have you tried using 'file -i' from the command line: after all you are looking for a MIME type with your fileinfo... Having said that, with file -i on my system, Word documents are 'application/msword' and Excel files are 'application/octet-stream'

Re: [PHP] fileinfo returning wrong mime type for Excel files

2009-07-30 Thread Peter Ford
Christoph Boget wrote: >>> /usr/share/file/magic >> /usr/share/file/magic has lots of rules to know its type and its just >> matching it. > > I know it has a lot of rules. Grepping it for excel shows that there > are rules in it for those types of files as well. > >> Maybe your file is quite str

Re: [PHP] fileinfo returning wrong mime type for Excel files

2009-07-30 Thread Christoph Boget
> > /usr/share/file/magic > /usr/share/file/magic has lots of rules to know its type and its just > matching it. I know it has a lot of rules. Grepping it for excel shows that there are rules in it for those types of files as well. > Maybe your file is quite strange . have you tried with other x

Re: [PHP] fileinfo returning wrong mime type for Excel files

2009-07-29 Thread Paul M Foster
On Wed, Jul 29, 2009 at 05:15:38PM -0400, Christoph Boget wrote: > Consider the following: > > $finfo = finfo_open( FILEINFO_MIME, '/usr/share/file/magic' ); > if( $finfo ) > { > $mimeType = finfo_file( $finfo, '/path/to/my/excel.xls' ); > finfo_close($