[imp] IMP HEAD (and 3.1) - dropping larger attachments

Kevin M. Myer kevin_myer at iu13.org
Fri Jan 10 10:19:56 PST 2003


Hello,

Running latest HEAD CVS checkout of Imp, Horde, and supporting friends with
Apache 1.3.27, PHP 4.2.2 on Red Hat Linux 7.3 with all errata applied.  Apache
is from Red Hat's errata RPM and PHP is based loosely on a Red Hat rawhide
package.  PEAR is recent - I merged the newest PEAR releases of most of the
classes yesterday afternoon, hoping the problem would go away but it didn't (and
ended up creating a few more, like having logging stop after updating to the
latest Log package).

Problem:  when sending a message that contains an attachment that is
approximately larger than 1MB, the message comes through with an attachment of
zero-bytes and the following error message is logged:

PHP Notice:  Object to string conversion in
/mnt/web/virtual/webmail2-iu13/horde/lib/MIME/Part.php on line 1050

base64_encode() expects parameter 1 to be string, object given in
/mnt/web/virtual/webmail2-iu13/horde/lib/MIME/Part.php on line 1105

The MIME headers are there - just no attachment.

I say approximately 1Mb because smaller attachements work but I haven't gone
through and sent attachments of increasing size, in several kilobyte increments,
to figure out exactly when this problem occurs - I just know its somewhere in
the 1Mb range.

I do not believe it is a problem with my php configuration because I'm running
with the following settings:

post_max_size = 16M
upload_max_filesize = 10M
memory_limit = 30M

Those should allow anything up to a 10Mb attachment to go through fine, I would
think.  I'm wondering if anyone has seen this behaviour and if so, what was the
cause of it:  Horde, PHP or some other bug?

Incidentally, I'm having a very similar problem with IMP 3.1 and Horde 2.1.  If
a user tries to send a file larger than 1 Mb or so, the following is logged:

PHP Warning:  fopen("/tmp/impattEkOpQ7", "rb") - No such
file or directory in /mnt/web/virtual/webmail-iu13/horde-2.1/imp-3.1/compose.php
on line 319
PHP Warning:  stat failed for /tmp/impattEkOpQ7 (errno=2
- No such file or directory) in
/mnt/web/virtual/webmail-iu13/horde-2.1/imp-3.1/compose.php on line 320
PHP Warning:  fread(): supplied argument is not a valid File-Handle resource in
/mnt/web/virtual/webmail-iu13/horde-2.1/imp-3.1/compose.php on line 320
PHP Warning:  fclose(): supplied argument is not a valid
File-Handle resource in
/mnt/web/virtual/webmail-iu13/horde-2.1/imp-3.1/compose.php on line 321
PHP Warning:  unlink() failed (No such file or directory) in
/mnt/web/virtual/webmail-iu13/horde-2.1/imp-3.1/compose.php on line 322

I'm interpreting those messages to mean that something is happening prior to the
attachment being written out to the temporary directory and that file
reading/writng routines aren't catching the error, either because they don't
check for it or because its not being set by whatever function handles the
creation of the temporary files - I'll have to look at the code in a little more
detail.

I do believe that all my configs and database preferences are up to date for
both installs - the fact that its happening on both installs (if the problem is
indeed one and the same - it could be two separate but similar problems) leads
me to believe its at a lower level than the application layer.  The fact that I
can't seem to find any other mention of it leads me to believe its a problem
with my install :)

Thanks,
Kevin

-- 
Kevin M. Myer
Systems Administrator
Lancaster-Lebanon Intermediate Unit 13
(717) 560-6140



More information about the imp mailing list