[imp] Viewing/downloading attachments

Bo O. Erichsen bo@erichsen.com
Mon, 15 Jan 2001 21:47:36 +0100


I have the same problem in 2.3.7 .. the problem is (for me) the objectcache system .. it seems like php only will store about tree fields in the objectcache 
array.. so i disabled the cache in view.php (until i find a better solution:

$actionID = IMP_Util::getAction();

//if (isset($HTTP_GET_VARS['mime']) && ($actionID != SAVE_MESSAGE) && ($actionID != VIEW_SOURCE)) {
//    $mime = SessionCache::getObject($HTTP_GET_VARS['mime']);
//} else if (($actionID != SAVE_MESSAGE) && ($actionID != VIEW_SOURCE)) {
    include_once '../lib/MIME/Structure.php';
    $structure = imap_fetchstructure($imp['stream'], $HTTP_GET_VARS['index'], FT_UID);
    $attachments = MIME_Structure::parse($structure, $HTTP_GET_VARS['index'], $MimeID);
    $mime = $attachments[$HTTP_GET_VARS['id']];
//}


I run
apache 3.12
php4.0.5cvs
on redhat-6.2

Bo O. Erichsen
Quoting anri@polynet.lviv.ua:

> Hi All,
> :) I resolved my problem with adding attachments.
> There wasnt set upload_tmp_dir in php.ini.
> I saw the code should set it for IMP to /tmp...
> Well, the new problem. 
> I cannot download/view attached files with IMP-2.3.7-cvs.
> 
> Got (downloading attachments):
> Warning: Undefined index: in /home/webhomes/Shaman/horde/imp/view.php on line
> 51
> 
> Warning: Cannot add header information - headers already sent by (output
> started 
> at /home/webhomes/Shaman/horde/imp/view.php:51) in 
> /home/webhomes/Shaman/horde/imp/view.php on line 51
> 
> Warning: Cannot add header information - headers already sent by (output
> started 
> at /home/webhomes/Shaman/horde/imp/view.php:51) in 
> /home/webhomes/Shaman/horde/imp/view.php on line 59
> 
> Warning: Cannot add header information - headers already sent by (output
> started 
> at /home/webhomes/Shaman/horde/imp/view.php:51) in 
> /home/webhomes/Shaman/horde/imp/view.php on line 140
> 
> 
> When the message contains only .jpg or .gif - it works fine with Netscape.
> In all other cases i get those warnings therefore cannot save attachments. 
> 
> I would appreciate any suggestions. Thanks.
> 
> Andriy Kopystyansky
> 
> -------------------------------------------------
> This mail sent through IMP: http://horde.org/imp/
> 
> -- 
> IMP mailing list: http://horde.org/imp/
> Frequently Asked Questions: http://horde.org/faq/
> To unsubscribe, mail: imp-unsubscribe@lists.horde.org
> 
> 



check out http://www.jay.net

-------------------------------------------------
This mail sent through Jay.net: http://www.jay.net