473,405 Members | 2,334 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,405 software developers and data experts.

FileInfo extension error (Windows)

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.ph p on line 2

Can anyone please help me??

Apr 26 '06 #1
0 1702

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

5
by: jman | last post by:
I have an urgent question. I have written a .Net C# windows services that has only one key purpose: to move files from the machine that is running the service to a network download server for...
2
by: John Bowman | last post by:
Hi All, ..NET 1.1... I'm wondering if there is any approach more convenient to get a list of FileInfo objects than the following. For example, if I wanted to get 1 list of all the Exe's and all...
7
by: kids_pro | last post by:
I found FileInfo expose alot of methods & properties. However I can't get FileType from FileInfo I can only get File extension. How can I get fileType any build-in library allow me to do that?...
5
by: mike | last post by:
Hi, I have been playing with VB.NET/C# for getting some general properties of a fileinfo object. However, FileInfo object does not seem to expose some of the basic properties like TYPE that used...
0
by: noel.whelan | last post by:
Currently trying to install php_fileinfo.dll for version 5.0.5 on windows: http://pecl4win.php.net/ext.php/php_fileinfo.dll I've copied this into c:\php\ext\php_fileinfo.dll, and included the...
1
by: Swoopy | last post by:
I am trying to install the Fileinfo pecl extension, on CentOS 4.5, with php 5.2.3. After running the following command I get: # pecl install fileinfo downloading Fileinfo-1.0.4.tgz ......
4
by: bob | last post by:
I am having trouble getting the PHP PECL fileinfo component to work. I am using Cakephp 1.2, XAMPP in WIndows Vista environment. I have the following code: $file =...
1
by: bob | last post by:
I am having trouble getting the PHP PECL fileinfo component to work. I am using Cakephp 1.2, XAMPP in WIndows Vista environment. I have the following code: $file =...
6
by: tinman77 | last post by:
Hello, I'm having a terrible time using the functions finfo_open and finfo_file. I'm using PHP 5 on IIS 5.1 and Windows XP. I have enabled php_mime_magic.dll and php_fileinfo.dll and also added...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.