"Krist van Besien" <[EMAIL PROTECTED]> 
To
users@httpd.apache.org
cc

Subject
Re: [EMAIL PROTECTED] problem with perl script and Apache





"Krist van Besien" <[EMAIL PROTECTED]> 
Please respond to : users@httpd.apache.org
02/06/2008 16:31


On Mon, Jun 2, 2008 at 2:44 PM, Octavian Rasnita <[EMAIL PROTECTED]> 
wrote:

> At the beginning of the output generated by your script, you should do:
>
> print "Content-Type: text/html\n\n";

>Exactly.
>
>A minimal script would be:
>
>#!/usr/bin/perl
>
>print "Content-type: text/html\n\n";
>print <<HTML;
><html>
><body>
><p>Hello World</p>
></body>
>HTML
>exit;
>
>And this would, when executed on the command line, output:
>
>Content-Type: text/html
>
><html>
><body>
><p>Hello World</p>
></body>
>
>The Content-Type is importan, because it allows your apache server to
>know what the script will output. (CGI scripts can produce whatever
>you fancy. I have scripts that produce PNGs and SVGs for example...)

I solved the issue :o). I was really puzzled that the script would execute 
properly locally... and you put me on the right track with your last 
reply! I executed it again and found out that there was a flaw within the 
script that produced an output before the "Content-type..." line
I modified it and everything now works properly!

Thanks for your answers 

Denis


Reply via email to