![]() |
|
![]() |
|
|
Thread Tools | Display Modes |
|
|
#1 |
|
Newbie
Join Date: Sep 2004
Posts: 1
Rep Power: 0
![]() |
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 |
|
|
|
|
|
#2 |
|
Programming Guru
![]() |
are you sure you can use this programing type with the server you are on?
__________________
"Put your hand on a hot stove for a minute, and it seems like an hour. Sit with a pretty girl for an hour, and it seems like a minute. THAT'S relativity." - Albert Einstein |
|
|
|
|
|
#3 |
|
I eat cake for breakfast.
![]() ![]() ![]() ![]() Join Date: Jul 2004
Location: In my box.
Posts: 4,434
Rep Power: 9
![]() |
He's using a local Apache server - there's no reason why he shouldn't.
BTW, I hope you're a He... ![]() |
|
|
|
|
|
#4 |
|
PFO Founder
![]() ![]() |
one probably that it could be is that the file is not set to be executable. make sure that the webserver can execute the program
if that is already set i will take another look at the code ![]()
__________________
BIG K aka Kyle Programming Forums Kyle K Online Please do not PM or email me programming questions. Post them in the forums instead. |
|
|
|
|
|
#5 |
|
Programming Guru
![]() |
make sure it is in the place you think it should be? and in a CGI directory?
__________________
"Put your hand on a hot stove for a minute, and it seems like an hour. Sit with a pretty girl for an hour, and it seems like a minute. THAT'S relativity." - Albert Einstein |
|
|
|
![]() |
| Bookmarks |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | |
|
|