in reply to mod_perl configuration error?

Look, I can't include code because it tells too much about our system config. I dont want PM to be a hacker knowledge database :-)

I just need some guidelines, how to avoid mod_perl in my script, or accidental forking.

-- tune

Replies are listed 'Best First'.
Re: Re: mod_perl configuration error?
by Yohimbe (Pilgrim) on Jan 26, 2001 at 23:13 UTC
    hmm. Tall order. try this: standard form of a mod_perl routine:
    #!/usr/bin/perl -w
    use strict;
    packate Foo;
    use CGI;
    use MyLibrary;
    sub handler {
    	my $q = new CGI;
    	my $someparam=$q->param('someparam');
    	$someparam=MyLibrary::FooProcess($someparam);
    	my $output ="Hello and welcome to FooCo!"
    	if ($someparam eq 'foo') {
    		# handle foo
    		$output .= "You said Foo! heh heh!";
    	}
    	else {
    		# default
    		$output .= "Nobody gives me any input";
    	}
    	print $q->header,$output;
    	return;
    }
    ## and the mod_perl config 
    
    <Location /cgi-bin/foo.pl>
            SetHandler perl-script
            PerlHandler Foo
    </location>
    
    
    Does your code differ dramatically from this?
    --
    Jay "Yohimbe" Thorne, alpha geek for UserFriendly