• Active Perl & CGI Scripts

    Author
    Topic
    #393445

    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 🙂

    Viewing 0 reply threads
    Author
    Replies
    • #713366

      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[/url]

      The content of the file is below:

      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.

      Hope this helps

      • #713701

        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 🙂

      • #713702

        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 🙂

    Viewing 0 reply threads
    Reply To: Active Perl & CGI Scripts

    You can use BBCodes to format your content.
    Your account can't use all available BBCodes, they will be stripped before saving.

    Your information: