Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:

Hello monks,
I am using vista,apache and i am placing my cgi/perl scripts
in the cgi-bin directory which is in apache
i placed the Html files in the htdocs folder
i also declared the cation path in the html files
but when i call the html files it works but when i enter the
information into the text area of the html file it
directs it to the path i mentioned in the action but the thing is it says
500 internal error
may i know why is it showing me that error
and what is the correct way to connect cgi/perl scripts to html files
Thanks

Replies are listed 'Best First'.
Re: how to connect to cgi using Html files
by chromatic (Archbishop) on Dec 05, 2007 at 21:43 UTC
    may i know why is it showing me that error

    You need to look for a file named something like error.log. I don't know Windows, but the first place I would look is in a directory named logs/ under the Apache directory.

Re: how to connect to cgi using Html files
by bradcathey (Prior) on Dec 05, 2007 at 20:26 UTC
    directs it to the path i mentioned in the action but the thing is it says 500 internal error

    1) Your permissions for your scripts need to be 755 at best.

    what is the correct way to connect cgi/perl scripts to html files

    2) the slickest way is HTML::Template


    —Brad
    "The important work of moving the world forward does not wait to be done by perfect men." George Eliot
Re: how to connect to cgi using Html files
by aquarium (Curate) on Dec 05, 2007 at 22:16 UTC
    You need to understand about http request/response headers, without which your browser/server will throw up errors.
    if you're using the CGI module in your script, then one of the first things to do is "print header();"
    the hardest line to type correctly is: stty erase ^H
Re: how to connect to cgi using Html files
by Gangabass (Vicar) on Dec 06, 2007 at 08:35 UTC

    Try to add this line into your CGI script:

    use CGI::Carp qw(fatalsToBrowser);

    Also don't forget to use warnings; and use strict;.

    If this doen't help than look into your webserver error log (under Windows this must be something like log\error_log in your folder where you install Apache).