php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #49878 Fileinfo functions not found
Submitted: 2009-10-14 17:08 UTC Modified: 2009-12-16 19:43 UTC
From: rob at apgood dot com Assigned:
Status: Not a bug Package: PHP options/info functions
PHP Version: 5.3SVN-2009-10-14 (snap) OS: Windows Serer 2003
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: rob at apgood dot com
New email:
PHP Version: OS:

 

 [2009-10-14 17:08 UTC] rob at apgood dot com
Description:
------------
Installed Windows binaries (php-5.3.0-Win32-VC6-x86.msi) with Fileinfo functions selected to be installed.  However, the very simple attached script results in error:
[Wed Oct 14 09:43:58 2009] [error] [client 173.10.71.237] PHP Fatal error:  Call to undefined function finfo_open() in D:\\Apache\\casetracker\\finfo1.php on line 2


Reproduce code:
---------------
<?php
$finfo = finfo_open(FILEINFO_MIME_TYPE); // return mime type ala mimetype extension
echo(finfo_file($finfo, 'favicon.ico'));
finfo_close($finfo);
?>


Expected result:
----------------
a mime-type description of:

"image/vnd.microsoft.icon"

or (less correctly):

"image/x-icon"


Actual result:
--------------
in error.log,

[Wed Oct 14 09:43:58 2009] [error] [client 173.10.71.237] PHP Fatal error:  Call to undefined function finfo_open() in D:\\Apache\\casetracker\\finfo1.php on line 2


Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2009-10-14 17:10 UTC] pajoye@php.net
Did you activate the extension via php.ini (see phpinfo();)?
 [2009-10-22 01:00 UTC] 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-12-16 19:34 UTC] rob at apgood dot com
in php.ini:
extension_dir = "C:\Program Files\PHP\ext"
extension=php_fileinfo.dll

dependencies:
C:\Program Files\PHP\ext\php_fileinfo.dll (exists)

<?php
if(!extension_loaded('fileinfo')) {
	die("fileinfo extension is not avaliable, please compile it.\n");
?>

output:
fileinfo extension is not avaliable, please compile it.
 [2009-12-16 19:39 UTC] pajoye@php.net
set the extension_dir correctly and use extension=php_fileinfo.dll.

Not a bug > bogus.
 [2009-12-16 19:40 UTC] rob at apgood dot com
Sorry for the long delay.  I rolled back to a prior version that supported mime_content_type().  Now, new functionality requires that I use 5.3 (this same function fails on 5.2, as well).  I searched the database and web and found similar descriptions, but none of the "fixes" I discovered worked for me.  I stepped up to 5.3.2-dev (which has the php_fileinfo.dll as part of the package), and it did not work, either.
 [2009-12-16 19:41 UTC] rob at apgood dot com
set the extension_dir to "ext" and to the fully-qualified path.  same result.
 [2009-12-16 19:43 UTC] pajoye@php.net
an absolute path....

Please ask further support in the php setup or php windows mailing list.

Thanks for your understanding,
 
PHP Copyright © 2001-2025 The PHP Group
All rights reserved.
Last updated: Thu Jul 03 08:01:34 2025 UTC