PDA

View Full Version : CGI help


Tony@CRI
03-21-2001, 10:48 AM
I am new to CGI and have a problem.[nbsp][nbsp]I have written a script to collect domain registration information from a user via a form and simply return that it has been recieved for processing and display their information that they entered.[nbsp][nbsp]The script works when tested locally on my computer but when it runs on the server it says internal server error.[nbsp][nbsp]If I look at the cgi-log it shows that the script processed and shows the correct output in the log file.[nbsp][nbsp]Does anyone have any idea why it will not output the information to the browser?[nbsp][nbsp]Any help will be appreciated.

Terra
03-21-2001, 11:24 AM
It won't work right unless you emit the "Content-type" header...[nbsp][nbsp]The answer to your problem was contained in your error log: logs_web/error...

To resolve, add the following to 'print_header()':
print "Content-type: text/html\n\n";

That should fix you up - or at least this error...[nbsp][nbsp]There may be more lurking... ;)

There are a lot of good CGI tutorials on the net, and the above header is almost always in the CGI-101 programming section... :)

--
Terra
--Burning the last couple minutes before my shift ends--
FutureQuest