Hello -
Today I found a bug in support.pm - or at least my Linux system was not
happy with it.
I installed the tar.gz file and rt ran great, then I got a checkout of
the cvs tree (v. 1.0.7) and ran into a problem.
The problem is that neither of the cgi exe’s work. When executing
them from the command line, I get the following output
[waltermi@nyrangers cgi]$ webrt.cgi
Can’t modify constant item in scalar assignment at
/opt/rt/lib/rt/ui/web/support
.pm line 59, near “>”
syntax error at /opt/rt/lib/rt/ui/web/support.pm line 59, near “>”
syntax error at /opt/rt/lib/rt/ui/web/support.pm line 59, near
“‘&’)”
BEGIN not safe after errors–compilation aborted at
/opt/rt/lib/rt/ui/web/suppor
t.pm line 151.
Compilation failed in require at /opt/rt/bin/rtmux.pl line 49.
[waltermi@nyrangers cgi]$
When I try to get to them via the web, I get the following errors in
the error_log
[waltermi@nyrangers cgi]$ tail /var/log/httpd/error_log
Compilation failed in require at /usr/local/rt/bin/rtmux.pl line 56.
[Tue Mar 20 16:30:11 2001] [error] [client 9.9.9.9] Premature end of
script headers: /usr/local/rt/bin/cgi/admin-webrt.cgi
[Tue Mar 20 16:34:36 2001] [notice] caught SIGTERM, shutting down
[Tue Mar 20 16:34:38 2001] [notice] Apache/1.3.12 (Unix) (Red
Hat/Linux) mod_ssl/2.6.6 OpenSSL/0.9.5a mod_perl/1.24 configured –
resuming normal operations
Can’t modify constant item in scalar assignment at
/usr/local/rt/lib/rt/ui/web/support.pm line 59, near “>”
syntax error at /usr/local/rt/lib/rt/ui/web/support.pm line 59, near
“>”
syntax error at /usr/local/rt/lib/rt/ui/web/support.pm line 59, near
“‘&’)”
BEGIN not safe after errors–compilation aborted at
/usr/local/rt/lib/rt/ui/web/support.pm line 151.
Compilation failed in require at /usr/local/rt/bin/rtmux.pl line 49.
[Tue Mar 20 16:35:45 2001] [error] [client 9.9.9.9] Premature end of
script headers: /usr/local/rt/bin/cgi/webrt.cgi
[waltermi@nyrangers cgi]$
Unfortunately, I have not really debugged the problem, but here is
what I know: I did a cvs log on support.pm and found
revision 1.27
date: 2001/02/11 23:40:21; author: jesse; state: Exp; lines: +6 -3
imported brandon’s url importing code
It looks like the tar.gz file for download is using the 1.26 version
of support.pm so when I replaced the 1.27 version with the one from
the tar.gz file, everything seemed to work.
Here are the differences.
[waltermi@nyrangers web]$ cvs diff -r 1.26 support.pm
Index: support.pm
RCS file: /raid/cvsroot/rt/lib/rt/ui/web/support.pm,v
retrieving revision 1.26
diff -r1.26 support.pm
59,61c59,64
< $value =~ s/</</g;
< $value =~ s/>/>/g;
< print “$value”;
my %map = ('<' => '&lt;', '>' => '&gt;', '&' => '&amp;'); $value =~ s/([<>\&])/$map{$1}/ge; $value =~ s!(?:^|\b) ((?:https?|ftp|mailto)://[^\s\"\'/]+/[^\s():\"\']+) !<A HREF=\"$1\">$1</A>!gx; print $value;
[waltermi@nyrangers web]$
Looks like the importing url code is causing problems. If it helps, I’m
running RH 6.2, and Apache 1.3.2.
Let me know if you need any more info,