[horde] Warning message from Magic.php when attaching a file in IMP compose window

Jan Schneider jan at horde.org
Tue Oct 7 12:11:17 UTC 2008


Zitat von Robin John West <Robin.West at dal.ca>:

> We have a working Horde 3.2.1/IMP 4.2 installation on a RH Linux  
> server (PHP 4.3.2), and I'm working on setting up the same on a  
> Solaris 10 machine (PHP 5.2.6).
>
> On the Solaris installation I'm getting a warning message at the top  
> of the page whenever I try to attach a file to a message in the IMP  
> compose page. The message is preceded by several lines of what looks  
> like mangled serialized data:
>
> n__________E";s:16:"applicati?-ar";s:19:"!n________64E";s:16?plication/data";s:19?/local/bin/a?:11:?t/sc?";}i:18;a:3:{s:18:"FiLeStArTfIlEsTaR?:20:?t/x-apple-binsci?:18:"#! ?/loc?csh";s:17:"applicati?-csh";s:18:"%!PS-AdobeFont-1.0";s:10:"fo?ype1";}i:17;a:1:{s:17:"#?r/local/tcsh";s:17:"appl?ion/??i:16;a:1?:16:?ended Module?:15:"aud?-ft2-mod";s:16:"???";s:17:"?????:16:"#! ?/bin??:17:?lication/x-awk";s:16:"#!?r/bin/nawk";s:17?plication/x-awk";s:16:"#?sr/b?erl";s:18:"applicati???:16:"#!  
> ?/bin??:17:?lication/x-awk";s:16:"#!?r/bin/nawk";s:17?plication/x-awk";s:16:"#?sr/b?erl";s:18:"applicati???:16:"ndebian";s:18:"applicati?-dpk?:14:"#!/usr/bin/awk";s:17:"applicati?-awk";s:14:"
> Warning: Variable passed to each() is not an array or object in  
> /opt/luminis/dalhousie/horde/lib/Horde/MIME/Magic.php on line 200
>
> After the message the compose page is redisplayed with the file  
> successfully attached.
>
> Everything works fine with no warnings on the Linux installation. I  
> have checked horde/lib/Horde/MIME/mime.magic.php to make sure it  
> isn't corrupted - it is identical on both servers. I also tried this  
> test script on both servers:
>
> <?php  require_once('mime.magic.php');
>  while (list($i, $j) = each($mime_magic)) {
>    printf("%s, %s\n", $i, $j);
>  }
>
> Works fine on the linux box, produces the warning message on the  
> Solaris box. So the only difference is the OS and the PHP version.  
> Anyone have an idea what the problem might be?

You are using the magic mime PHP extension (and thus *not* Horde's  
mime.magic.php), but you are pointing the PHP configuration to a wrong  
(or broken) mime magic file.

Jan.

-- 
Do you need professional PHP or Horde consulting?
http://horde.org/consulting/



More information about the horde mailing list