Login problem, has anyone solved?

I notice several other users with this problem, and no one has posted a fix
for it. I have installed and configured rt2.0.14 with redhat 7.2. When the
login screen comes up, I enter the correct login (root) and password
(password) into the login boxes. The problem is, none of these are being
passed to the next screen. When I hit go, it comes back to the login,
without even a failed or invalid password statement. Earlier this month
Gary Oberbrunner solved the problem by changing the args_method in
NewMason11ApacheHandler (in /usr/local/rt2/lib/RT/Interface/Web.pm) from
’CGI’ to ‘mod_perl’. This temporarily solved the problem, and allowed me to
login. But when I try to post a new ticket I get this error:

error: Can’t call cgi_object() unless ‘args_method’ is set to CGI.

context: …
90: $RT::Mason::r->content_type($type);
91: }
92:
93: sub CGIObject {
94: $m->cgi_object();
95: }
96:
97: }
98: my ($parser, $interp, $ah);

code stack: /opt/rt2/bin/webmux.pl:94
/opt/rt2/lib/RT/Interface/Web.pm:401
/opt/rt2/WebRT/html/Ticket/Display.html:59
/opt/rt2/WebRT/html/autohandler:58

This error makes sense, but I am unsure how to fix it. So basically I am
either looking for a way to get everything passed through with CGI. Or how
to hack the file so mod_perl works. I appreciate the help that this board
has given me. :slight_smile:

-Forrest Stanley

  • Forrest Stanley [2002-09-20 09:35]:

I notice several other users with this problem, and no one has posted a fix
for it. I have installed and configured rt2.0.14 with redhat 7.2. When the
login screen comes up, I enter the correct login (root) and password
(password) into the login boxes. The problem is, none of these are being
passed to the next screen. When I hit go, it comes back to the login,
without even a failed or invalid password statement. Earlier this month
Gary Oberbrunner solved the problem by changing the args_method in
NewMason11ApacheHandler (in /usr/local/rt2/lib/RT/Interface/Web.pm) from
‘CGI’ to ‘mod_perl’. This temporarily solved the problem, and allowed me to

Hm. I didn’t know about Gary Oberbrunner’s solution, but I solved it in
exactly the same way :slight_smile:

login. But when I try to post a new ticket I get this error:

error: Can’t call cgi_object() unless ‘args_method’ is set to CGI.

context: …
90: $RT::Mason::r->content_type($type);
91: }
92:
93: sub CGIObject {
94: $m->cgi_object();
95: }
96:
97: }
98: my ($parser, $interp, $ah);

code stack: /opt/rt2/bin/webmux.pl:94
/opt/rt2/lib/RT/Interface/Web.pm:401
/opt/rt2/WebRT/html/Ticket/Display.html:59
/opt/rt2/WebRT/html/autohandler:58

This error makes sense, but I am unsure how to fix it. So basically I am
either looking for a way to get everything passed through with CGI. Or how
to hack the file so mod_perl works. I appreciate the help that this board
has given me. :slight_smile:

I have commented out code in RT/Interface/RT.pm starting with (and
including) “my $cgi_object = CGIObject()” and the if-block following it
until (but not including) “$Message->make_singlepart()”.

I also removed all file-upload fields from HTML, so that users don’t
know about their existance.

Kirill

There was old patch I sent to this list. See
http://lists.fsck.com/pipermail/rt-devel/2002-February/002079.html

I think it may not work with newest versions of Mason due to use
of $HTML::Mason::ApacheHandler::ARGS_METHOD variable.
Now it is not variable but a parameter of HTML::Mason::ApacheHandler
and should be accessed as HTML::Mason::ApacheHandler->args_method.

Nevertheless, you can try to apply it maybe with some corrections.

As for the status of this patch see Jesse Vincent’s answer:
http://lists.fsck.com/pipermail/rt-devel/2002-February/002087.html

Now Mason allows configuring several instances with different
args_method,
It is not parameter of import but paramener of constructor. So the
problem that
inspired this pach gone out. Now all parts of my site use Mason with
mod_perl handler
whereas RT2 uses cgi handler.

By the way, if you want to use mod_perl handler with newest versions of
Mason
you’d better to move arg_method from import to constructor:

In webmux.pl:
-use HTML::Mason::ApacheHandler (args_method => ‘CGI’);
+use HTML::Mason::ApacheHandler;

In lib/RT/Interface/Web.pm sub NewMason11ApacheHandler:

  •    args_method => 'CGI' 
    
  •   args_method => 'mod_perl' 
    

Best regards,
Alexei Barantsev, ISP RAS
E-mail: barancev@kazbek.ispras.ru
ICQ : 3959207