Programming Forums
User Name Password Register
 

RSS Feed
FORUM INDEX | TODAY'S POSTS | UNANSWERED THREADS | ADVANCED SEARCH

 
 
Thread Tools Display Modes
Prev Previous Post in Thread   Next Post in Thread Next
Old Sep 14th, 2004, 9:48 PM   #1
LuXaNa
Newbie
 
Join Date: Sep 2004
Posts: 1
Rep Power: 0 LuXaNa is on a distinguished road
Hello,

I'm trying to run some simple hollo world cgi scripts form my local apache server but I alwayse get error mesage saying :
------------------------
Internal Server Error
The server encountered an internal error or misconfiguration and was unable to complete your request.

Please contact the server administrator, webmaster@localhost and inform them of the time the error occurred, and anything you might have done that may have caused the error.

More information about this error may be available in the server error log.
---------------------
content of script:
cat test.cgi
#!/usr/bin/perl

use CGI;

$co = new CGI;

print $co->header,

$co->start_html(-title=>'CGI Example'),
$co->center($co->h1('Wlcome to CGI!')),
$co->start_form(),
$co->textarea
(
-name=>'textarea',
-rows=>10,
-columns=>60
),
$co->end-form(),
$co->end-html;

apache log error:
[Wed Sep 15 22:43:43 2004] [error] [client 127.0.0.1] Premature end of script headers: /usr/lib/cgi-bin/test.cgi

The prpblem is that I took this example from book which I took aas tutorial to cgi perl programming. for expample this cript works:

#!/usr/bin/perl

use strict;
use warnings;

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

and I can get printed line hello world on my browser

thanks averyone for help

Luxana
LuXaNa is offline   Reply With Quote
 

Bookmarks

« Previous Thread in Forum | Next Thread in Forum »

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump




DaniWeb IT Discussion Community
All times are GMT -5. The time now is 3:56 AM.

Powered by vBulletin® Version 3.7.0, Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Copyright ©2007 DaniWeb® LLC