Cgi error from support.pm


#1

Hello -

Today I found a bug in support.pm - or at least my Linux system was not
happy with it. :slight_smile:

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;lt;', '&gt;' =&gt; '&amp;gt;',
'&amp;' =&gt; '&amp;amp;');
$value =~ s/([&lt;&gt;\&amp;])/$map{$1}/ge;
$value =~ s!(?:^|\b)
    ((?:https?|ftp|mailto)://[^\s\&quot;\'/]+/[^\s():\&quot;\']+)
   !&lt;A HREF=\&quot;$1\&quot;&gt;$1&lt;/A&gt;!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,

mw
waltermi@austin.ibm.com


#2

There’s a typo in what’s in CVS. you should be running 1.0.7, not
the random code-of-the-day from CVS.On Tue, Mar 20, 2001 at 06:08:38PM -0700, Michael A. Walter wrote:

Hello -

Today I found a bug in support.pm - or at least my Linux system was not
happy with it. :slight_smile:

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
”’&amp;’)"
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
”’&amp;’)"
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;lt;', '&gt;' =&gt; '&amp;gt;',
'&amp;' =&gt; '&amp;amp;');
$value =~ s/([&lt;&gt;\&amp;])/$map{$1}/ge;
$value =~ s!(?:^|\b)
    ((?:https?|ftp|mailto)://[^\s\&quot;\'/]+/[^\s():\&quot;\']+)
   !&lt;A HREF=\&quot;$1\&quot;&gt;$1&lt;/A&gt;!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,

mw
waltermi@austin.ibm.com


Rt-devel mailing list
Rt-devel@lists.fsck.com
http://lists.fsck.com/mailman/listinfo/rt-devel

jesse reed vincent – root@eruditorum.orgjesse@fsck.com
70EBAC90: 2A07 FC22 7DB4 42C1 9D71 0108 41A3 3FB3 70EB AC90

I admit that X is the second worst windowing system in the world, but all the
others I’ve used are tied for first.


#3

There’s a typo in what’s in CVS. you should be running 1.0.7, not
the random code-of-the-day from CVS.

Hello -

Today I found a bug in support.pm - or at least my Linux system was not
happy with it. :slight_smile:

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
”’&amp;’)"
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
”’&amp;’)"
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;lt;', '&gt;' =&gt; '&amp;gt;',
'&amp;' =&gt; '&amp;amp;');
$value =~ s/([&lt;&gt;\&amp;])/$map{$1}/ge;
$value =~ s!(?:^|\b)
    ((?:https?|ftp|mailto)://[^\s\&quot;\'/]+/[^\s():\&quot;\']+)
   !&lt;A HREF=\&quot;$1\&quot;&gt;$1&lt;/A&gt;!gx;
print $value;

BTW, this seems to me like wrong encoding (html like) of the original
patch - there should be things as:
my %map = (’<’ => ‘<’, ‘>’ => ‘>’, ‘&’ => ‘&’);
$value =~ s/([<>&])/$map{$1}/ge;
$value =~ s!(?:^|\b)((?:https?|ftp|mailto)://[^\s"’/]+/[^\s():"’]+)!<A HREF="$1">$1!g;

#$value =~ s/</&lt;/g;
#$value =~ s/>/&gt;/g;
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,

mw
waltermi@austin.ibm.com


Rt-devel mailing list
Rt-devel@lists.fsck.com
http://lists.fsck.com/mailman/listinfo/rt-devel


jesse reed vincent – root@eruditorum.orgjesse@fsck.com
70EBAC90: 2A07 FC22 7DB4 42C1 9D71 0108 41A3 3FB3 70EB AC90

I admit that X is the second worst windowing system in the world, but all the
others I’ve used are tied for first.


Rt-devel mailing list
Rt-devel@lists.fsck.com
http://lists.fsck.com/mailman/listinfo/rt-devel

Jan Okrouhly
-----------------------------------------±----okrouhly@civ.zcu.cz—
Laboratory for Computer Science | phone: (420 19) 7491588
University of West Bohemia | location: Univerzitni 22
Americka 42, 306 14 Pilsen, Czech Republic | room: UI404
------------------------------------------73!-de-OK1INC@OK0PPL.#BOH.CZE.EU-


#4

BTW, this seems to me like wrong encoding (html like) of the original
patch - there should be things as:
my %map = (’<’ => ‘<’, ‘>’ => ‘>’, ‘&’ => ‘&’);
$value =~ s/([<>&])/$map{$1}/ge;
$value =~ s!(?:^|\b)((?:https?|ftp|mailto)://[^\s"’/]+/[^\s():"’]+)!<A HREF="$1">$1!g;

#$value =~ s/</&lt;/g;
#$value =~ s/>/&gt;/g;
print "$value";

thanks. I committed the fix to CVS

jesse reed vincent – root@eruditorum.orgjesse@fsck.com
70EBAC90: 2A07 FC22 7DB4 42C1 9D71 0108 41A3 3FB3 70EB AC90

I admit that X is the second worst windowing system in the world, but all the
others I’ve used are tied for first.