ID: 48885
User updated by: majkl578 at gmail dot com
Reported By: majkl578 at gmail dot com
-Status: No Feedback
+Status: Closed
Bug Type: Filesystem function related
Operating System: Linux Debian
PHP Version: 5.3.0
New Comment:
scottmac: Thank you, the constant you've added works like a charm.
philip: On my Debian server, libmagic1 library is in version 4.26-1.
mohdyusuf: try this:
------
$obj = new finfo(FILEINFO_MIME_TYPE);
echo $obj->file('/tmp/whatever');
------
Thank you.
Previous Comments:
------------------------------------------------------------------------
[2009-10-24 07:08:13] mohdyusuf at gmail dot com
I used to do a direct comparison, for example
if($mimeInfo = 'image/jpeg') ...
But then, with this changes, the comparison broke. Fortunately I have a
custom findStr() function that does the job.
if(findStr('image/jpeg',$mimeInfo)) ...
this solved my problem easily.
------------------------------------------------------------------------
[2009-08-04 01:00:01] php-bugs at lists dot php dot net
No feedback was provided for this bug for over a week, so it is
being suspended automatically. If you are able to provide the
information that was originally requested, please do so and change
the status of the bug back to "Open".
------------------------------------------------------------------------
[2009-07-27 05:26:20] [email protected]
Which version of libmagic changed this? It should be added to the docs.
Also, the docs don't mention how to link to libmagic nor mention that a
bundled version is used [by default]. What's the situation? The only
option I see with './configure --help' is --disable-fileinfo ...
------------------------------------------------------------------------
[2009-07-27 03:16:33] [email protected]
Automatic comment from SVN on behalf of scottmac
Revision: http://svn.php.net/viewvc/?view=revision&revision=286383
Log: Update documentation to reflect change with the internal libmagic
updates. See bug #48885
------------------------------------------------------------------------
[2009-07-27 02:55:44] [email protected]
Looked into this tonight again and from 5.3+ there are two new
constants available, FILEINFO_MIME_TYPE provides the old behavior.
I'll add them both to the documentation tonight.
------------------------------------------------------------------------
The remainder of the comments for this report are too long. To view
the rest of the comments, please view the bug report online at
http://bugs.php.net/48885
--
Edit this bug report at http://bugs.php.net/?id=48885&edit=1