Apache2+mod_perl2 'server' method in Handler.pm

I have recently installed RT 3.4.4 (Solaris 10, Apache2+mod_perl2,
remote Oracle host) and everything has been ok till now (of course it is
my last step). When I inserted my virtual host into my httpd.conf file
and tried to restart Apache, I got this error in the error_log:

[error]Can’t locate object method “server” via package “Apache” at
/local/rt/lib/RT/Interface/Web/Handler.pm line 121.\nCompilation failed
in require at (eval 2) line 1.\n

The code where it errors (line 121) in Handler.pm is:

115 unless ( $RT::DatabaseType =~ /(?:mysql|Pg)/ ) {
116
117 # Clean up our umask to protect session files
118 umask(0077);
119
120 if ($CGI::MOD_PERL) {
121 chown( Apache->server->uid, Apache->server->gid,
122 $RT::MasonSessionDir )
123 if Apache->server->can(‘uid’);
124 }

Is this because I am using Oracle so it does session handling with
Mason, and mod_perl2 does not have the ‘server’ method? Could I possible
hardcode the uid and gid in ‘chown’ with my Apache user and group? Do I
need another perl module or does mod_perl2 have a separate package and
method to getting uid and gid from mod_perl1?

Any help or info will be useful and greatly appreciated.

Thanks!
Adam

I have recently installed RT 3.4.4 (Solaris 10, Apache2+mod_perl2, remote
Oracle host) and everything has been ok till now (of course it is my last
step). When I inserted my virtual host into my httpd.conf file and tried to
restart Apache, I got this error in the error_log:

[error]Can’t locate object method “server” via package “Apache” at
/local/rt/lib/RT/Interface/Web/Handler.pm line
121.\nCompilation failed in require at (eval 2) line 1.\n

The code where it errors (line 121) in Handler.pm is:

115 unless ( $RT::DatabaseType =~ /(?:mysql|Pg)/ ) {
116
117 # Clean up our umask to protect session files
118 umask(0077);
119
120 if ($CGI::MOD_PERL) {
121 chown( Apache->server->uid, Apache->server->gid,
122 $RT::MasonSessionDir )
123 if Apache->server->can(‘uid’);
124 }

Is this because I am using Oracle so it does session handling with Mason,
and mod_perl2 does not have the ‘server’ method? Could I possible hardcode
the uid and gid in ‘chown’ with my Apache user and group? Do I need another
perl module or does mod_perl2 have a separate package and method to getting
uid and gid from mod_perl1?

Delete this block of the code:

120 if ($CGI::MOD_PERL) {
121 chown( Apache->server->uid, Apache->server->gid,
122 $RT::MasonSessionDir )
123 if Apache->server->can(‘uid’);
124 }
Just check that apache could write into dir $MasonSessionDir which is
defined in RT config.

Any help or info will be useful and greatly appreciated.

Thanks!
Adam


The rt-users Archives

Be sure to check out the RT Wiki at http://wiki.bestpractical.com

Buy your copy of our new book, RT Essentials, today!

Download a free sample chapter from
http://rtbook.bestpractical.com

Best regards, Ruslan.