Perrin,
 
> First, check your conf file to be sure you have this turned on.  There
> are docs related to it here:
>
http://perl.apache.org/docs/2.0/user/config/config.html#C_GlobalRequest_
The docs also state that unless it's explicitly turned _off_, it's on by default. But I turned it on anyways before I sent my last message. Here's the relevant section of my httpd.conf:
 
________________ begin ________________
 
LoadModule perl_module modules/mod_perl.so
LoadFile "D:/Perl/bin/perl58.dll"
 
PerlModule Apache2
PerlSetEnv SCRIPT_ROOT "D:/htdocs"
PerlRequire "D:/htdocs/_startup.pl"
 
  <Files ~ "\.cgi$">
     SetHandler perl-script
     PerlResponseHandler ModPerl::Registry
     Options +ExecCGI
     PerlOptions +ParseHeaders +GlobalRequest
  </Files>
________________ end ________________
 
And here's my _startup.pl script:
 
________________ begin ________________
 
#-------------------------------------------------------------------------------
# Default module inclusions as per the Apache
# mod_perl installation instructions
use Apache2 ();
use ModPerl::Util ();
use Apache::RequestRec ();
use Apache::RequestIO ();
use Apache::RequestUtil ();
use Apache::Server ();
use Apache::ServerUtil ();
use Apache::Connection ();
use Apache::Log ();
use Apache::Const -compile => ':common';
use APR::Const -compile => ':common';
use APR::Table ();
use Apache::compat ();
use ModPerl::Registry ();
use CGI ();
 
#-------------------------------------------------------------------------------
# General modules
use Time::localtime;
use Data::Dumper;
use Date::Calc qw(:all);
 
#-------------------------------------------------------------------------------
# Hybride modules
 
# Add the top-level directory for the modules into the module search path.
use lib qw(D:/htdocs);
# ... ... The modules I want to pre-load are currently all commented out, until 
# ... ... I get a running server to test them one at a time...
 
________________ end ________________
 
> You can test it by writing a little handler (or Registry script) that
> calls Apache->request().  That should return an Apache::RequestRec
> object if all is well.  If it doesn't, you may have an old mod_perl 2
> build or you may have found a bug.
>
> If you can't get that to work, there is also the direct approach which
> is to pass a RequestRec object to CGI.pm when you call the new()
> method.  Registry scripts get a RequestRec object passed to them as
> their first param, so you can just shift it into a variable (usually
> called $r) and pass it as CGI->new($r).
Doesn't all this require that I actually get a running Apache server first? The error message shows up when I try to start up the Apache service! As I understand it, the _startup.pl script tries to require() CGI.pm, which gives the error message. So I never get a running Apache instance to run any scripts in.
 
If there's anything else I can try, or if you see anything in the above config files, please let me know. Thanks for your patience on this...
 
J-S
 
_______________________________________________
Jean-Sébastien Guay                  [EMAIL PROTECTED]
Software Developer, Hybride         http://www.hybride.com
Piedmont, Québec, Canada
 

Reply via email to