Bug 850923 - "file -i" doesn't recognize PHP scripts
"file -i" doesn't recognize PHP scripts
Status: CLOSED NEXTRELEASE
Product: Red Hat Enterprise Linux 5
Classification: Red Hat
Component: file (Show other bugs)
5.10
Unspecified Linux
unspecified Severity low
: rc
: ---
Assigned To: Jan Kaluža
BaseOS QE Security Team
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2012-08-22 14:44 EDT by William Yardley
Modified: 2013-03-11 04:33 EDT (History)
0 users

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2013-03-11 04:33:34 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description William Yardley 2012-08-22 14:44:22 EDT
Description of problem:
"file -i" doesn't seem to have the right "magic" to recognize PHP scripts ("file" without -i does).
The builtin "magic.mime" file distributed with "file" doesn't seem to have anything pertaining to PHP.

/usr/share/file/magic does have some stuff to recognize PHP files.
Is this intentional, or just an oversight? The behavior seems to have changed in more recent Fedora / Redhat releases.


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

How reproducible:
Reproducible

Steps to Reproduce:
$ file -i /tmp/ldap.php.pdf

Actual results:
/tmp/ldap.php.pdf: text/plain; charset=us-ascii

Expected results:
/tmp/ldap.php.pdf: text/x-php; charset=us-ascii

Additional info:
My co-worker got the "expected results" above on a FC16 box with file 5.07-6.fc16. I haven't checked RHEL6 yet.
Comment 1 William Yardley 2012-08-22 14:46:41 EDT
[Obviously, in the example above, the example file "ldap.php.pdf" is a PHP script, not a PDF]
Comment 3 Jan Kaluža 2013-03-11 04:33:34 EDT
I am sorry, but it is now too late in the RHEL-5 release cycle.
RHEL-5.10 (the next RHEL-5 minor release) is going to be the first
production phase 2 [1] release of RHEL-5. Since phase 2 we'll be
addressing only security and critical issues.
This one issue is fixed in RHEL-6 therefore I am closing the bug as
NEXTRELEASE.

[1] https://access.redhat.com/support/policy/updates/errata/

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