On 23 Apr 2005 at 0:25, JH Foo wrote: > Hello Dermot, Hi, > You need to use Apache2::Request for mp2. This comes with the > libapreq2 package from the excellent theoryx5 site. Notice the change > in the package namespace.
I just tried to install libapreq2 (v2-2.03-dev) from CPAN. It was a bit of a saga. I was missing a couple of prerequisites. Then it couldn't find Apache2.pm - I made a link to sort that - then I ran make test and there were errors. At that point I halted. There where numerous errors in the log: [Fri Apr 22 16:29:08 2005] [debug] mod_apreq.c(455): [client 127.0.0.1] removing filter (1) [Fri Apr 22 16:29:08 2005] [error] [client 127.0.0.1] [test_cgi.c(51): Success] Creating apreq_request [Fri Apr 22 16:29:08 2005] [error] [client 127.0.0.1] [apreq_env.c(182): Success] Lookup of CONTENT_TYPE failed: status=2 [Fri Apr 22 16:29:08 2005] [error] [client 127.0.0.1] [test_cgi.c(55): Success] Fetching the parameters [Fri Apr 22 16:29:08 2005] [error] [client 127.0.0.1] [apreq_env.c(182): Success] Lookup of CONTENT_TYPE failed: status=2 [Fri Apr 22 16:29:08 2005] [error] [client 127.0.0.1] [test_cgi.c(107): Success] Fetching all parameters [Fri Apr 22 16:29:08 2005] [error] [client 127.0.0.1] [test_cgi.c(51): Success] Creating apreq_request [Fri Apr 22 16:29:08 2005] [error] [client 127.0.0.1] [apreq_env.c(182): Success] Lookup of CONTENT_TYPE failed: status=2 I can probably get by without libapreq2 and use the $r-the_request(); for now. Cheers. Dp. > > Hi > > > > MP2 RC5 > > > > I am moving from a MP1 to MP2 server and am having trouble. I have > > opted to re-write the scripts I had so I could add some more > > functions. > > > > I am struggling tring to find methods to access my form data and > > other headers. I am currently using > > > > my $form_data = $r->the_request() > > > > and split the line from there to access the form values. > > > > For other headers I am using > > my $string = $r->as_string; > > (my $user-agent) = ($string =~ /User-Agent:(.*)\sAccept/); > > > > I can get to where I want but I have the feeling I am taking the > > long way to do it. The cook book I have on mod_perl doesn't cover > > MP2. > > > > Is there no direct replacement for $r->param('field_name') or > > $headers_in{'User-Agent'}? If not should I just continue as I am or > > are there better methods for getting at the request? > > > > Apologies in advance if I have missed this in the docs but I can't > > find anything obvious in the Request::* documentation. I also am a > > bit OO illiterate. > > > > Thanx. > > Dp. > > > > > > > > > > ~~ Dermot Paikkos * [EMAIL PROTECTED] Network Administrator @ Science Photo Library Phone: 0207 432 1100 * Fax: 0207 286 8668