Pg to mysql : attachements not viewable

I’ve just moved our RT DB from postgres to Mysql (5.1.50). Apart from
the DB change, I edited RT_siteconfig.pm and also had to upgrade the
perl-DBD-mysql module (apache is a centos 4, 32bit box).

When I click on the attachment link I get nothing (in chrome) and in
firefox I just get the path as text:

http://rt/Ticket/Attachment/2113990/1349816/owl.jpg

Full headers (in firefox):

Content-Description: owl.jpg
content-type: image/jpeg; name=“owl.jpg”
content-disposition: attachment; creation-date=“Mon, 06 Jun 2011
12:37:03 GMT”; filename=“owl.jpg”; modification-date=“Mon, 06 Jun 2011
12:37:03 GMT”; size=“48125”
Content-Transfer-Encoding: base64
Content-Length: 46448

So it does appears to have ingested the image on ticket creation.

I can’t find anything in the logs that indicate anything is wrong.

Just in case it’s something to do with database encoding, I used
rt-3.8.2/etc/schema.mysql to create the database (and
rt3-on-pg-to-mysql script from the wiki?? to import from pg).

Any ideas?

-Kristian

I’ve just moved our RT DB from postgres to Mysql (5.1.50). Apart from
the DB change, I edited RT_siteconfig.pm and also had to upgrade the
perl-DBD-mysql module (apache is a centos 4, 32bit box).

When I click on the attachment link I get nothing (in chrome) and in
firefox I just get the path as text:

http://rt/Ticket/Attachment/2113990/1349816/owl.jpg

Full headers (in firefox):

Content-Description: owl.jpg
content-type: image/jpeg; name=“owl.jpg”
content-disposition: attachment; creation-date=“Mon, 06 Jun 2011
12:37:03 GMT”; filename=“owl.jpg”; modification-date=“Mon, 06 Jun 2011
12:37:03 GMT”; size=“48125”
Content-Transfer-Encoding: base64
Content-Length: 46448

So it does appears to have ingested the image on ticket creation.

I can’t find anything in the logs that indicate anything is wrong.

Just in case it’s something to do with database encoding, I used
rt-3.8.2/etc/schema.mysql to create the database (and
rt3-on-pg-to-mysql script from the wiki?? to import from pg).

That’s the wrong schema, you wanted schema.mysql-4.1
Any new attachments are likely to have corruption.

I know nothing about the script you’re using, but you have to convert
out of the base64 storage used on Pg to binary storage on mysql.
Your content-type headers imply that you didn’t do that.

-kevin

That’s the wrong schema, you wanted schema.mysql-4.1
Any new attachments are likely to have corruption.

I know nothing about the script you’re using, but you have to convert
out of the base64 storage used on Pg to binary storage on mysql.
Your content-type headers imply that you didn’t do that.

Ahh balls.

-K

Just in case it’s something to do with database encoding, I used
rt-3.8.2/etc/schema.mysql to create the database (and
rt3-on-pg-to-mysql script from the wiki?? to import from pg).

That’s the wrong schema, you wanted schema.mysql-4.1
Any new attachments are likely to have corruption.

I know nothing about the script you’re using, but you have to convert
out of the base64 storage used on Pg to binary storage on mysql.
Your content-type headers imply that you didn’t do that.

Performed a backup (data only), dropped database, created schema.mysql-4.1
schema and used suggestions in upgrade-mysql-schema.pl,
imported data.

I only lost 5 attachments, which I’ve requested be uploaded again, phew…

Thanks,
Kristian