php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #56922 Wrong magic path
Submitted: 2006-03-28 03:31 UTC Modified: 2006-11-07 16:28 UTC
From: uros at sir-mag dot com Assigned:
Status: Closed Package: Fileinfo (PECL)
PHP Version: 5.1.1 OS: FreeBSD
Private report: No CVE-ID: None
View Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
If you reported this bug, you can edit this bug over here.
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: uros at sir-mag dot com
New email:
PHP Version: OS:

 

 [2006-03-28 03:31 UTC] uros at sir-mag dot com
Description:
------------
I install this module on FreeBSD and have problem locating magic database. I check config.m4 and found that 

  MAGIC_MIME_LOCATIONS="/usr/local/share/file/magic /usr/share/file/magic /usr/share/misc/file/magic /etc/magic /usr/share/misc"


is wrong. The last one need to be /usr/share/misc/magic




Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2006-05-23 17:17 UTC] zaa at zaa dot pp dot ru
You may try this patch (it has already been posted in a PR to FreeBSD GNATS system):

diff -urbBNp pecl-fileinfo.orig/files/patch-config.m4 pecl-fileinfo/files/patch-config.m4
--- pecl-fileinfo.orig/files/patch-config.m4    Thu Jan  1 03:00:00 1970
+++ pecl-fileinfo/files/patch-config.m4 Wed May 24 00:56:28 2006
@@ -0,0 +1,22 @@
+--- config.m4.orig     Wed May 24 00:48:38 2006
++++ config.m4  Wed May 24 00:51:24 2006
+@@ -47,12 +47,15 @@ if test "$PHP_FILEINFO" != "no"; then
+     -L$FILEINFO_DIR/lib
+   ])
+ 
+-  MAGIC_MIME_LOCATIONS="/usr/local/share/file/magic /usr/share/file/magic /usr/share/misc/file/magic /etc/magic /usr/share/misc"
+-  for i in $MAGIC_MIME_LOCATIONS; do
+-    if test -f $i; then
+-       PHP_DEFAULT_MAGIC_FILE=$i
++  MAGIC_MIME_DIRS="/usr/local/share/file /usr/share/file /usr/share/misc/file /etc /usr/share/misc"
++  MAGIC_MIME_FILENAMES="magic magic.mime"
++  for i in $MAGIC_MIME_DIRS; do
++      for j in $MAGIC_MIME_FILENAMES; do
++              if test -f "$i/$j"; then
++                      PHP_DEFAULT_MAGIC_FILE="$i/$j"
+        break
+     fi
++      done
+   done
+   AC_DEFINE_UNQUOTED(PHP_DEFAULT_MAGIC_FILE,"$PHP_DEFAULT_MAGIC_FILE",[magic file path])
+
 [2006-11-07 16:28 UTC] ilia at prohost dot org
This bug has been fixed in CVS.

In case this was a documentation problem, the fix will show up at the
end of next Sunday (CET) on pecl.php.net.

In case this was a pecl.php.net website problem, the change will show
up on the website in short time.
 
Thank you for the report, and for helping us make PECL better.


 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sat Dec 21 15:01:29 2024 UTC