Getting 500 Internal Error when adding unstructured text to the comment

Hi!

We are recently getting the 500 internal error when we are trying to add an unstructured ( part of an excel table, special characters) or long text as a ticket comment. Short comment works without a problem. We identified that the problem is only for the “incident” lifecycle because the same input works for other queues. If we choose “add as plain text” then it also works.

The apache logs show this error:
Premature end of script headers: rt-server.fcgi, referer:

Have you any idea what can be the problem?

Thank you

You can try to debug it slightly as webserver log doesn’t say anything about what really happened inside. Try set the option Set($LogToFile , ‘debug’); to your RT_Siteconfig.pm to enable debugging to file /opt/rt4/var/log/rt.log (this is the default path from RT_Config.pm).

Thank you so much for the answer!

Even if I turn the logging on, I cannot see any relevant logs.

The 500 external error doesn’t generate a log, and no other action performed is in the log as well.

All I can see:
[29015] [Fri Mar 30 08:00:33 2018] [debug]: Converting ‘utf-8’ to ‘utf-8’ for text/plain - [Comment] TEST PO UPRAVE (/opt/rt4/sbin/…/lib/RT/I18N.pm:289)
[29015] [Fri Mar 30 08:00:33 2018] [debug]: Converting ‘utf-8’ to ‘utf-8’ for text/html - Subjectless message (/opt/rt4/sbin/…/lib/RT/I18N.pm:289)
[29015] [Fri Mar 30 08:00:33 2018] [debug]: Encode::Guess guessed encoding: ascii (/opt/rt4/sbin/…/lib/RT/I18N.pm:568)
[29015] [Fri Mar 30 08:00:33 2018] [debug]: Encode::Guess guessed encoding: ascii (/opt/rt4/sbin/…/lib/RT/I18N.pm:568)
[29015] [Fri Mar 30 08:00:33 2018] [debug]: Skipping Scrip #91 because it isn’t applicable (/opt/rt4/sbin/…/lib/RT/Scrips.pm:337)
[29015] [Fri Mar 30 08:00:33 2018] [debug]: Skipping Scrip #93 because it isn’t applicable (/opt/rt4/sbin/…/lib/RT/Scrips.pm:337)
[29015] [Fri Mar 30 08:00:33 2018] [debug]: Found 0 scrips for TransactionBatch stage with applicable type(s) Comment for txn #154153 on ticket #73 (/opt/rt4/sbin/…/lib/RT/Scrips.pm:477)
[29015] [Fri Mar 30 08:00:33 2018] [warning]: Use of uninitialized value in split at /opt/rt4/share/html/Helpers/ShowSimplifiedRecipients line 99. (/opt/rt4/share/html/Helpers/ShowSimplifiedRecipients:99)

Hm, I can not also see anything unusual here. But the error 500 is strange. Could it be something like in topic Could not load ticket - #2 by Petr_Hanousek ?

Probably not but I’d tip for some buggy perl library dealing with utf8 or something like that. Maybe you can install the debug version of Apache and then examine the created core dump. Sorry, I’ve got no better advice.