|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2006-09-27 04:53 UTC] r dot de dot groen at versatel dot nl
[2006-09-28 06:27 UTC] zaa at zaa dot pp dot ru
[2006-11-07 16:28 UTC] ilia at prohost dot org
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Sat Oct 25 04:00:01 2025 UTC |
Description: ------------ MAGIC_MIME_LOCATIONS="/usr/local/share/file/magic /usr/share/file/magic /usr/share/misc/file/magic /etc/magic /usr/share/misc" has incorrect path for file database in /usr/share/misc folder. Correct line looks as follows: MAGIC_MIME_LOCATIONS="/usr/local/share/file/magic /usr/share/file/magic /usr/share/misc/file/magic /etc/magic /usr/share/misc/file" Supplied patch fixes the issue and improves algorithm of magic file detection. --- 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])