Although this is not how to related to horde, I am posting this here as fileinfo is quite useful and I couldnt get it working for quite some time.
1. Read the /horde/doc/INSTALL
2. pear install fileinfo-beta will not work on RHEL without the following package.
3. Get the latest file package from ftp://ftp.gw.com/mirrors/pub/unix/file/
4. Install it with ./configure --prefix=/usr && make && make install
5. then pear install fileinfo-beta note: it is now changed to pecl install fileinfo-beta
6. Add the following in php.ini
;Magic mime time mime_magic.magicfile = "/usr/share/file/magic.mime" extension=fileinfo.so ;;;; ; Note: For Red Hat Linux, packaged extension modules are now loaded via ; the ini files in the directory /etc/php.d. ;;;;
extension=fileinfo.so
I get the following errors in /var/log/httpd/error_log, not sure how to get rid of them and if it hampers the fileinfo functioning.
PHP Warning: Function registration failed - duplicate name - finfo_open in Unknown on line 0 PHP Warning: Function registration failed - duplicate name - finfo_close in Unknown on line 0 PHP Warning: Function registration failed - duplicate name - finfo_set_flags in Unknown on line 0 PHP Warning: Function registration failed - duplicate name - finfo_file in Unknown on line 0 PHP Warning: Function registration failed - duplicate name - finfo_buffer in Unknown on line 0 PHP Warning: fileinfo: Unable to register functions, unable to load in Unknown on line 0 [Sat May 21 00:57:42 2005] [notice] Apache/2.0.46 (Red Hat) configured -- resuming normal operations
Jigish.gohil at gmail dot com
Note: If you're getting Function registration failed - duplicate name errors, you probably have the module registered twice as an extension.For Fedora Core 4, do the following:
1. yum install php-devel
2. pear install fileinfo
3. Add the following in php.ini
;Magic mime time mime_magic.magicfile = "/usr/share/file/magic.mime" extension=fileinfo.so ;;;; ; Note: For Red Hat Linux, packaged extension modules are now loaded via ; the ini files in the directory /etc/php.d. ;;;;
extension=fileinfo.so
tom at kofler dot eu dot org
NOTE: Most Unix-like systems doesn't correctly handle Microsoft Word and Microsoft Excel MIME types. If you very heavy rely on these types, use integrated Horde MIME magic library instead. See bug #3565 for more info.