[imp] Viewing/downloading attachments

Bo O. Erichsen bo@erichsen.com
Tue, 16 Jan 2001 21:10:03 +0100


When i eg. try to view/download an attachment, this happens..(sorry for the long 
message - but i don't know what to leave out).

Warning: Undefined index: in /home/httpd/dev/html/dev2/horde/imp/view.php on 
line 84.

80         echo $func($mime);
81         exit;
82     }
83
84     header('Content-Type: ' . $mime_types[$mime->type] . '/' . $mime->subtype);
85     header('Content-Disposition: inline; filename=' . MIME::decode($mime-
>name));
86     break;


the url for view.php is:
http://dev.jay.net/dev2/horde/imp/view.php/Contacts+onskeliste.doc?
mailbox=INBOX&index=8282&id=2&actionID=13&mime=b6affb6254ce2240726581
b8baf66609

The contents of the object cache in the getobject method in objectstore when 
called by view.php is:
array(1) {
  ["c695f7cebfa7d6b285ddf954de30484a"]=>
  string(653) "O:8:"stdClass":16:{s:4:"type";i:0;s:7:"subtype";s:7:"x-
vcard";s:8:"encoding";i:4;s:7:"charset";s:8:"us-
ascii";s:5:"bytes";i:173;s:4:"size";s:4:"0.17";s:11:"disposition";s:10:"attachment";s
:2:"id";b:0;s:4:"name";s:43:"=?iso-8859-1?Q?Carlos_Caba=F1as_Adame.vcf?
=";s:8:"filename";s:43:"=?iso-8859-1?Q?Carlos_Caba=F1as_Adame.vcf?
=";s:11:"description";s:43:"=?iso-8859-1?Q?Carlos_Caba=F1as_Adame.vcf?
=";s:4:"TYPE";s:4:"text";s:4:"conf";a:6:
{s:6:"action";s:7:"default";s:4:"view";b:1;s:6:"inline";b:1;s:13:"view_function";s:14:"
mime_view_text";s:8:"download";b:1;s:4:"icon";s:13:"mime_text.gif";}
s:6:"header";b:0;s:7:"imap_id";s:1:"2";s:5:"index";s:4:"8819";}"
}


The contents of the objectstore at the end of message.php is:
array(2) {
  ["c695f7cebfa7d6b285ddf954de30484a"]=>
  string(653) "O:8:"stdClass":16:{s:4:"type";i:0;s:7:"subtype";s:7:"x-
vcard";s:8:"encoding";i:4;s:7:"charset";s:8:"us-
ascii";s:5:"bytes";i:173;s:4:"size";s:4:"0.17";s:11:"disposition";s:10:"attachment";s
:2:"id";b:0;s:4:"name";s:43:"=?iso-8859-1?Q?Carlos_Caba=F1as_Adame.vcf?
=";s:8:"filename";s:43:"=?iso-8859-1?Q?Carlos_Caba=F1as_Adame.vcf?
=";s:11:"description";s:43:"=?iso-8859-1?Q?Carlos_Caba=F1as_Adame.vcf?
=";s:4:"TYPE";s:4:"text";s:4:"conf";a:6:
{s:6:"action";s:7:"default";s:4:"view";b:1;s:6:"inline";b:1;s:13:"view_function";s:14:"
mime_view_text";s:8:"download";b:1;s:4:"icon";s:13:"mime_text.gif";}
s:6:"header";b:0;s:7:"imap_id";s:1:"2";s:5:"index";s:4:"8819";}"
  ["b6affb6254ce2240726581b8baf66609"]=>
  string(585) "O:8:"stdClass":16:
{s:4:"type";i:3;s:7:"subtype";s:6:"msword";s:8:"encoding";i:3;s:7:"charset";s:8:"us-
ascii";s:5:"bytes";i:30164;s:4:"size";s:5:"29.46";s:11:"disposition";s:6:"inline";s:2:"i
d";b:0;s:4:"name";s:23:"Contacts onskeliste.doc";s:8:"filename";s:23:"Contacts 
onskeliste.doc";s:11:"description";s:23:"Contacts 
onskeliste.doc";s:4:"TYPE";s:11:"application";s:4:"conf";a:5:
{s:6:"action";s:7:"default";s:4:"view";b:1;s:13:"view_function";s:16:"mime_view_ms
word";s:8:"download";b:1;s:4:"icon";s:15:"mime_msword.gif";}
s:6:"header";b:0;s:7:"imap_id";s:1:"2";s:5:"index";s:4:"8282";}"
}
So obviusly it seems like php is loosing the second index in $GLOBALS
['HTTP_SESSION_VARS']['hordeObjectCache'].

imp 2.3 cvs
I'm running the latest php4.0.5-cvs from this morning (CET).
Apache-1.3.12
linux-2.2.12

Quoting Chuck Hagenbuch <chuck@horde.org>:

> Quoting "Bo O. Erichsen" <bo@erichsen.com>:
> 
> > 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:
> 
> Whoa, whoa. Can you be more specific about the session problems? I need to
> know 
> about problems with things like this; please report them, so that if there is
> a 
> problem it can be resolved instead of being worked around at a few sites and
> 
> unknown elsewhere.
> 
> -chuck
> 
> --
> Charles Hagenbuch, <chuck@horde.org>
> "If you can't stand the heat, get out of the chicken!" - Baby Blues
> 
> -- 
> 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