Home > Archive > PERL CGI Beginners > January 2007 > A Few Questions
You are viewing an archived Text-only version of the thread.
To view this thread in it's original format and/or if you want to reply to
this thread please [click here]
|
|
| Akbar Ehsan 2007-01-23, 6:56 pm |
| Hello,
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".=20
I tried using ReadParse() routine. All the variables are coming from the
web. In the process of writing the script, I have coded all variables in
the script itself.
Any thoughts would be appreciated. If you would like to look at the
script first, please let me know.
I am a beginner with Perl/CGI programming.
Thanks.
Akbar Ehsan
Internet Services Coordinator
Central Office
Ivy Tech Community College
9301 E. 59th St.
Indianapolis, IN 46216
Phone: 1 317 921-4872
| |
| Sean Davis 2007-01-23, 6:56 pm |
| On Tuesday 23 January 2007 17:08, Akbar Ehsan wrote:
> Hello,
>
> 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".
You will need to look in your error log to see what the actual error is.
Sean
| |
| Tyler Gee 2007-01-23, 6:56 pm |
| On 1/23/07, Akbar Ehsan <aehsan@ivytech.edu> wrote:
> Hello,
>
> 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".
Probably a permission error. Your web server will run under a
different user so unless your scirpt is executable for the correct
user/group, you will see that error.
> I tried using ReadParse() routine. All the variables are coming from the
> web. In the process of writing the script, I have coded all variables in
> the script itself.
>
> Any thoughts would be appreciated. If you would like to look at the
> script first, please let me know.
>
> I am a beginner with Perl/CGI programming.
>
> Thanks.
>
> Akbar Ehsan
> Internet Services Coordinator
> Central Office
> Ivy Tech Community College
> 9301 E. 59th St.
> Indianapolis, IN 46216
> Phone: 1 317 921-4872
>
>
>
> --
> To unsubscribe, e-mail: beginners-cgi-unsubscribe@perl.org
> For additional commands, e-mail: beginners-cgi-help@perl.org
> http://learn.perl.org/
>
>
>
--
~Tyler
| |
| Mike Williams 2007-01-23, 6:56 pm |
| On 1/23/07, Akbar Ehsan <aehsan@ivytech.edu> 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
|
|
|
|
|