Package: file
Version: 4.20-1
Severity: important

Recently the following section was added to /usr/share/file/magic.mime

8<----------------------------------------------------------------
# TeX documents, from Daniel Quinlan ([EMAIL PROTECTED])
0       search/400      \\input         text/x-tex
0       search/400      \\section       text/x-tex
0       search/400      \\setlength     text/x-tex
0       search/400      \\documentstyle text/x-tex
0       search/400      \\chapter       text/x-tex
0       search/400      \\documentclass text/x-tex
---------------------------------------------------------------->8

As Apache2 uses this file in mod_mime_magic this will cause, PHP to
generate the following warnings:

[25-Mar-2007 14:09:38] PHP Warning:  mime_magic: type search/400
\\setlength     text/x-tex invalid in Unknown on line 0
[25-Mar-2007 14:09:38] PHP Warning:  mime_magic: type search/400
\\documentstyle text/x-tex invalid in Unknown on line 0
[25-Mar-2007 14:09:38] PHP Warning:  mime_magic: type search/400
\\chapter       text/x-tex invalid in Unknown on line 0
[25-Mar-2007 14:09:38] PHP Warning:  mime_magic: type search/400
\\documentclass text/x-tex invalid in Unknown on line 0
[25-Mar-2007 14:10:02] PHP Warning:  mime_magic: type search/400
\\input         text/x-tex invalid in Unknown on line 0
[25-Mar-2007 14:10:02] PHP Warning:  mime_magic: type search/400
\\section       text/x-tex invalid in Unknown on line 0
[25-Mar-2007 14:10:02] PHP Warning:  mime_magic: type search/400
\\setlength     text/x-tex invalid in Unknown on line 0
[25-Mar-2007 14:10:02] PHP Warning:  mime_magic: type search/400
\\documentstyle text/x-tex invalid in Unknown on line 0
[25-Mar-2007 14:10:02] PHP Warning:  mime_magic: type search/400
\\chapter       text/x-tex invalid in Unknown on line 0
[25-Mar-2007 14:10:02] PHP Warning:  mime_magic: type search/400
\\documentclass text/x-tex invalid in Unknown on line 0

If you thus have a heavily used webserver, on which you have enabled
warnings to allow you to catch them, even in a production environment
(as certain paths of your code might not be run otherwise) your php
logging file will be flushed by the above.

This bug SHOULD probably be filed against Apache2/PHP though. I guess the
biggest issue is that they are using the file on their own, instead of
using the magic library to parse it. Please re-assign where needed.
I chose to file it against libmagic1 as that introduced this change and
it might have an effect on other programs depending on this file.

Note that at least 46 packages depend on libmagic1:
$ apt-cache rdepends libmagic1 | wc -l
46

Every one of them might have issues with this change.

As a quick fix I uncommented the search/400 lines in my local version.
(I recall btw that some time ago a similar construct was included but it
has been removed since then, I don't know what the resolution for that
was though)

Greets,
 Jeroen

-- System Information:
Debian Release: 4.0
  APT prefers unstable
  APT policy: (500, 'unstable'), (500, 'testing')
Architecture: i386 (i686)
Shell:  /bin/sh linked to /bin/bash
Kernel: Linux 2.6.15-1-686-smp
Locale: LANG=C, LC_CTYPE=C (charmap=ANSI_X3.4-1968)

Versions of packages libmagic1 depends on:
ii  libc6                       2.3.6.ds1-13 GNU C Library: Shared libraries
ii  zlib1g                      1:1.2.3-13   compression library - runtime

libmagic1 recommends no packages.

Versions of packages file depends on:
ii  libc6                       2.3.6.ds1-13 GNU C Library: Shared libraries

-- no debconf information


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]

Reply via email to