Attachments getting mangled

Not even sure where to look to troubleshoot this one. When a users
emails in a new ticket request, if there is an attachment to the email,
that attachment gets mangled in RT, and cannot be viewed by the admin.

I can see there is an attachment to the ticket, but the size is always
11 bytes, and it cannot be opened. Doesn’t matter if it’s a PDF,
screenshot etc etc. Seems like all attachments are not working.

Gentoo Linux
MySQL 4.1.21
PHP 5.1.6
RT 3.6.1

I can see there is an attachment to the ticket, but the size
is always 11 bytes, and it cannot be opened. Doesn’t matter
if it’s a PDF, screenshot etc etc. Seems like all
attachments are not working.

Hm. Sounds like you may have problems with your RT_SiteConfig.pm. I
would check:

$MaxAttachmentSize (make sure it’s big enough)
$TruncateLongAttachments (make sure it’s undef)
$DropLongAttachments (make sure it’s undef)

When I was first playing with these settings, I remembered I always got
a length of only a few bytes.

Eric Schultz
United Online

$MaxAttachmentSize (make sure it’s big enough) $TruncateLongAttachments
(make sure it’s undef) $DropLongAttachments (make sure it’s undef)

I checked that out, $MaxAttachSize is 10 megs and truncate and drop are
both undef.

Also saw an earlier post of same issue, and tried reinstalling Perl
(5.8.8) but the probem remains.

$MaxAttachmentSize (make sure it’s big enough)
$TruncateLongAttachments
(make sure it’s undef) $DropLongAttachments (make sure it’s undef)

I checked that out, $MaxAttachSize is 10 megs and truncate
and drop are
both undef.

Also saw an earlier post of same issue, and tried reinstalling Perl
(5.8.8) but the probem remains.

The only other thing I can think of then is to make sure that the
Attachments table in your database is properly defined, because it could
be that the attachment can’t make it into your database. I would check
the mysql logs and the rt logs to make sure you aren’t getting any
errors relating to this.

Jeremy;
Have a look at :
http://lists.fsck.com/pipermail/rt-users/2006-July/040843.html
it maybe related.
Roy

Peake, Jeremy wrote:

All,

Hello, Chris.
Could you backup your DB, and run next to SQL queries?
ALTER TABLE Attachments CHANGE Content Content LONGBLOB NULL;

Then check if you could binary attachments without problems and report
back.
This query is safe but anyway I would suggest you to backup data.

Running this fixed my attachment corruption problem, thanks!

I think the Gentoo Installation Guide mentions changing some aspects of the
RT database in the comments section near the end of the document. This may
be why both Jeremy and I had this problem (we’re both running on GenToo). I
followed the threads listed in that Guide to finally get it working, but I
honestly don’t remember everything that was tweaked along the way.

Perhaps someone more knowledgeable could change the GentooInstallGuide to
reflect the above fix for future users?

Thanks again,

DonovanFrom: rt-users-bounces@lists.bestpractical.com
[mailto:rt-users-bounces@lists.bestpractical.com] On Behalf Of Roy El-Hames
Sent: Wednesday, September 13, 2006 12:52 PM
To: Peake, Jeremy
Cc: Schultz, Eric; rt-users@lists.bestpractical.com
Subject: Re: [rt-users] Attachments getting mangled

Jeremy;
Have a look at :
http://lists.fsck.com/pipermail/rt-users/2006-July/040843.html
it maybe related.
Roy

Peake, Jeremy wrote:

$MaxAttachmentSize (make sure it’s big enough) $TruncateLongAttachments

(make sure it’s undef) $DropLongAttachments (make sure it’s undef)

I checked that out, $MaxAttachSize is 10 megs and truncate and drop are
both undef.

Also saw an earlier post of same issue, and tried reinstalling Perl
(5.8.8) but the probem remains.


The rt-users Archives

Community help: http://wiki.bestpractical.com
Commercial support: sales@bestpractical.com

Discover RT’s hidden secrets with RT Essentials from O’Reilly Media.
Buy a copy at http://rtbook.bestpractical.com

dyoung-rtusers@techsafari.com wrote:

All,

Hello, Chris.
Could you backup your DB, and run next to SQL queries?
ALTER TABLE Attachments CHANGE Content Content LONGBLOB NULL;

Then check if you could binary attachments without problems and report
back.
This query is safe but anyway I would suggest you to backup data.

Running this fixed my attachment corruption problem, thanks!

I think the Gentoo Installation Guide mentions changing some aspects of the
RT database in the comments section near the end of the document. This may
be why both Jeremy and I had this problem (we’re both running on GenToo). I
followed the threads listed in that Guide to finally get it working, but I
honestly don’t remember everything that was tweaked along the way.

Perhaps someone more knowledgeable could change the GentooInstallGuide to
reflect the above fix for future users?

Changing the Content type in the Attachments table
from LONGTEXT to LONGBLOB via

ALTER TABLE Attachments CHANGE Content Content
LONGBLOB NULL;

worked for me also. I observe the following in
/opt/rt3/etc/schema.mysql:

CREATE TABLE Attachments (
.
.
Content LONGTEXT NULL ,
.
.
) TYPE=InnoDB;

Is this an error in the RT3 MySQL schema?

Running Gentoo and RT 3.6.1

Regards,

David

THANKS ALL!!!

Changing that column to LONGBLOB fixed it for me. Thanks a lot!From: Donovan Young [mailto:dyoung@techsafari.com] On Behalf Of
dyoung-rtusers@techsafari.com
Sent: Wednesday, September 13, 2006 3:44 PM
To: Peake, Jeremy
Cc: rt-users@lists.bestpractical.com
Subject: RE: [rt-users] Attachments getting mangled

All,

Hello, Chris.
Could you backup your DB, and run next to SQL queries?
ALTER TABLE Attachments CHANGE Content Content LONGBLOB NULL;

Then check if you could binary attachments without problems and report

back.
This query is safe but anyway I would suggest you to backup data.

Running this fixed my attachment corruption problem, thanks!

I think the Gentoo Installation Guide mentions changing some aspects of
the RT database in the comments section near the end of the document.
This may be why both Jeremy and I had this problem (we’re both running
on GenToo). I followed the threads listed in that Guide to finally get
it working, but I honestly don’t remember everything that was tweaked
along the way.

Perhaps someone more knowledgeable could change the GentooInstallGuide
to reflect the above fix for future users?

Thanks again,

Donovan

From: rt-users-bounces@lists.bestpractical.com
[mailto:rt-users-bounces@lists.bestpractical.com] On Behalf Of Roy
El-Hames
Sent: Wednesday, September 13, 2006 12:52 PM
To: Peake, Jeremy
Cc: Schultz, Eric; rt-users@lists.bestpractical.com
Subject: Re: [rt-users] Attachments getting mangled

Jeremy;
Have a look at :
http://lists.fsck.com/pipermail/rt-users/2006-July/040843.html
it maybe related.
Roy

Peake, Jeremy wrote:

$MaxAttachmentSize (make sure it’s big enough)
$TruncateLongAttachments

(make sure it’s undef) $DropLongAttachments (make sure it’s undef)

I checked that out, $MaxAttachSize is 10 megs and truncate and drop
are both undef.

Also saw an earlier post of same issue, and tried reinstalling Perl
(5.8.8) but the probem remains.


The rt-users Archives

Community help: http://wiki.bestpractical.com Commercial support:
sales@bestpractical.com

Discover RT’s hidden secrets with RT Essentials from O’Reilly Media.
Buy a copy at http://rtbook.bestpractical.com