Hi All!

I just configured mod_perl and i need to include (execute) som shell 
scripts that i have.
Those scripts check some things and they are going actually to create 
the html output, i need to use mod_perl , cause i can define a hanlder 
inside a <location>.

This is some configuration on my httpd.conf

<Location /hello>
        SetHandler perl-script
        PerlHandler Apache::Hello
</Location>
</VirtualHost>

Apache::Hello is this.. (Hello.pm)

package Apache::Hello;

use strict;
use Apache::Constants qw(:common);
use CGI::Switch;

sub handler {
        my $r = shift;
        $r->content_type('text/html');
        $r->send_http_header;
        my $host = $r->get_remote_host;
        $r->print(<<END);
<HTML>
<HEAD>
<TITLE>test</TITLE>
</HEAD>
<BODY>
<H1>Host $host</H1>
</BODY>
END

system("/tmp/test.sh");
print "</HTML>\n";
        return OK;
}

/tmp/test.sh is a simple script that just prints some test, using echo 
, but i cannnot make the server to execute it., but i can see the the 
other html code that mod_perl is executing.

Any ideas?

Thank you

-Leonardo.









Reply via email to