Re: sh and mod_perl

1999-11-16 Thread Eric L. Brine


> system("/tmp/test.sh");

> /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.

I don't many details on this, but I know the following:

The script gets executed, but it's output is not piped to Apache. I
believe perl (or is it mod_perl) needs to be compiled with a certain
option for this to work.  I believe the following works, though:
  print(`/tmp/test.sh`);
or maybe do you own fork?

ELB

--
Eric L. Brine  |  Chicken: The egg's way of making more eggs.
[EMAIL PROTECTED]  |  Do you always hit the nail on the thumb?
ICQ# 4629314   |  An optimist thinks thorn bushes have roses.



Re: sh and mod_perl

1999-11-16 Thread Tobias Hoellrich

Now, where did I put my sh2pl converter 

;-)
  Tobias

At 03:53 PM 11/15/99 +, you wrote: 
>
> 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 .






Re: sh and mod_perl

1999-11-16 Thread Stas Bekman


http://perl.apache.org/guide/porting.html#Output_from_system_calls

> 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 .
> 
> This is some configuration on my httpd.conf
> 
> 
> SetHandler perl-script
> PerlHandler Apache::Hello
> 
> 
> 
> 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(< 
> 
> test
> 
> 
> Host $host
> 
> END
> 
> system("/tmp/test.sh");
> print "\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.
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 



___
Stas Bekman  mailto:[EMAIL PROTECTED]www.singlesheaven.com/stas  
Perl,CGI,Apache,Linux,Web,Java,PC at  www.singlesheaven.com/stas/TULARC
www.apache.org  & www.perl.com  == www.modperl.com  ||  perl.apache.org
single o-> + single o-+ = singlesheavenhttp://www.singlesheaven.com



sh and mod_perl

1999-11-16 Thread Leonardo Madrigal

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 .

This is some configuration on my httpd.conf


SetHandler perl-script
PerlHandler Apache::Hello



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(<

test


Host $host

END

system("/tmp/test.sh");
print "\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.