Click to See Complete Forum and Search --> : cgi in apache prob.


littlebig
11-28-2001, 12:46 AM
i can run printenv.pl successfully but when i run my cgi script, i got Internal Server Error.
When I check the error log, I got
"Premature end of script headers: /var/www/cgi-bin/test.pl"
Any idea for the error?
thanks :confused:

PhatBarren
11-28-2001, 01:04 AM
can you show your source code?
if not, don't know how much i can help....
make sure you set your content type, and leave TWO new lines after that :)

EyesWideOpen
11-29-2001, 12:00 PM
Make sure that the file is executable.

Also your server may not be set up to handle files with a ".pl" extension as cgi scripts. Try changing the extension to .cgi and make sure it's executable and then try to run it again.