Re: Re: Probably a bad set-up but which one?

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



tech wrote:
Kai Schaetzl wrote:
Tech wrote on Mon, 29 Sep 2008 13:01:26 +0800:

Oh, it does print "Hello World" OK but it also prints the "Content" line as text rather than using it as a directive.

This is not a setup problem and not a CentOS problem. Your script is probably wrong in some code. I assume with "Content" line you might mean an HTTP header. There is no such header (there are headers starting with this string, though). I think your question is better suited for a Perl or CGI programming newsgroup.

Kai



Hi,

Thanks for your reply.

By "Content" line I meant this line:

print "Content-type: text/html\n\n";

I have tried many scripts, they all do this. I have problems with JavaScript too so I am not sure yet about this just being a Perl or CGI problem. I might even have multiple problems. I can see the possibility of permission problems, Perl problems, CGI problems, and/or browser problems. I am running the latest released version of all including IE and Firefox. All I do know is what all the examples that show this as working don't work. I have the book, CGI Programing 101, and can't get its examples to work.

It is very frustrating.

If you execute this from the command line, you should see the Content-type: header as part of the text output. When apache runs it under the cgi interface the parts up to the blank line ("\n\n") should be included in the http headers and the rest in the body of the response. If you have copied the example files from somewhere, be sure that they aren't formated for windows with extra carriage returns embedded and if you are entering your own code be sure you don't output anything but valid header lines before the blank line.

--
  Les Mikesell
   lesmikesell@xxxxxxxxx
_______________________________________________
CentOS mailing list
CentOS@xxxxxxxxxx
http://lists.centos.org/mailman/listinfo/centos

[Index of Archives]     [CentOS]     [CentOS Announce]     [CentOS Development]     [CentOS ARM Devel]     [CentOS Docs]     [CentOS Virtualization]     [Carrier Grade Linux]     [Linux Media]     [Asterisk]     [DCCP]     [Netdev]     [Xorg]     [Linux USB]
  Powered by Linux