[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[cobalt-developers] help
- Subject: [cobalt-developers] help
- From: "Jason D. Piercy" <jdpiercy@xxxxxxxxxxxxxxxxxx>
- Date: Sun Apr 1 17:35:00 2001
- List-id: Discussion Forum for developers on Cobalt Networks products <cobalt-developers.list.cobalt.com>
-----Original Message-----
From: cobalt-developers-admin@xxxxxxxxxxxxxxx
[mailto:cobalt-developers-admin@xxxxxxxxxxxxxxx]On Behalf Of Keith Davis
Sent: Monday, April 02, 2001 2:07 AM
To: cobalt-developers@xxxxxxxxxxxxxxx
Subject: Re: [cobalt-developers] CGI Script Error
Welcome to Perl Siao Tan!
> #!/usr/bin/perl --
> use CGI;
>
> print "<html>";
> print "<body>";
>
> print "test";
> print "</body>";
> print "</html>";
> exit 0;
The most obvious problem is the lack of a Content-type header. Unix
servers require it. The header tells the browser what MIME type is being
sent. Add it before any print statement that is printing text/html. Like
so:
print "Content-type: text/html\n\n";
print "<html>";
print "<body>";
print "test";
print "</body>";
print "</html>";
Note that there must be 2 new line breaks on that line \n\n
That will probably get you running. If not, proceed by stripping out
possible conflicts. You can add them back in later to see if they are
real conflicts.
1) remove -- after #!/usr/bin/perl (The dash on the shebang line
precedes a flag that turns on special processing such as -w or -T. I've
never seen a flag -- so that *may* be causing an error.
2) remove use CGI; (The CGI.pm is not required to process your script.
If the module CGI.pm is properly installed using it will not cause an
error, just a waste of effort, but if CGI.pm is not properly installed
and unfindable - it will cause a failure.)
The cobalt mail list is not really the right place to be asking for Perl
scripting help. If you need more help getting started email me directly
off the list and I'll gladly give you a hand.
keith
_______________________________________________
cobalt-developers mailing list
cobalt-developers@xxxxxxxxxxxxxxx
http://list.cobalt.com/mailman/listinfo/cobalt-developers