Re: problem with perl script and Apache

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 






"Krist van Besien" <krist.vanbesien@xxxxxxxxx>
To
users@xxxxxxxxxxxxxxxx
cc
Subject
Re: problem with perl script and Apache


"Krist van Besien" <krist.vanbesien@xxxxxxxxx>  

Please respond to : users@xxxxxxxxxxxxxxxx
02/06/2008 16:31




On Mon, Jun 2, 2008 at 2:44 PM, Octavian Rasnita <orasnita@xxxxxxxxx> 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



[Index of Archives]     [Open SSH Users]     [Linux ACPI]     [Linux Kernel]     [Linux Laptop]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Squid]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]

  Powered by Linux