Thread: Perl and NT

    #1
  1. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Aug 2000
    Location
    Cape Town, WP, South Africa
    Posts
    39
    Rep Power
    14
    I have been trying to run scripts on NT but keep getting an error

    HTTP Error 405
    405 Method Not Allowed

    The method specified in the Request Line is not allowed for the resource identified by the request. Please ensure that you have the proper MIME type set up for the resource you are requesting.

    Please contact the server's administrator if this problem persists

    I at first thought this was a permissions problem, but permissions where set properly.

    Do you have to put your CGI's in a special folder like on the apache server.

    Help please nt is driving me mad
  2. #2
  3. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    May 2000
    Location
    Alkmaar, The Netherlands
    Posts
    123
    Rep Power
    14
    What Webserver are you running? IIS?

    However within every webserver if you use CGI scripts, they need to be placed in the cgi-bin directory. But it could be that a mime-type setting is wrong in your Web-server.

    ------------------
    Good luck,
    Bas

    ------------------
    E-mail me at: b.vandermeijden@pecoma.nl
  4. #3
  5. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Aug 2000
    Location
    Cape Town, WP, South Africa
    Posts
    39
    Rep Power
    14
    I have created a cgi bin under C:inetpub/scripts it does not give me the same error, however it says the page cannot be displayed.
    I ran my script on the command line it it seems to be ok.
    Any idea's
  6. #4
  7. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    May 2000
    Location
    Alkmaar, The Netherlands
    Posts
    123
    Rep Power
    14
    So you don't get the 405 error anymore. Does it give a reason why the page can't be displayed (eg what is the exact message on you screen)? Have you got a blank line between you HTTP headers and the HTML? Or can you see some other things that might help us in answering your question?

    ------------------
    Good luck,
    Bas

    ------------------
    E-mail me at: b.vandermeijden@pecoma.nl
  8. #5
  9. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Aug 2000
    Location
    Cape Town, WP, South Africa
    Posts
    39
    Rep Power
    14
    This is the error:
    The page cannot be displayed
    There is a problem with the page you are trying to reach and it cannot be displayed.

    and this is the simple script

    #cerlbinperl

    use CGI;

    $q = new CGI;

    $inpt1 = $q->param('inpt1');

    print $q->header;

    print "<html><head></head><body>you typed $inpt1</body></html>";

    Under the properties for the CGI-bin Folder I have given it universal properties, under HTTP headers I have nothing, I see I can configure a MIME under file types, when I click on there are none.
    So do I put in .cgi in the file extension, then what is the MIME config.

  10. #6
  11. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Aug 2000
    Location
    Cape Town, WP, South Africa
    Posts
    39
    Rep Power
    14
    I see the full error is

    HTTP 500 - Internal server error
    Internet Explorer

  12. #7
  13. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    May 2000
    Location
    Alkmaar, The Netherlands
    Posts
    123
    Rep Power
    14
    Try a simpler script first. That way you can decide wether the problem has to do with the config or with the syntax.
    <BLOCKQUOTE><font size="1" face="Verdana,Arial,Helvetica">code:</font><HR><pre>
    #!cerlbinperl

    print << "EOF";

    Content-type: text/html

    <HTML>
    <HEAD></HEAD>
    <BODY>
    Hello World!
    </BODY>
    </HTML>
    EOF

    exit;
    [/code]

    ------------------
    Good luck,
    Bas

    ------------------
    E-mail me at: b.vandermeijden@pecoma.nl
  14. #8
  15. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Aug 2000
    Location
    Cape Town, WP, South Africa
    Posts
    39
    Rep Power
    14
    tried your script and does not work
    I went into the microsoft management console and I see I can do things with mime files, Am i on the right track. but I have no idea what to do with mime
  16. #9
  17. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    May 2000
    Location
    Alkmaar, The Netherlands
    Posts
    123
    Rep Power
    14
    Let's start over a little bit.

    What Perl distribution are you using?

  18. #10
  19. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Aug 2000
    Location
    Cape Town, WP, South Africa
    Posts
    39
    Rep Power
    14
    I am using the ActivePerl 5.6.0.616
  20. #11
  21. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    May 2000
    Location
    Alkmaar, The Netherlands
    Posts
    123
    Rep Power
    14
    Visit http://www.activestate.com/Products/...cs/index.html. Here you can find documentation on how to configure IIS 4 for activestate.

    ------------------
    Good luck,
    Bas

    ------------------
    E-mail me at: b.vandermeijden@pecoma.nl

IMN logo majestic logo threadwatch logo seochat tools logo