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

I have problems getting a form action to work.... i keep getting a "Method POST not allowed" Error when ever i tried to post the form.... I am really new to the whole concept of the cgi security thing so can someone give me step by step instructions on getting the scripts to work on my school's apache server? Thanks!!!

Replies are listed 'Best First'.
(OT) Re: Method POST not allowed
by Kanji (Parson) on Feb 19, 2002 at 05:01 UTC

    Most likely, the script the form is submitting to hasn't been configured as a CGI or any other server-parsed file type.

    The Apache FAQ offers more insight, but a fix could be as simple as giving your CGI a certain extension (.cgi and .pl are common), placing it in a specific directory (~/public_html/cgi-bin/), or enabling CGIs with an .htaccess file like ...

    Options ExecCGI AddType cgi-script .cgi AddType cgi-script .pl

    If none of these things work, your best bet would be to ask the server's administrator for assistance; it could well be they don't want you running CGIs and have configured Apache accordingly.

        --k.


Re: Method POST not allowed
by rjray (Chaplain) on Feb 19, 2002 at 06:51 UTC

    This is not a Perl question. This is a matter of Apache configuration. The location under which your application is installed does not have the POST method enabled. You should confer with the administrator of the server itself.

    --rjray

Re: Method POST not allowed
by screamingeagle (Curate) on Feb 19, 2002 at 06:48 UTC
    you also might want to make sure that the CGI file is executable...if your computer is running UNIX, then use CHMOD to make the file executable (for example, chmod u+x filename.cgi)