On 1/23/07, Akbar Ehsan <[EMAIL PROTECTED]> wrote:
I am working on a CGI script. It works fine from the command prompt.
I am using Net::SMTP and strict.
When I try to pass this script through a web parameter, it ends in
"Internal Server Error".
Often this is caused by not outputting a proper header. The very
first thing your program should output is a header like:
Content-Type: text/html; charset=ISO-8859-1
If your program emits any output other than this you will get an
internal server error.
Note that the header must be followed by a blank line, if you are not
using the CGI module you need to have:
print "Content-Type: text/html; charset=ISO-8859-1\n\n";
as your first line of output.
There is a function/method in CGI called header that will do this for
you is you are using the CGI module. See perldoc CGI for more info.
If this doesn't work please post your script.
Mike
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
http://learn.perl.org/