#33028 [Fbk->Opn]: mime_content_type returns inaccurate Office content types

2005-05-13 Thread matt at kanchi dot org
 ID:   33028
 User updated by:  matt at kanchi dot org
 Reported By:  matt at kanchi dot org
-Status:   Feedback
+Status:   Open
 Bug Type: Filesystem function related
 Operating System: OS X
 PHP Version:  4.3.10
 New Comment:

Gotcha.  It returns:

(filename): Microsoft Office Document


Previous Comments:


[2005-05-13 23:33:09] [EMAIL PROTECTED]

No, I meant running this command in console.



[2005-05-13 22:37:18] matt at kanchi dot org

Do you mean mime_content_type("file /path/to/file")?  If so, that
returns the error, "mime_magic: invalid mode 0156130."



[2005-05-13 21:37:46] [EMAIL PROTECTED]

Does this work: `file /path/to/file.ppt` ?



[2005-05-13 20:12:34] matt at kanchi dot org

Description:

Certain Office files do not return an accurate MIME content type with
mime_content_type.  Excel and Powerpoint, for example, return an
application/msword type, while Access returns text/plain.  Images,
text, and Word files return correctly.  These files were generated in
Office 2002 for Windows.

Configuration options:

--with-mime-magic

>From php.ini:

mime_magic
mime_magic support => enabled
Directive => Local Value => Master Value
mime_magic.magicfile => /usr/share/file/magic.mime =>
/usr/share/file/magic.mime

Reproduce code:
---
mime_content_type("/some/path/to/xls-file");
mime_content_type("/some/path/to/ppt-file");
mime_content_type("/some/path/to/mdb-file");

Expected result:

application/msexcel
application/mspowerpoint
application/msaccess

Or some variation (vnd, x-, etc.).

Actual result:
--
application/msword
application/msword
text/plain





-- 
Edit this bug report at http://bugs.php.net/?id=33028&edit=1


#33028 [Fbk->Opn]: mime_content_type returns inaccurate Office content types

2005-05-13 Thread matt at kanchi dot org
 ID:   33028
 User updated by:  matt at kanchi dot org
 Reported By:  matt at kanchi dot org
-Status:   Feedback
+Status:   Open
 Bug Type: Filesystem function related
 Operating System: OS X
 PHP Version:  4.3.10
 New Comment:

Do you mean mime_content_type("file /path/to/file")?  If so, that
returns the error, "mime_magic: invalid mode 0156130."


Previous Comments:


[2005-05-13 21:37:46] [EMAIL PROTECTED]

Does this work: `file /path/to/file.ppt` ?



[2005-05-13 20:12:34] matt at kanchi dot org

Description:

Certain Office files do not return an accurate MIME content type with
mime_content_type.  Excel and Powerpoint, for example, return an
application/msword type, while Access returns text/plain.  Images,
text, and Word files return correctly.  These files were generated in
Office 2002 for Windows.

Configuration options:

--with-mime-magic

>From php.ini:

mime_magic
mime_magic support => enabled
Directive => Local Value => Master Value
mime_magic.magicfile => /usr/share/file/magic.mime =>
/usr/share/file/magic.mime

Reproduce code:
---
mime_content_type("/some/path/to/xls-file");
mime_content_type("/some/path/to/ppt-file");
mime_content_type("/some/path/to/mdb-file");

Expected result:

application/msexcel
application/mspowerpoint
application/msaccess

Or some variation (vnd, x-, etc.).

Actual result:
--
application/msword
application/msword
text/plain





-- 
Edit this bug report at http://bugs.php.net/?id=33028&edit=1