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

Hello Monks,

I've recently started using CGI::Application and been very impressed. I'm now trying to move it to a Windows server (XP Pro SP2, IIS 6) and having a problem. In CGI::Application, you can define the run_mode like this:

$self->mode_param( path_info=> 1 );

This works great on Apache on my Mac, allowing me to have URLs like this:

http://localhost/cgi-bin/app_name.cgi/run_mode_name?params=values

that execute the app_name.cgi script with the the correct run_mode and the params.

When I try to do the same thing on the Windows machine, I get a 404 error...IIS isn't recognizing that app_name.cgi should be called, instead trying to execute 'run_mode_name' in the 'app_name.cgi' directory (which obviously doesn't exist. I know this is slightly off topic for this website, but does anyone here know if/how you can change the IIS settings to make this work? Or even a better way of describing the problem? I'm having trouble locating help.

Thanks so much

Andrew

Replies are listed 'Best First'.
Re: Configuring IIS for CGI::Application
by gellyfish (Monsignor) on Aug 11, 2005 at 16:35 UTC

    The PATH_INFO is disabled by default for Script mapped thing on IIS - you can turn it on by running:

    adsutil.vbs set w3svc/AllowPathInfoForScriptMappings TRUE
    adsutil.vbs will be found in \inetpub\adminscripts or somewhere under %WINDIR%\system32\inetsrv depending on your setup.

    /J\

      That doesn't seem to work for my setup...after making that change URLs like this:

      http://localhost/cgi-bin/app_name.cgi/run_mode_name?params=values

      Still give me 404 errors. Although, with the change, this address works: http://localhost/cgi-bin/app_name.cgi/?params=values

      while before only this worked.

      http://localhost/cgi-bin/app_name.cgi?params=values

      Is there a name for how I'm parsing the URL here?

      Also, and potentially of note, I know that on Apache mediawiki software allows you to create urls like

      http://en.wikipedia.org/wiki/Perl or http://localhost/wiki.php/Perl

      But on their installation page, it says this isn't possible on IIS. Is this the case for perl too? If so, then its not true CGI::Application can "run equally well on NT/IIS or any other CGI-compatible environment."