CGI/Perl Guide | Learning Center | Forums | Advertise | Login
Site Search: in

  Main Index MAIN
Search Posts SEARCH
Who's Online WHO'S
Log in LOG

Home: Perl Programming Help: mod_perl:
I can't find error section of code


New User

Jun 19, 2010, 11:40 AM

Post #1 of 2 (32411 views)
I can't find error section of code Can't Post

hi everyone,
I'm new in mod_perl. I rewrited the code of program from book. But, the code doesn't work:

package HandleCGIData2; 
# file:

# use statements, including
# our new Apache::Request module
use strict;
use Apache2::Const ':common';
use Apache2::Request;

sub handler {
# shift the argument and pass it into
# the new() method in the Apache::Request
# class
my $r = Apache2::Request->new(shift);

# we can now call param() with the Apache::Request
# object in a similar way to using
my $name = $r->param('name') || 'John Doe';
my $age = $r->param('age') || '50';

# set the content type and send the header

# $r->send_http_header();

# print the HTML, including our variables
# $name and $age
<title>Using Apache2::RequestIO</title>
<body bgcolor="#ffffff">
<h1>Using Apache2::Request</h1>
name = $name<br>
age = $age

return OK;



Jul 14, 2010, 6:20 PM

Post #2 of 2 (31889 views)
Re: [olimpiada] I can't find error section of code [In reply to] Can't Post

when you are saying code doesnt work, what do you mean? does it return any type of error message, or do you see anything in your error_log, and also have you included mod_perl in your apache configuration?


Search for (options) Powered by Gossamer Forum v.1.2.0

Web Applications & Managed Hosting Powered by Gossamer Threads
Visit our Mailing List Archives