Results 1 to 3 of 3
  1. #1
    3 Star Lounger
    Join Date
    Apr 2002
    Location
    UK
    Posts
    298
    Thanks
    6
    Thanked 0 Times in 0 Posts

    Active Perl & CGI Scripts

    Hi,

    I've just installed Active Perl on my Windows 2000 web server hoping to run a specific CGI script but it doesn't work.

    When I access the script (which is an anti-spam measure called wpoison) all I get is the script itself displaying as a text file however I have managed to run the script from a command prompt and get (on the screen at least) the bogus HTML file it is designed to generate.

    I know virtually nothing about Perl so be a little, um, kind trying to explain this :-)

  2. #2
    Silver Lounger
    Join Date
    Jan 2001
    Location
    Indianapolis, Indiana, USA
    Posts
    1,862
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Active Perl & CGI Scripts

    It seems like your server is not processing the CGI files (perhaps with .pl extensions?)...

    You'll need to add a mapping for the desired extension(s) to the appropriate application.

    Here is a link to the local IIS Help file: http://localhost/iishelp/iis/misc/default....re/iiwarndf.htm

    The content of the file is below:
    <img src=/w3timages/blackline.gif width=33% height=2>
    Setting Application Mappings
    You can develop Web applications using a number of programming and scripting languages. Internet Information Services (IIS) uses the file name extension of a requested resource on your Web site to determine which ISAPI or CGI program to run to process a request. For example, a request for a file ending with an .asp extension causes the Web server to call the ASP program (Asp.dll) to process the request. The association of a file name extension with an ISAPI or CGI program is called application mapping. IIS is preconfigured to support common application mappings. You can add or remove mappings for all applications on a Web site or for individual applications.

    To map an extension to an application

    In the IIS snap-in, select the Web site or the starting point directory of an application.
    Open the directory's property sheets, and click the Home Directory, Virtual Directory, or Directory tab.
    Click the Configuration button.
    On the Mappings tab, click Add.
    In the Executable box, type the path to the ISAPI or CGI program that will process the file. You must specify a program in a local directory on the Web server.
    In the Extension box, type the file name extension you want to be associated with the ISAPI or CGI program. When the Web server receives a URL identifying a file with this extension, it calls the associated program to process the request.
    To allow the processing for files of this type in a directory with Script permission, select the Script Engine check box. When a directory has Script permission set (instead of Execute permission), only files associated with applications that are designated script engines can be processed in the directory.
    Important In the Mappings property sheet there is a column titled Verbs. In IIS 4.0, this column was entitled Exclusions; the change to verbs addresses future compatibility as more new HTTP verbs are added to the Hypertext Transport Protocol.

    To remove an application mapping In the Mappings property sheet, select the file name extension, and click the Remove button. Requests for files with this file name extension are no longer processed in this Web site or directory.

    <img src=/w3timages/blackline.gif width=33% height=2>

    Hope this helps

  3. #3
    3 Star Lounger
    Join Date
    Apr 2002
    Location
    UK
    Posts
    298
    Thanks
    6
    Thanked 0 Times in 0 Posts

    Thanks :-)

    Hi Mark,

    It wasn't the exact solution but it led me towards the one I ended up with ... I added the .cgi application mapping but that didn't work so I edited to mimic the .pl mapping and that did. Then I found the script didn't work perfectly so I ended up having to hack that too ... hmmm ... python seems easier at this point :-)

    Anyway ... thanks for your help :-)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •