[Catalyst] Canot get application working on IIS7 via FastCGI

Tomas Doran bobtfish at bobtfish.net
Tue Oct 23 20:42:52 GMT 2012

On 23 Oct 2012, at 12:04, Lyle wrote:

> On 23/10/2012 11:37, Craig Chant wrote:
>> Bingo - You are a genius Tom!
>> Thank you so, so much, I would never have found that switch buried in the documentation for a long, long time!
> As this is standard behaviour for IIS, Catalyst really should be setting this by default when it's running under IIS. I didn't realise Catalyst had missed this, otherwise I probably could have answered the op's question from the start.

The option is on by default in generated skeleton apps, and has been for quite a while (at least 2 years). However we can't set it by default as it breaks back compat (see the extensive explanation of the different strategies for path resolution one can employ next to the option).

This should be done at the Plack middleware level IMO - I.e. there should be middleware to synthesise a sane PATH_INFO - this is generic to anything that uses PATH_INFO (not just Catalyst), and it's where / how we already apply all of this conditional logic.

I'd +1 a patch to add a middleware for this (to Plack).

> IIS also doesn't have the pwd as the folder where the script is running. So you usually need to do:
> use FindBin qw ($RealBin $RealScript);
> use lib $FindBin::RealBin;
> chdir $RealBin;
> Otherwise you get issues when people try to open files with a relative path.

This is normal in other web servers also.

Doing that is broken, we provide $app->path_to so you don't ever have to do that.


More information about the Catalyst mailing list