Just posted minutes ago on this.
This partially fixed me also. Problem was the line in the /perl container
(PerlHandler Apache::Registry instead of PerlHandler ModPerl::Registry).
Except now I get this:
[Mon Apr 22 18:32:37 2002] [error] 1580: ModPerl::Registry: `Can't call
method "args" on an undefined value at c:/perl/5.6.1/lib/CGI.pm line 433.
It is referring to the IF statement:
if ($MOD_PERL) {
$query_string = Apache->request->args;
} else {
$query_string = $ENV{'QUERY_STRING'} if defined $ENV{'QUERY_STRING'};
$query_string ||= $ENV{'REDIRECT_QUERY_STRING'} if defined
$ENV{'REDIRECT_QUERY_STRING'};
}
In CGI>pm up at line 148 there is this:
# Turn on special checking for Doug MacEachern's modperl
if (exists $ENV{'GATEWAY_INTERFACE'}
&&
($MOD_PERL = $ENV{'GATEWAY_INTERFACE'} =~ /^CGI-Perl\//))
{
$| = 1;
require Apache;
}
Do I need to define 'GATEWAY_INTERFACE', or is it provided automatically by
mod_perl? This is on Win2000.
Thanks
Chuck
----- Original Message -----
From: "Randy Kobes" <[EMAIL PROTECTED]>
To: "xk" <[EMAIL PROTECTED]>
Cc: <[EMAIL PROTECTED]>
Sent: Monday, April 22, 2002 3:16 PM
Subject: Re: mod_perl installation on Win32
> On Mon, 22 Apr 2002, xk wrote:
>
> > Apache version info (shown on error web pages):
> > Apache/2.0.35 (Win32) mod_perl/1.99_02-dev Perl/v5.6.1
> >
> > Is this mod_perl 1.0 or 2.0? When I installed (from the location you
> > pointed - theoryx5) it said mod_perl 2.0, but on Apache is shows 1.99
>
> This is normal - mod_perl, version 2.0, hasn't yet been released;
> the version on CPAN, which the above is reporting, is 1.99_01.
>
> > I've managed to get some error texts:
> >
> > ==============
> > [error] Can't locate loadable object for module Apache::Constants in
@INC
> > at .../Perl/site/lib/mod_perl.pm line 14
> >
> > 14: if ($ENV{MOD_PERL}) {
> > 15: (defined &{$class.'::bootstrap'} ?
> > 16: \&{$class.'::bootstrap'} :
> > 17: \&DynaLoader::bootstrap)->
> > 18: ($class, $version);
> > 19: }
> >
> > Compilation failed in require at .../Perl/site/lib/Apache.pm line 6.
> > BEGIN failed--compilation aborted at .../Perl/site/lib/Apache.pm line 6.
>
> I've seen this as well at times - do you have a mod_perl-1.xx
> distribution in the same Perl tree? If so, try
> temporarily renaming
> /Perl/site/lib/Apache.pm -> /Perl/site/lib/Apache-1.pm
> /Perl/site/lib/Apache/ -> /Perl/site/lib/Apache-1/
> as sometimes I think it gets confused between mod_perl-2
> and mod_perl-1 stuff.
>
> For using Registry things, there was a bug that Doug
> fixed a little while ago - you should reinstall mod_perl-2.ppd
> from http://theoryx5.uwinnipeg.ca/ppmpackages/. The version
> number hasn't changed with this fix, so if you're using the
> ppm utility to install things, you should first uninstall
> mod_perl-2 and then reinstall it.
>
> Here's an example set-up for Registry scripts. In httpd.conf:
> ============================================================
> PerlRequire "C:/Apache2/conf/extra.conf"
> Alias /perl/ "C:/Apache2/perl/"
> <Location /perl>
> SetHandler perl-script
> PerlHandler ModPerl::Registry
> Options +ExecCGI
> </Location>
> ============================================================
> where C:/Apache2/conf/extra.conf is
> ===========================================================
> use Apache2;
> use ModPerl::Registry ();
> 1;
> ===========================================================
> An example script to go into C:/Apache2/perl/ would be
> ==========================================================
> #!c:/Perl/bin/Perl.exe
> ##
> ## printenv -- demo CGI program which just prints its environment
> ##
> print "<HTML><BODY><UL>";
> foreach $var (sort(keys(%ENV))) {
> $val = $ENV{$var};
> $val =~ s|\n|\\n|g;
> $val =~ s|"|\\"|g;
> print "<LI>${var}=\"${val}\"</LI>\n";
> }
> # sleep(10);
> print "</UL></BODY></HTML>";
> ==============================================================
> which would then be accessed as http://localhost/perl/printenv.
>
> A nice example of how Apache-2/mod_perl-2 addresses the
> single-thread limitation of Apache-1/mod_perl-1, as discussed
> at http://perl.apache.org/win32_multithread.html, is to
> uncomment the "sleep(10)" line in the above script, then,
> from a DOS prompt, run quick multiple instances of
> GET http://localhost/perl/printenv
> and check the access times in the logs when the script was
> handled, and compare to mod_perl-1.
>
> best regards,
> randy