Click to See Complete Forum and Search --> : How to configure Apache to read perl script


manolo
06-21-2005, 10:47 PM
My box: Windows 200, Apache 1.3.33, perl 5.6.2, IIS 5.0

I have a perl script saved in the Web Server Apache's cgi-bin directory.
The scripts have the following lines:

print "Content-type: text/plain\n\n";
print "Hello";

When I enter http://localhost/cgi-bin/xxxx.perl, appear a dialog asking if I desire open or save the file xxxx.perl; instead of showing "Hello" in the web browser.

But when I change the content-type line for:
print "Content-type: text/html\n\n";

Apache execute it normally and the web browser shows "Hello"

I have noted too this behavior with Web Server IIS 5.0

My question is:

How I must to configure the Web Servers so they can execute the scripts with line: print "Content-type: text/plain\n\n";

Any comment will be appreciate.

thedosmann
06-21-2005, 11:17 PM
Look at docs to turn PERL_SEND_HEADER on

PerlSendHeader On --->in Apache::Registry

Look HERE (http://www.webreference.com/programming/perl/mod_perl/chap6/4/4.html) for more info

manolo
06-22-2005, 10:08 PM
It must be other cause because I have "PerlSenderHeader On".

My http.conf file have theese lines:

---------------------------------
PerlModule Apache::Registry
<Location /perl/>
SetHandler perl-script
PerlHandler Apache::Registry
Options +ExecCGI
PerlSendHeader On
allow from all
</Location>
----------------------------------

bokeh
07-07-2005, 04:33 PM
It's nothing to do with PERL! It's your browser! Your browser is set to give that type of warning if it receives Content-type: text/plain.