Posted by Benzari.Alex@gmail.com on 04/26/06 13:40
What I want to do is use the FileInfo module as described in PHP
Architect's guide to security
I installed the extension under linux and it works just fine... and i
tried to install it on my windows machine that i use as a debug server
before posting the site on the Internet.
I installed the extension for php 5.1.2 from
http://pecl4win.php.net/list.php and created a php as described in the
PHP manual:
<?php
$finfo = finfo_open(FILEINFO_MIME); // return mime type ala mimetype
extension
foreach (glob("*.*") as $filename) {
echo $filename;
echo finfo_file($finfo, $filename) . "\n<br/>";
}
finfo_close($finfo);
?>
When i try to run the script I get the just the list of files and the
following error in the Apache Logs:
[Wed Apr 26 13:31:26 2006] [error] [client 127.0.0.1] PHP Warning:
finfo_open() [<a href='function.finfo-open'>function.finfo-open</a>]:
Failed to load magic database at '(null)'. in
I:\\WWW\\Apache2\\www\\docs\\join\\testFileInfo.php on line 2
Can anyone please help me??
[Back to original message]
|