[imp] Cannot view msword attachments, and workaround

Lars Hecking lhecking at nmrc.ie
Fri Mar 26 05:46:48 PST 2004


 When I try to view msword attachments, the viewer window comes up empty.
 The problem appears with all version of horde (presumably ...), and is
 related to wvWare 1.0 (never tried wv2, no idea how usable it is).

 I have set up imp/wvWare as described here:
  http://marc.theaimsgroup.com/?l=imp&m=102450911929993&w=2

 The (not so) funny thing is, the image files don't get created under
 /tmp-wvWare, but under /horde/imp. Also, the image basename is msword
 instead of /tmp-wvWare/img$$-, which leads me to believe the error is
 actually in /horde/lib/MIME/Viewer/msword.php; when I run wvWare from
 the command line with arguments as per the URL above, all works fine.

    $version = explode('.', exec($mime_drivers['horde']['msword']['location'] . ' --version'));
    if (count($version) > 2 && ($version[0] > 0 || $version[1] >= 7)) {

$ wvWare --version
wvWare 1.0.0
$ 

 Not speaking php, I would guess that the explode() above cannot deal
 properly with the version string returned by wvWare 1.0. I.e. that the
 resulting $version actually contains

$version[0] = "wvWare 1"
$version[1] = 0
$versoin[2] = 0

 I have fixed it for me by simply removing

-        if (count($version) > 2 && ($version[0] > 0 || $version[1] >= 7)) {
-        } else {
-            $args = " $tmp_word $tmp_output";
-        }

 around line 43 in /horde/lib/MIME/Viewer/msword.php, but you probably want
 to put in a better fix that computes $version properly.



More information about the imp mailing list