Opened 4 years ago

Closed 4 years ago

Last modified 4 years ago

#1485687 closed Bugs (worksforme)

internal error on sending mail with special chars

Reported by: fsu Owned by:
Priority: 1 - Highest Milestone: 0.3.1
Component: PHP backend Version: 0.3-stable
Severity: major Keywords: attachment
Cc:

Description

I got "internal error occured" -error on sending mail with scandinavian chars.

I also made patch to fix it. it's not optimal solution but I got my webmail working again..

Attachments (1)

rcm-attachments-qnd-bugfix.diff (2.8 KB) - added by fsu 4 years ago.

Download all attachments as: .zip

Change History (27)

comment:1 Changed 4 years ago by alec

What database are you using? It must be something session (database) related.

comment:2 Changed 4 years ago by fsu

I have mysql-5.0.26-12 and here is connection string:
$rcmail_configdb_dsnw? = 'mysql://username:password@localhost/roundcubemail';
(replaced user/pass..)

comment:3 Changed 4 years ago by alec

  • Component changed from Other to PHP backend
  • Milestone changed from later to 0.2.1

#1485681 marked as duplicate of that issue.

comment:4 Changed 4 years ago by rafi_iplus

I made patch, and i have new problem (maybe the same). I got "internal error occured" when mail is forwarded (with special polish chars).

Changed 4 years ago by fsu

comment:5 Changed 4 years ago by fsu

rafi_iplus: thanks, I updated patch, so forwarding should work now.

alec: Yep, it's something related to sessions and utf8..

this patch is not meant to be final solution and I hope, it will not be included to 0.2.1.. Best solution is to fix session problem, which will also fix this problem..

comment:6 Changed 4 years ago by alec

what PHP version are you using?

comment:7 Changed 4 years ago by fsu

pretty old, but php5-5.2.0.. I hope php6 fixes this utf8 mess.. ;)

comment:8 Changed 4 years ago by jjj

Fsu i had the same problem. Now after adding your patch i can send mails with my language special chars (elożółtęczki.txt) but when i'm sending to gmail account filename changes to: UTF-8elo%C5%BC%C3%B3%C5%82t%C4%99czki.txt Why is that? How to repair this?

Greetings

comment:9 Changed 4 years ago by fsu

jjj: It's something related to subject's encoding and email headers.. I think that's other bug, so you should make new ticket from that..

comment:10 Changed 4 years ago by alec

People, what's your database charset? SHOW CREATE TABLE session; SHOW CREATE DATABASE roundcube;

comment:11 Changed 4 years ago by fsu

CREATE TABLE session (

sess_id varchar(40) NOT NULL,
created datetime NOT NULL default '0000-00-00 00:00:00',
changed datetime NOT NULL default '0000-00-00 00:00:00',
ip varchar(15) NOT NULL,
vars text NOT NULL,
PRIMARY KEY (sess_id)

) ENGINE=MyISAM DEFAULT CHARSET=ascii

CREATE DATABASE roundcubemail /*!40100 DEFAULT CHARACTER SET latin1 */

comment:12 Changed 4 years ago by alec

So, I think changing charset to utf-8 should fix the issue.

comment:13 Changed 4 years ago by alec

  • Resolution set to fixed
  • Status changed from new to closed

Added info about unicode in INSTALL file.

comment:14 Changed 4 years ago by fsu

I changed charset to utf8 and updated to 0.2.1 and attachments works fine now.

comment:15 follow-up: Changed 4 years ago by jjj

  • Resolution fixed deleted
  • Status changed from closed to reopened
  • Version changed from 0.2-stable to 0.2.1

CREATE TABLE session (

sess_id varchar(40) character set ascii NOT NULL,
created datetime NOT NULL default '0000-00-00 00:00:00',
changed datetime NOT NULL default '0000-00-00 00:00:00',
ip varchar(15) character set ascii NOT NULL,
vars text character set ascii NOT NULL,
PRIMARY KEY (sess_id)

) ENGINE=MyISAM DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC

CREATE DATABASE roundcubemail /*!40100 DEFAULT CHARACTER SET utf8 */

on my box with rc 0.2.1 still doesnt work.

comment:16 in reply to: ↑ 15 ; follow-up: Changed 4 years ago by alec

  • Resolution set to fixed
  • Status changed from reopened to closed

Replying to jjj:

on my box with rc 0.2.1 still doesnt work.


but you have problem with internal error or with attachment name in sent mail? If the latter, open a new ticket attaching message source.

comment:17 in reply to: ↑ 16 Changed 4 years ago by jjj

  • Resolution fixed deleted
  • Status changed from closed to reopened

Replying to alec:

Replying to jjj:

on my box with rc 0.2.1 still doesnt work.


but you have problem with internal error or with attachment name in sent mail? If the latter, open a new ticket attaching message source.

With internal error after attaching message with special chars. Nothing change.

comment:18 Changed 4 years ago by alec

  • Resolution set to fixed
  • Status changed from reopened to closed

jjj: change columns encoding. I see it's set to ascii. Also try svn-trunk version. If this not helps open new ticket, probably your issue is different. Describe your problem and environement again there.

comment:19 Changed 4 years ago by gabor87

  • Keywords attachment added
  • Milestone changed from 0.2.1 to 0.3.1
  • Priority changed from 5 to 3
  • Severity changed from normal to major
  • Version changed from 0.2.1 to 0.3-stable

Dont work in 0.3-stable. any patch?

comment:20 Changed 4 years ago by gabor87

  • Priority changed from 3 to 1 - Highest
  • Resolution fixed deleted
  • Status changed from closed to reopened

comment:21 Changed 4 years ago by alec

  • Resolution set to worksforme
  • Status changed from reopened to closed

Do not reopen tickets without any feedback information, please.

comment:22 Changed 4 years ago by gabor87

  • Resolution worksforme deleted
  • Status changed from closed to reopened

The patch successful work previous version, but dont work in 0.3-stable. Well, I cant upgrade. Please fix scandinavian chars in 0.3.1, because we cant send/forward mail with attachments.

Attachment name example: "Árvíztűrő tükörfúrógép.doc"

comment:23 Changed 4 years ago by alec

The same attachment name works for me, so we don't need such patch. Did you checked the database encoding as I said in my comments to this ticket? Describe your environment.

comment:24 Changed 4 years ago by gabor87

db: latin1_swedish_ci
cache: utf8_general_ci
contacts: utf8_general_ci
identities: utf8_general_ci
messages: utf8_general_ci
session: ascii_general_ci
users: utf8_general_ci
myisam

Thanks!

comment:25 Changed 4 years ago by alec

  • Resolution set to worksforme
  • Status changed from reopened to closed

So, I think if you change all of them to utf-8 issue will not happen.

comment:26 Changed 4 years ago by gabor87

Works, very thanks!

Note: See TracTickets for help on using tickets.