On Mon, 2003-08-04 at 09:32, Jean-Sebastien Guay wrote: > But I still get the same message... > > > [Mon Aug 04 09:31:57 2003] [error] Global $r object is not available. Set: > > PerlOptions +GlobalRequest > > in httpd.conf at D:/Perl/lib/CGI.pm line 307. > > Compilation failed in require at D:/htdocs/_startup.pl line 33. > > Is there anything else I can check other than the CGI.pm version?
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_ 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). - Perrin