Gossamer Forum
Home : Products : Gossamer Forum : Discussion :

GT/CGI.pm and mod_perl2 >= 1.999_22

Quote Reply
GT/CGI.pm and mod_perl2 >= 1.999_22
I just upgraded mod_perl2 to mod_perl 2.01. This unfortunately has completely broke my Gossamer Forum installation.

The error I am getting is:

Can't locate Apache2.pm in @INC (@INC contains: [path info deleted]) at /some/path/GT/CGI.pm line 67.

I know that the real CGI.pm has been updated for the newer mod_perl2. Are there plans to fix this in the Gossamer version? Is there a known workaround until then?

Thanks for any help you can provide,
Xev

Last edited by:

xev: Jul 3, 2005, 9:11 PM
Quote Reply
Re: [xev] GT/CGI.pm and mod_perl2 >= 1.999_22 In reply to
Alright, I think I figured it out. There may be other changes needed, but for now my forum seems to be working.

In GT/CGI.pm, the mod_perl2 tests should look like this:

Code:

if (MOD_PERL and MOD_PERL >= 2 and $Apache::ServerStarting != 1) {
require APR::Pool;
Apache2::RequestUtil->request->pool->cleanup_register(\&reset_env);
}
elsif (MOD_PERL and MOD_PERL >= 1.99 and $Apache::ServerStarting != 1) {
require Apache2;
require APR::Pool;
Apache->request->pool->cleanup_register(\&reset_env);
}

In GT/Base.pm, the mod_perl2 tests should look like this:

Code:

if (MOD_PERL and MOD_PERL >= 2 and $Apache::ServerStarting != 1) {
require APR::Pool;
Apache2::RequestUtil->request->pool->cleanup_register(sub { $self->_cleanup_obj($msg_pkg, $is_hash) });
}
elsif (MOD_PERL and MOD_PERL >= 1.99 and $Apache::ServerStarting != 1) {
require Apache2;
require APR::Pool;
Apache->request->pool->cleanup_register(sub { $self->_cleanup_obj($msg_pkg, $is_hash) });
}