php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #26064 error msg without sense: Warning: mime_magic: invalid type 0 in mconvert(). in
Submitted: 2003-10-31 16:02 UTC Modified: 2003-11-04 06:38 UTC
From: e05 at freemails dot ch Assigned:
Status: Not a bug Package: Unknown/Other Function
PHP Version: 4.3.3 OS: Linux 2.4.20 (Debian)
Private report: No CVE-ID: None
 [2003-10-31 16:02 UTC] e05 at freemails dot ch
Description:
------------
Well, there isn?t much to tell. The error message is:
Warning: mime_magic: invalid type 0 in mconvert(). in /foo/bar.php on line 2

mconvert doesn?t seems to be a public funktion as http://www.php.net/mconvert didn?t work.

Reproduce code:
---------------
<?php
$result = mime_content_type("/usr/bak/foobar.avi");
 ?>


Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2003-10-31 16:43 UTC] iliaa@php.net
Would it be possible for you to make the avi file in question avaliable?
 [2003-11-01 04:09 UTC] e05 at freemails dot ch
mhhhh....
1st this seems to happen to all files
2nd the avi is too large (190 MB)

but I tried to write a test script:
<?php 
var_dump(mime_content_type('/home/e05/file1.avi'));
print "<hr>\n";
var_dump(mime_content_type('/home/e05/file2.mov'));
print "<hr>\n";
var_dump(mime_content_type('/home/e05/file3.zip'));
print "<hr>\n";
var_dump(mime_content_type('/home/e05/file4.rm'));
print "<hr>";
 ?>
The intresting point seems to be the output.
Warning: mime_magic: invalid type 0 in mconvert(). in /home/ck/lamp/public_html/filemanager/bugtest1.php on line 2
(repeats about more than hundred times each line with a mime_content_type call! while ignoring print "<hr>\n";)

the end is that the last mime_content_type returns a value after a lot warnings:
string(19) "application/x-troff"
The only print "<hr>\n"; that seems to be executed works there.
 [2003-11-02 15:59 UTC] iliaa@php.net
Sorry, but your problem does not imply a bug in PHP itself.  For a
list of more appropriate places to ask for help using PHP, please
visit http://www.php.net/support.php as this bug system is not the
appropriate forum for asking support questions. 

Thank you for your interest in PHP.

Sounds like a problem with your magic file used by the mime_magic extension.
 [2003-11-04 06:38 UTC] e05 at freemails dot ch
well, it sounds like the mistake is mine but the error message is not really usefull :(
I would preffer an error message that says "Hey, you?ve got a problem magic file" (well, something like that; And I have to check that)
But the error messages is really useless!
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Mon Jun 17 17:01:29 2024 UTC