non-working perl script under Windows 2008

Discussion in 'Perl Misc' started by dr.mtarver, Feb 24, 2014.

  1. dr.mtarver

    dr.mtarver Guest

    I'm doing a test Perl script under Windows 2008

    Here is the HTML page that calls it; a simple submit button


    <meta http-equiv="Content-Type"
    content="text/html; charset=iso-8859-1">
    <title>Untitled </title>

    <form action="cgi-bin/lambdaperl.cgi" method="POST">

    <form method="POST">
    <p><input type="submit" name="B1" value="Submit"></p>

    Here is the file lambdaperl.cgi


    print "HTTP/1.0 200 OK\n";
    print "Content-type: text/html\n\n";
    print <<HTML;
    <title>A Simple Perl CGI</title>
    <h1>A Simple Perl CGI</h1>
    <p>Hello World</p>


    I get

    405 - HTTP verb used to access this page is not allowed.
    The page you are looking for cannot be displayed because an invalid method (HTTP verb) was used to attempt access.
    dr.mtarver, Feb 24, 2014
    1. Advertisements

  2. Am 24.02.2014 13:16, schrieb :
    The input-submit buttion has to be inside this form.
    This is now a new formular with no action specified what to do when
    something is submitted.

    Janek Schleicher, Feb 24, 2014
    1. Advertisements

  3. This is not a Perl error message.

    Jürgen Exner, Feb 24, 2014
  4. dr.mtarver

    gamo Guest

    El 24/02/14 13:16, escribió:
    ^^ this is a error

    Good luck
    gamo, Feb 24, 2014
  5. Am 24.02.2014 21:16, schrieb gamo:
    that every Browser could handle :)

    Janek Schleicher, Feb 24, 2014
  6. Beside what others have told you: these two lines aren't
    anything your script is supposed to write out, they are
    send by the web server all on it's own before it passes
    what your script did output on to the client.

    Regards, Jens
    Jens Thoms Toerring, Feb 25, 2014
  7. dr.mtarver

    Scott Bryce Guest

    Actually, no. Your script does need to send them. The web server isn't
    going to assume it knows what type of content/response you want to send
    back to the browser.
    Scott Bryce, Feb 25, 2014
  8. dr.mtarver

    $Bill Guest

    The second line and blank after are needed, the first line is only needed
    for IIS and non-parsed header (NPH) scripts.
    $Bill, Feb 25, 2014
  9. For normal CGI scripts you should replace the first line with a Status

    print "Status: 200\n";

    However, since 200 is the default, you can omit it (and most people do).

    Peter J. Holzer, Feb 25, 2014
    1. Advertisements

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.