Bug 221643 - magic file causes PHP warning
Summary: magic file causes PHP warning
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: Red Hat Enterprise Linux 5
Classification: Red Hat
Component: file
Version: 5.0
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
: ---
Assignee: Tomas Smetana
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2007-01-05 20:01 UTC by William Yardley
Modified: 2008-05-27 09:24 UTC (History)
1 user (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2008-05-27 09:24:11 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description William Yardley 2007-01-05 20:01:13 UTC
Description of problem:
The following lines in /usr/share/magic / /usr/share/file/magic:
# update to distinguish from *.vcf files#0      regex                           
# [^'"]BEGIN[[:space:]]*[{]       awk script text                               

appear to generate PHP warnings in certain circumstances:
PHP Warning:  mime_magic: type regex  BEGIN[[:space:]]*[{] application/x-awk  
invalid in Unknown on line 0

(I believe it also generates a warning with other programs that use this file)

Version-Release number of selected component (if applicable):
file-4.17-8

Comment 1 Tomas Smetana 2007-12-11 11:51:35 UTC
So you're saying that PHP can't parse the magic file correctly?  I really don't
think there is something to fix on file's side.

Comment 2 William Yardley 2007-12-12 01:41:51 UTC
(In reply to comment #1)
> So you're saying that PHP can't parse the magic file correctly?  I really don't
> think there is something to fix on file's side.

Well it's a year later, so I don't remember that well (and to be honest, I don't
understand the way the magic file works well enough to know if the issue is with
a syntax error in the file, or with PHP not parsing it properly). I do seem to
remember (based on the comment above) that there were some other applications
barfing on this.

btw, the hash mark / comment at the beginning of the line is ours, so in the
actual file as distributed by Red Hat, that's not there.

Ultimately, if you believe the issue is with another component, feel free to
move this bug there. I created the bug under file since I believed the problem
was with the magic file, and since that package owns that file.

Comment 3 Tomas Smetana 2008-05-27 09:24:11 UTC
A forgotten bugreport...  Based on comment #2 -- closing.


Note You need to log in before you can comment on or make changes to this bug.