Re: [Catalyst] Canot get application working on IIS7 via FastCGI

2012-10-23 Thread Lyle

On 23/10/2012 22:31, Tomas Doran wrote:

On 23 Oct 2012, at 22:03, Lyle wrote:


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.

How is it broken?

Because, as much as possible, code should attempt to separate concerns.


ok


The pwd should be the responsibility of the web server layer, not a dependency 
of your application component.


So when web servers are inconsistent, why shouldn't the application be 
sure it's pwd is where it's installed?



Standard daemonization techniques include a chdir('/') step

which is always going to ruin relative paths.

Your application precluding your web stack from being a daemon is a pretty big 
ask, no?


Why would a chdir in the application affect the daemons pwd? Or are you 
talking about the application running as a daemon itself?



Lyle


___
List: Catalyst@lists.scsys.co.uk
Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst
Searchable archive: http://www.mail-archive.com/catalyst@lists.scsys.co.uk/
Dev site: http://dev.catalyst.perl.org/


Re: [Catalyst] Canot get application working on IIS7 via FastCGI

2012-10-23 Thread Tomas Doran

On 23 Oct 2012, at 22:03, Lyle wrote:

>>> 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.
> 
> How is it broken?

Because, as much as possible, code should attempt to separate concerns.

The pwd should be the responsibility of the web server layer, not a dependency 
of your application component.

Standard daemonization techniques include a chdir('/') step 

which is always going to ruin relative paths.

Your application precluding your web stack from being a daemon is a pretty big 
ask, no?

Cheers
t0m


___
List: Catalyst@lists.scsys.co.uk
Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst
Searchable archive: http://www.mail-archive.com/catalyst@lists.scsys.co.uk/
Dev site: http://dev.catalyst.perl.org/


Re: [Catalyst] Canot get application working on IIS7 via FastCGI

2012-10-23 Thread Lyle

On 23/10/2012 21:42, Tomas Doran wrote:

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

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.


How is it broken?


Lyle


___
List: Catalyst@lists.scsys.co.uk
Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst
Searchable archive: http://www.mail-archive.com/catalyst@lists.scsys.co.uk/
Dev site: http://dev.catalyst.perl.org/


Re: [Catalyst] Canot get application working on IIS7 via FastCGI

2012-10-23 Thread Tomas Doran

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.

Cheers
t0m
___
List: Catalyst@lists.scsys.co.uk
Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst
Searchable archive: http://www.mail-archive.com/catalyst@lists.scsys.co.uk/
Dev site: http://dev.catalyst.perl.org/


Re: [Catalyst] Canot get application working on IIS7 via FastCGI

2012-10-23 Thread Tomas Doran

On 23 Oct 2012, at 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!
> 
> I cannot thank the Catalyst community enough for bearing with me and taking 
> the time to provide all the suggestions and support I have received!

Woop!

Really glad that's fixed for you :-D

I know there were a few things you worked out during this discussion / issue 
that it'd be worthwhile clarifying in the documentation…

The one I know for sure, I've already done:

http://git.shadowcat.co.uk/gitweb/gitweb.cgi?p=catagits/Catalyst-Manual.git;a=commitdiff;h=689b0b148a6d4e4c6257618f412460d925c11659

Please could someone offer a patch to fix / clarify this? 
(git://git.shadowcat.co.uk/catagits/Catalyst-Runtime.git)

TIA
t0m


___
List: Catalyst@lists.scsys.co.uk
Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst
Searchable archive: http://www.mail-archive.com/catalyst@lists.scsys.co.uk/
Dev site: http://dev.catalyst.perl.org/


RE: [Catalyst] Canot get application working on IIS7 via FastCGI

2012-10-23 Thread Craig Chant
Hey Lyle,

Thanks for the heads up, at least I'm now aware of potential issues for file 
handling, though I usually wrap it in a Perl module for authentication and 
deliver them that way, though I believe Catalyst has built in functionality for 
this.

Still a lot to get my head round for sure.

Regards,

Craig.

-Original Message-
From: Lyle [mailto:webmas...@cosmicperl.com]
Sent: 23 October 2012 12:05
To: catalyst@lists.scsys.co.uk
Subject: Re: [Catalyst] Canot get application working on IIS7 via FastCGI

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.

if ( $ENV{'SERVER_SOFTWARE'} =~ /IIS/ ) {
   ...
}

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.


Lyle


___
List: Catalyst@lists.scsys.co.uk
Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst
Searchable archive: http://www.mail-archive.com/catalyst@lists.scsys.co.uk/
Dev site: http://dev.catalyst.perl.org/
This Email and any attachments contain confidential information and is intended 
solely for the individual to whom it is addressed. If this Email has been 
misdirected, please notify the author as soon as possible. If you are not the 
intended recipient you must not disclose, distribute, copy, print or rely on 
any of the information contained, and all copies must be deleted immediately. 
Whilst we take reasonable steps to try to identify any software viruses, any 
attachments to this e-mail may nevertheless contain viruses, which our 
anti-virus software has failed to identify. You should therefore carry out your 
own anti-virus checks before opening any documents. HomeLoan Partnership will 
not accept any liability for damage caused by computer viruses emanating from 
any attachment or other document supplied with this e-mail. HomeLoan 
Partnership reserves the right to monitor and archive all e-mail communications 
through its network. No representative or employee of HomeLoan Partnership has 
the authority to enter into any contract on behalf of HomeLoan Partnership by 
email. HomeLoan Partnership is a trading name of H L Partnership Limited, 
registered in England and Wales with Registration Number 5011722. Registered 
office: 26-34 Old Street, London, EC1V 9QQ. H L Partnership Limited is 
authorised and regulated by the Financial Services Authority.

___
List: Catalyst@lists.scsys.co.uk
Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst
Searchable archive: http://www.mail-archive.com/catalyst@lists.scsys.co.uk/
Dev site: http://dev.catalyst.perl.org/


Re: [Catalyst] Canot get application working on IIS7 via FastCGI

2012-10-23 Thread Lyle

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.


if ( $ENV{'SERVER_SOFTWARE'} =~ /IIS/ ) {
  ...
}

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.


Lyle


___
List: Catalyst@lists.scsys.co.uk
Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst
Searchable archive: http://www.mail-archive.com/catalyst@lists.scsys.co.uk/
Dev site: http://dev.catalyst.perl.org/


RE: [Catalyst] Canot get application working on IIS7 via FastCGI

2012-10-23 Thread Craig Chant
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!

I cannot thank the Catalyst community enough for bearing with me and taking the 
time to provide all the suggestions and support I have received!

I was getting very frustrated and disheartened and even popped over to the 
Mojolicious mailing list to see what they had to offer, but I must confess, the 
reply I got was obnoxious and rude and am so glad I stuck with Catalyst, I 
can't stand people who thinks a good reply to anyone's thread is 'Google is 
your friend', Google is no-one's friend especially not mine as trawling through 
countless threads with contradicting suggestions does not equate to support or 
a solution, especially for someone who has a disability and finds reading very 
difficult!

I know I've got a long way to go and I'm sure the framework has a lot of 
frustration and hurt waiting in the wings for me, but at least I can now start 
to develop and see where it takes me.

Oh, I would like to point out for clarity that the '500 Server Error', I 
reported yesterday after once more reconfiguring the IIS mapping, was due to a 
keying error on my part and nothing to do with the problem I was experiencing. 
So apologies if I sent anyone in the wrong direction!

Again, thank you for your support, it really is appreciated.

Regards,

Craig.


-Original Message-
From: Tomas Doran [mailto:bobtf...@bobtfish.net]
Sent: 22 October 2012 19:49
To: The elegant MVC web framework
Subject: Re: [Catalyst] Canot get application working on IIS7 via FastCGI


On 18 Oct 2012, at 14:15, Craig Chant wrote:
> Here is the output for the /librarydocs path.
>
>
> *** $env
>
> $VAR1 = {
>  'psgi.multiprocess' => 1,
>  'SCRIPT_NAME' => '',
>  'PATH_INFO' => '/',



>  'REQUEST_URI' => '/librarydocs'

Actually, do you you have the 'use_request_uri_for_path' config variable set, 
or not?

(https://metacpan.org/module/Catalyst#CONFIGURATION)

As setting that to true may fix your issues..

Cheers
t0m


___
List: Catalyst@lists.scsys.co.uk
Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst
Searchable archive: http://www.mail-archive.com/catalyst@lists.scsys.co.uk/
Dev site: http://dev.catalyst.perl.org/
This Email and any attachments contain confidential information and is intended 
solely for the individual to whom it is addressed. If this Email has been 
misdirected, please notify the author as soon as possible. If you are not the 
intended recipient you must not disclose, distribute, copy, print or rely on 
any of the information contained, and all copies must be deleted immediately. 
Whilst we take reasonable steps to try to identify any software viruses, any 
attachments to this e-mail may nevertheless contain viruses, which our 
anti-virus software has failed to identify. You should therefore carry out your 
own anti-virus checks before opening any documents. HomeLoan Partnership will 
not accept any liability for damage caused by computer viruses emanating from 
any attachment or other document supplied with this e-mail. HomeLoan 
Partnership reserves the right to monitor and archive all e-mail communications 
through its network. No representative or employee of HomeLoan Partnership has 
the authority to enter into any contract on behalf of HomeLoan Partnership by 
email. HomeLoan Partnership is a trading name of H L Partnership Limited, 
registered in England and Wales with Registration Number 5011722. Registered 
office: 26-34 Old Street, London, EC1V 9QQ. H L Partnership Limited is 
authorised and regulated by the Financial Services Authority.

___
List: Catalyst@lists.scsys.co.uk
Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst
Searchable archive: http://www.mail-archive.com/catalyst@lists.scsys.co.uk/
Dev site: http://dev.catalyst.perl.org/


Re: [Catalyst] Canot get application working on IIS7 via FastCGI

2012-10-22 Thread Tomas Doran

On 18 Oct 2012, at 14:15, Craig Chant wrote:
> Here is the output for the /librarydocs path.
> 
> 
> *** $env
> 
> $VAR1 = {
>  'psgi.multiprocess' => 1,
>  'SCRIPT_NAME' => '',
>  'PATH_INFO' => '/',



>  'REQUEST_URI' => '/librarydocs'

Actually, do you you have the 'use_request_uri_for_path' config variable set, 
or not?

(https://metacpan.org/module/Catalyst#CONFIGURATION)

As setting that to true may fix your issues..

Cheers
t0m


___
List: Catalyst@lists.scsys.co.uk
Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst
Searchable archive: http://www.mail-archive.com/catalyst@lists.scsys.co.uk/
Dev site: http://dev.catalyst.perl.org/


Re: [Catalyst] Canot get application working on IIS7 via FastCGI

2012-10-22 Thread Tomas Doran

On 18 Oct 2012, at 14:15, Craig Chant wrote:

> Here is the output for the /librarydocs path.
> 
> 
> *** $env
> 
> $VAR1 = {
>  'psgi.multiprocess' => 1,
>  'SCRIPT_NAME' => '',
>  'PATH_INFO' => '/',


Right, that's IIS asking for a path of /

Ergo Catalyst serves / :_)

I know other people have got this working on IIS7, so it must be possible to 
get the correct path passed to your app (but I don't know how)..

Cheers
t0m



___
List: Catalyst@lists.scsys.co.uk
Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst
Searchable archive: http://www.mail-archive.com/catalyst@lists.scsys.co.uk/
Dev site: http://dev.catalyst.perl.org/


RE: [Catalyst] Canot get application working on IIS7 via FastCGI

2012-10-22 Thread Craig Chant
Hi Tony,

There was no move to IIS, there is only one app and it is on IIS, the devel 
server works fine though when the mysapp_server.pl script is run.

You've lost me with the mapping I'm afraid.

What am I mapping to create the StaticFile entry? What's 'Static File Module' 
and what's the other entry as the screen shot is chopped off?

Is it a module mapping, managed handler, script, wildcard?

Please can you advise what part of the Catalyst FastCGI Wiki instructions that 
is on http://wiki.catalystframework.org/wiki/deployment/iis7_fastcgi

I can't find any mention of this additional mapping, there only seems to be one 
entry plus the page is missing all the images so is a nightmare to follow.

Thanks,

Craig.


From: anthony.okusa...@usbank.com [mailto:anthony.okusa...@usbank.com]
Sent: 22 October 2012 16:34
To: The elegant MVC web framework
Subject: RE: [Catalyst] Canot get application working on IIS7 via FastCGI

Craig
I assume your application works using the built in development server 
prior to moving it over to IIS
Can you check your IIS 7 servers Handler mappings for your catalyst App (click 
on your app under sites in IIS manager and double click on Handler mappings)
below is what I have mine setup to use. This ensures that files are handled by 
the staticFileModule (the order is important)

Hope this helps.


[cid:image001.jpg@01CDB076.6FA905F0]

Thanks

Tony B. Okusanya
Midrange Automation




From:Craig Chant 
mailto:cr...@homeloanpartnership.com>>
To:The elegant MVC web framework 
mailto:catalyst@lists.scsys.co.uk>>
Date:    10/22/2012 03:38 AM
Subject:    RE: [Catalyst] Canot get application working on IIS7 via FastCGI




Well  I've provided everything you requested, but not had a reply from you, 
shall I assume Catalyst doesn't work on IIS until I hear to the contrary?

-Original Message-
From: Tomas Doran [mailto:bobtf...@bobtfish.net]
Sent: 17 October 2012 21:24
To: The elegant MVC web framework
Subject: Re: [Catalyst] Canot get application working on IIS7 via FastCGI


On 17 Oct 2012, at 16:49, Craig Chant wrote:

> Hi,
>
> I've been going round in circles unable to find any help on why my catalyst 
> application won't work on IIS7 Windows Server 2008 R2
>
> I find all the documentation to be incorrect,, such as setting the path to 
> '*' stops all static content being served from the root/static directory , I 
> had to put '*.' For images etc to show.
>

Patch please?

> Now I cannot get any path to be recognised, 
> http://mydomain/mycontroller/mymethod does nothing, and all that will load is 
> the Root.pm -> sub index :Path :Args(0) method.
>

Loading the wrong URI is significantly different to doing nothing, no?

> It doesn't matter what URL I point my browser to all I ever get is the 
> welcome screen from the Root.pm index method.
>
> If I use localhost for the devel server the app resolves the URL path 
> correctly and the associated action runs from the correct controller.
>
> However, over IIS7 it will not work and I cannot find any resources to 
> explain why.
>
> Please help!
>

You haven't given us anything to help try to explain why!

Please can you give us the debug output from startup of the app + the debug 
logs of asking for /, and asking for /a/uri/which/does/not/work ? Also, please 
add a Data::Dumper::Dumper to the Catalyst::Engine::prepare_path method - one 
at the start to dump $env, and two near the bottom to dump $c->request->uri and 
$c->request->base just after they've been assigned to...

Cheers
t0m


___
List: Catalyst@lists.scsys.co.uk<mailto:Catalyst@lists.scsys.co.uk>
Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst
Searchable archive: http://www.mail-archive.com/catalyst@lists.scsys.co.uk/
Dev site: http://dev.catalyst.perl.org/
This Email and any attachments contain confidential information and is intended 
solely for the individual to whom it is addressed. If this Email has been 
misdirected, please notify the author as soon as possible. If you are not the 
intended recipient you must not disclose, distribute, copy, print or rely on 
any of the information contained, and all copies must be deleted immediately. 
Whilst we take reasonable steps to try to identify any software viruses, any 
attachments to this e-mail may nevertheless contain viruses, which our 
anti-virus software has failed to identify. You should therefore carry out your 
own anti-virus checks before opening any documents. HomeLoan Partnership will 
not accept any liability for damage caused by computer viruses emanating from 
any attachment or other document supplied with this e-mail. HomeLoan 
Partnership reserves the right to monitor and archive all e-

RE: [Catalyst] Canot get application working on IIS7 via FastCGI

2012-10-22 Thread anthony . okusanya
Craig
I assume your application works using the built in development 
server prior to moving it over to IIS
Can you check your IIS 7 servers Handler mappings for your catalyst App 
(click on your app under sites in IIS manager and double click on Handler 
mappings)
below is what I have mine setup to use. This ensures that files are 
handled by the staticFileModule (the order is important)

Hope this helps.




Thanks

Tony B. Okusanya
Midrange Automation
 



From:   Craig Chant 
To: The elegant MVC web framework 
Date:   10/22/2012 03:38 AM
Subject:RE: [Catalyst] Canot get application working on IIS7 via 
FastCGI



Well  I've provided everything you requested, but not had a reply from 
you, shall I assume Catalyst doesn't work on IIS until I hear to the 
contrary?

-Original Message-
From: Tomas Doran [mailto:bobtf...@bobtfish.net]
Sent: 17 October 2012 21:24
To: The elegant MVC web framework
Subject: Re: [Catalyst] Canot get application working on IIS7 via FastCGI


On 17 Oct 2012, at 16:49, Craig Chant wrote:

> Hi,
>
> I've been going round in circles unable to find any help on why my 
catalyst application won't work on IIS7 Windows Server 2008 R2
>
> I find all the documentation to be incorrect,, such as setting the path 
to '*' stops all static content being served from the root/static 
directory , I had to put '*.' For images etc to show.
>

Patch please?

> Now I cannot get any path to be recognised, 
http://mydomain/mycontroller/mymethod does nothing, and all that will load 
is the Root.pm -> sub index :Path :Args(0) method.
>

Loading the wrong URI is significantly different to doing nothing, no?

> It doesn't matter what URL I point my browser to all I ever get is the 
welcome screen from the Root.pm index method.
>
> If I use localhost for the devel server the app resolves the URL path 
correctly and the associated action runs from the correct controller.
>
> However, over IIS7 it will not work and I cannot find any resources to 
explain why.
>
> Please help!
>

You haven't given us anything to help try to explain why!

Please can you give us the debug output from startup of the app + the 
debug logs of asking for /, and asking for /a/uri/which/does/not/work ? 
Also, please add a Data::Dumper::Dumper to the 
Catalyst::Engine::prepare_path method - one at the start to dump $env, and 
two near the bottom to dump $c->request->uri and $c->request->base just 
after they've been assigned to...

Cheers
t0m


___
List: Catalyst@lists.scsys.co.uk
Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst
Searchable archive: 
http://www.mail-archive.com/catalyst@lists.scsys.co.uk/
Dev site: http://dev.catalyst.perl.org/
This Email and any attachments contain confidential information and is 
intended solely for the individual to whom it is addressed. If this Email 
has been misdirected, please notify the author as soon as possible. If you 
are not the intended recipient you must not disclose, distribute, copy, 
print or rely on any of the information contained, and all copies must be 
deleted immediately. Whilst we take reasonable steps to try to identify 
any software viruses, any attachments to this e-mail may nevertheless 
contain viruses, which our anti-virus software has failed to identify. You 
should therefore carry out your own anti-virus checks before opening any 
documents. HomeLoan Partnership will not accept any liability for damage 
caused by computer viruses emanating from any attachment or other document 
supplied with this e-mail. HomeLoan Partnership reserves the right to 
monitor and archive all e-mail communications through its network. No 
representative or employee of HomeLoan Partnership has the authority to 
enter into any contract on behalf of HomeLoan Partnership by email. 
HomeLoan Partnership is a trading name of H L Partnership Limited, 
registered in England and Wales with Registration Number 5011722. 
Registered office: 26-34 Old Street, London, EC1V 9QQ. H L Partnership 
Limited is authorised and regulated by the Financial Services Authority.

___
List: Catalyst@lists.scsys.co.uk
Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst
Searchable archive: 
http://www.mail-archive.com/catalyst@lists.scsys.co.uk/
Dev site: http://dev.catalyst.perl.org/


U.S. BANCORP made the following annotations
-
Electronic Privacy Notice. This e-mail, and any attachments, contains 
information that is, or may be, covered by electronic communications privacy 
laws, and is also confidential and proprietary in nature. If you are not the 
intended recipient, please be advised that you are legally prohibited from 
retaining, using, copying, distributing, or otherwise disclos

RE: [Catalyst] Canot get application working on IIS7 via FastCGI

2012-10-22 Thread Craig Chant
Well  I've provided everything you requested, but not had a reply from you, 
shall I assume Catalyst doesn't work on IIS until I hear to the contrary?

-Original Message-
From: Tomas Doran [mailto:bobtf...@bobtfish.net]
Sent: 17 October 2012 21:24
To: The elegant MVC web framework
Subject: Re: [Catalyst] Canot get application working on IIS7 via FastCGI


On 17 Oct 2012, at 16:49, Craig Chant wrote:

> Hi,
>
> I've been going round in circles unable to find any help on why my catalyst 
> application won't work on IIS7 Windows Server 2008 R2
>
> I find all the documentation to be incorrect,, such as setting the path to 
> '*' stops all static content being served from the root/static directory , I 
> had to put '*.' For images etc to show.
>

Patch please?

> Now I cannot get any path to be recognised, 
> http://mydomain/mycontroller/mymethod does nothing, and all that will load is 
> the Root.pm -> sub index :Path :Args(0) method.
>

Loading the wrong URI is significantly different to doing nothing, no?

> It doesn't matter what URL I point my browser to all I ever get is the 
> welcome screen from the Root.pm index method.
>
> If I use localhost for the devel server the app resolves the URL path 
> correctly and the associated action runs from the correct controller.
>
> However, over IIS7 it will not work and I cannot find any resources to 
> explain why.
>
> Please help!
>

You haven't given us anything to help try to explain why!

Please can you give us the debug output from startup of the app + the debug 
logs of asking for /, and asking for /a/uri/which/does/not/work ? Also, please 
add a Data::Dumper::Dumper to the Catalyst::Engine::prepare_path method - one 
at the start to dump $env, and two near the bottom to dump $c->request->uri and 
$c->request->base just after they've been assigned to...

Cheers
t0m


___
List: Catalyst@lists.scsys.co.uk
Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst
Searchable archive: http://www.mail-archive.com/catalyst@lists.scsys.co.uk/
Dev site: http://dev.catalyst.perl.org/
This Email and any attachments contain confidential information and is intended 
solely for the individual to whom it is addressed. If this Email has been 
misdirected, please notify the author as soon as possible. If you are not the 
intended recipient you must not disclose, distribute, copy, print or rely on 
any of the information contained, and all copies must be deleted immediately. 
Whilst we take reasonable steps to try to identify any software viruses, any 
attachments to this e-mail may nevertheless contain viruses, which our 
anti-virus software has failed to identify. You should therefore carry out your 
own anti-virus checks before opening any documents. HomeLoan Partnership will 
not accept any liability for damage caused by computer viruses emanating from 
any attachment or other document supplied with this e-mail. HomeLoan 
Partnership reserves the right to monitor and archive all e-mail communications 
through its network. No representative or employee of HomeLoan Partnership has 
the authority to enter into any contract on behalf of HomeLoan Partnership by 
email. HomeLoan Partnership is a trading name of H L Partnership Limited, 
registered in England and Wales with Registration Number 5011722. Registered 
office: 26-34 Old Street, London, EC1V 9QQ. H L Partnership Limited is 
authorised and regulated by the Financial Services Authority.

___
List: Catalyst@lists.scsys.co.uk
Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst
Searchable archive: http://www.mail-archive.com/catalyst@lists.scsys.co.uk/
Dev site: http://dev.catalyst.perl.org/


RE: [Catalyst] Canot get application working on IIS7 via FastCGI

2012-10-18 Thread Craig Chant
Thanks Lyle / Hugh,

I've checked the following folders:-

c:\inetpub\logs\LogFiles
C:\Windows\System32\LogFiles\HTTPERR

Plus :- Turn Windows features on or off

But there isn't any options for :- Internet Information Services\World Wide Web 
Services\Health and Diagnostics\HTTP Logging

Though It seems logging is on as there are files in HTTPERR folder, but none 
containing any of the information wanted regarding :- debug or print STDERR

Like you suggested Lyle, I created the files myself for output!

Usually my perl apps run using :-

use CGI::Carp qw/fatalsToBrowser warningsToBrowser/;

So I get errors outputted to the browser. Though I would point out that 
whatever Active State did to the latest perl release for IIS, 'die' no longer 
outputs a header first so a lot of my scripts now give '500 Internal Server 
Error' and I'm having to fix them as I go, which is one of the reasons I want 
to refactor the app to use Catalyst, apart from gaining MVC cuteness and a 
better architecture I was hoping for better error handling being sent to the 
browser which it seems 'die' coupled with ' StackTrace' gives, so I'm moving in 
the right direction. :-)

Anyways, I got the required info in the end, so let's hope someone can advise 
on a solution as to why the path mapping isn't working?

Kind regards,

Craig.

-Original Message-
From: Lyle [mailto:webmas...@cosmicperl.com]
Sent: 18 October 2012 14:54
To: catalyst@lists.scsys.co.uk
Subject: Re: [Catalyst] Canot get application working on IIS7 via FastCGI

On 18/10/2012 14:15, Craig Chant wrote:
> Hi David / Adam,
>
> In the end I gave up with any of the so far provided suggestion, I've wasted 
> hours hunting for logs that just don't seem to exist.
>
> I'm not sure where you believe any of this output is going, but I've searched 
> every IIS log, windows event viewer, searched any file ending in .log and 
> even searched the entire server for any file modified with today's date. I 
> cannot find any file with the data you seem to think should exist. Where do 
> you believe STDERR goes on Windows IIS7?

In my experience, IIS will push STDERR to STDOUT which causes a number of 
problems. The best thing it to open STDERR to a file of your choice asap:

open( STDERR, ">>/path/to/log/file.log" );


Lyle


___
List: Catalyst@lists.scsys.co.uk
Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst
Searchable archive: http://www.mail-archive.com/catalyst@lists.scsys.co.uk/
Dev site: http://dev.catalyst.perl.org/
This Email and any attachments contain confidential information and is intended 
solely for the individual to whom it is addressed. If this Email has been 
misdirected, please notify the author as soon as possible. If you are not the 
intended recipient you must not disclose, distribute, copy, print or rely on 
any of the information contained, and all copies must be deleted immediately. 
Whilst we take reasonable steps to try to identify any software viruses, any 
attachments to this e-mail may nevertheless contain viruses, which our 
anti-virus software has failed to identify. You should therefore carry out your 
own anti-virus checks before opening any documents. HomeLoan Partnership will 
not accept any liability for damage caused by computer viruses emanating from 
any attachment or other document supplied with this e-mail. HomeLoan 
Partnership reserves the right to monitor and archive all e-mail communications 
through its network. No representative or employee of HomeLoan Partnership has 
the authority to enter into any contract on behalf of HomeLoan Partnership by 
email. HomeLoan Partnership is a trading name of H L Partnership Limited, 
registered in England and Wales with Registration Number 5011722. Registered 
office: 26-34 Old Street, London, EC1V 9QQ. H L Partnership Limited is 
authorised and regulated by the Financial Services Authority.

___
List: Catalyst@lists.scsys.co.uk
Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst
Searchable archive: http://www.mail-archive.com/catalyst@lists.scsys.co.uk/
Dev site: http://dev.catalyst.perl.org/


Re: [Catalyst] Canot get application working on IIS7 via FastCGI

2012-10-18 Thread Lyle

On 18/10/2012 14:15, Craig Chant wrote:

Hi David / Adam,

In the end I gave up with any of the so far provided suggestion, I've wasted 
hours hunting for logs that just don't seem to exist.

I'm not sure where you believe any of this output is going, but I've searched 
every IIS log, windows event viewer, searched any file ending in .log and even 
searched the entire server for any file modified with today's date. I cannot 
find any file with the data you seem to think should exist. Where do you 
believe STDERR goes on Windows IIS7?


In my experience, IIS will push STDERR to STDOUT which causes a number 
of problems. The best thing it to open STDERR to a file of your choice asap:


open( STDERR, ">>/path/to/log/file.log" );


Lyle


___
List: Catalyst@lists.scsys.co.uk
Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst
Searchable archive: http://www.mail-archive.com/catalyst@lists.scsys.co.uk/
Dev site: http://dev.catalyst.perl.org/


Re: [Catalyst] Canot get application working on IIS7 via FastCGI

2012-10-18 Thread Hugh Barnard
l::GEN3, 'IO::Handle' ),
>   'REQUEST_URI' => '/',
>   'psgi.nonblocking' => '',
>   'HTTPS_SERVER_SUBJECT' => '',
>   'APP_POOL_ID' => 'Members',
>   'psgi.url_scheme' => 'http',
>   'psgix.harakiri' => '',
>   'HTTP_HOST' => 'mydomain.com',
>   'psgi.input' => bless( \*Symbol::GEN1, 'IO::Handle' )
> };
>
> *->base
>
> $VAR1 = bless( do{\(my $o = 'http://mydomain.com/')}, 'URI::http' );
>
> *->uri
>
> $VAR1 = bless( do{\(my $o = 'http:// 
> mydomain.com/')<http://mydomain.com/%27%29>},
> 'URI::http' );
>
>
> Here is the output for the /librarydocs path.
>
>
> *** $env
>
> $VAR1 = {
>   'psgi.multiprocess' => 1,
>   'SCRIPT_NAME' => '',
>   'PATH_INFO' => '/',
>   'HTTP_ACCEPT' => 'text/html, application/xhtml+xml, */*',
>   'REQUEST_METHOD' => 'GET',
>   'psgi.multithread' => '',
>   'SCRIPT_FILENAME' => 'C:\\Websites\\members\\root\\librarydocs',
>   'INSTANCE_META_PATH' => '/LM/W3SVC/49',
>   'HTTPS_SERVER_ISSUER' => '',
>   'APP_POOL_CONFIG' =>
> 'C:\\inetpub\\temp\\apppools\\Members\\Members.config',
>   'SERVER_SOFTWARE' => 'Microsoft-IIS/7.5',
>   'AUTH_PASSWORD' => '',
>   'CERT_SERIALNUMBER' => '',
>   'HTTPS_SECRETKEYSIZE' => '',
>   'AUTH_TYPE' => '',
>   'HTTP_USER_AGENT' => 'Mozilla/5.0 (compatible; MSIE 9.0; Windows
> NT 6.1; WOW64; Trident/5.0)',
>   'QUERY_STRING' => '',
>   'REMOTE_PORT' => '60106',
>   'CERT_COOKIE' => '',
>   'URL' => '/librarydocs',
>   'HTTP_ACCEPT_LANGUAGE' => 'en-GB',
>   'FCGI_ROLE' => 'RESPONDER',
>       'HTTPS_KEYSIZE' => '',
>   'CONTENT_TYPE' => '',
>   'CERT_SUBJECT' => '',
>   'LOCAL_ADDR' => 'xxx.xxx.xxx.xxx',
>   'psgi.streaming' => 1,
>   'IIS_UrlRewriteModule' => '7.1.0871.0',
>   'GATEWAY_INTERFACE' => 'CGI/1.1',
>   'psgi.version' => [
>   1,
>   1
> ],
>   'HTTPS' => 'off',
>   'DOCUMENT_ROOT' => 'C:\\Websites\\members\\root',
>   'REMOTE_HOST' => 'xxx.xxx.xxx.xxx',
>   'psgi.run_once' => '',
>   'APPL_PHYSICAL_PATH' => 'C:\\Websites\\members\\root\\',
>   'PATH_TRANSLATED' => 'C:\\Websites\\members\\root\\librarydocs',
>   'CERT_ISSUER' => '',
>   'SERVER_NAME' => 'mydomain.com',
>   'HTTP_ACCEPT_ENCODING' => 'gzip, deflate',
>   'HTTP_CONNECTION' => 'Keep-Alive',
>   'INSTANCE_ID' => '49',
>   'CONTENT_LENGTH' => '0',
>   'AUTH_USER' => '',
>   'APPL_MD_PATH' => '/LM/W3SVC/49/ROOT',
>   'CERT_FLAGS' => '',
>   'LOGON_USER' => '',
>   'REMOTE_USER' => '',
>   'SERVER_PORT_SECURE' => '0',
>   'INSTANCE_NAME' => 'MEMBERS',
>   'SERVER_PORT' => '80',
>   'REMOTE_ADDR' => 'xxx.xxx.xxx.xxx',
>   'SERVER_PROTOCOL' => 'HTTP/1.1',
>   'psgi.errors' => bless( \*Symbol::GEN3, 'IO::Handle' ),
>   'REQUEST_URI' => '/librarydocs',
>   'psgi.nonblocking' => '',
&g

RE: [Catalyst] Canot get application working on IIS7 via FastCGI

2012-10-18 Thread Craig Chant
http' );


Here is the output for the /librarydocs path.


*** $env

$VAR1 = {
  'psgi.multiprocess' => 1,
  'SCRIPT_NAME' => '',
  'PATH_INFO' => '/',
  'HTTP_ACCEPT' => 'text/html, application/xhtml+xml, */*',
  'REQUEST_METHOD' => 'GET',
  'psgi.multithread' => '',
  'SCRIPT_FILENAME' => 'C:\\Websites\\members\\root\\librarydocs',
  'INSTANCE_META_PATH' => '/LM/W3SVC/49',
  'HTTPS_SERVER_ISSUER' => '',
  'APP_POOL_CONFIG' => 
'C:\\inetpub\\temp\\apppools\\Members\\Members.config',
  'SERVER_SOFTWARE' => 'Microsoft-IIS/7.5',
  'AUTH_PASSWORD' => '',
  'CERT_SERIALNUMBER' => '',
  'HTTPS_SECRETKEYSIZE' => '',
  'AUTH_TYPE' => '',
  'HTTP_USER_AGENT' => 'Mozilla/5.0 (compatible; MSIE 9.0; Windows NT 
6.1; WOW64; Trident/5.0)',
  'QUERY_STRING' => '',
  'REMOTE_PORT' => '60106',
  'CERT_COOKIE' => '',
  'URL' => '/librarydocs',
  'HTTP_ACCEPT_LANGUAGE' => 'en-GB',
  'FCGI_ROLE' => 'RESPONDER',
  'HTTPS_KEYSIZE' => '',
  'CONTENT_TYPE' => '',
  'CERT_SUBJECT' => '',
  'LOCAL_ADDR' => 'xxx.xxx.xxx.xxx',
  'psgi.streaming' => 1,
      'IIS_UrlRewriteModule' => '7.1.0871.0',
  'GATEWAY_INTERFACE' => 'CGI/1.1',
  'psgi.version' => [
  1,
  1
],
  'HTTPS' => 'off',
  'DOCUMENT_ROOT' => 'C:\\Websites\\members\\root',
  'REMOTE_HOST' => 'xxx.xxx.xxx.xxx',
  'psgi.run_once' => '',
  'APPL_PHYSICAL_PATH' => 'C:\\Websites\\members\\root\\',
  'PATH_TRANSLATED' => 'C:\\Websites\\members\\root\\librarydocs',
  'CERT_ISSUER' => '',
  'SERVER_NAME' => 'mydomain.com',
  'HTTP_ACCEPT_ENCODING' => 'gzip, deflate',
  'HTTP_CONNECTION' => 'Keep-Alive',
  'INSTANCE_ID' => '49',
  'CONTENT_LENGTH' => '0',
  'AUTH_USER' => '',
  'APPL_MD_PATH' => '/LM/W3SVC/49/ROOT',
  'CERT_FLAGS' => '',
  'LOGON_USER' => '',
  'REMOTE_USER' => '',
  'SERVER_PORT_SECURE' => '0',
  'INSTANCE_NAME' => 'MEMBERS',
  'SERVER_PORT' => '80',
  'REMOTE_ADDR' => 'xxx.xxx.xxx.xxx',
  'SERVER_PROTOCOL' => 'HTTP/1.1',
  'psgi.errors' => bless( \*Symbol::GEN3, 'IO::Handle' ),
  'REQUEST_URI' => '/librarydocs',
  'psgi.nonblocking' => '',
  'HTTPS_SERVER_SUBJECT' => '',
  'APP_POOL_ID' => 'Members',
  'psgi.url_scheme' => 'http',
  'psgix.harakiri' => '',
  'HTTP_HOST' => 'mydomain.com',
  'psgi.input' => bless( \*Symbol::GEN1, 'IO::Handle' )
};

*->base

$VAR1 = bless( do{\(my $o = 'http://mydomain.com/')}, 'URI::http' );

*->uri

$VAR1 = bless( do{\(my $o = 'http:// mydomain.com/')}, 'URI::http' );


Hopefully you now have the information you need to advice on the problem.

Let me know if you need anything else.

Kind regards,

Craig.

-Original Message-
From: David Schmidt [mailto:davew...@gmx.at]
Sent: 18 October 2012 12:34
To: The elegant MVC web framework
Subject: Re: [Catalyst] Canot get application working on IIS7 via FastCGI

> As for the Data::Dumper information you requested, you will need to give me 
> more guidance because I can't get it to output anything?
>
> Firstly I cannot find the context variable '$c' , there is a '$ctx' , I 
> assume this is what was meant?
>
> I added
>
> dump($env);
> dump($ctx->request->uri);
> dump($ctx->request->base);

I am just guessing here but what I think you ought to do is

1)
enable debug output of your application by adding the -Debug flag to your use 
Catalyst statement

2)
use Data::Dumper;
$ctx->log->debug(Dumper($ctx->request->uri))
...

___
List: Catalyst@lists.scsys.co.uk
Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst
Searchable archive: http://www.mail-archive.com/catalyst@lists.scsys.co.uk/
Dev site: http://dev.catalyst.perl.org/
This Email and any attachments contain confidential information and is intended 
solely for the individual to whom it is addressed. If this Email has been 
misdirected, please notify the author as soon as possible. If you are not the 
intended recipient you must not disclose, distribute, copy, print or rely on 
any of the information contained, and all copies must be deleted immediately. 
Whilst we take reasonable steps to try to identify any software viruses, any 
attachments to this e-mail may nevertheless contain viruses, which our 
anti-virus software has failed to identify. You should therefore carry out your 
own anti-virus checks before opening any documents. HomeLoan Partnership will 
not accept any liability for damage caused by computer viruses emanating from 
any attachment or other document supplied with this e-mail. HomeLoan 
Partnership reserves the right to monitor and archive all e-mail communications 
through its network. No representative or employee of HomeLoan Partnership has 
the authority to enter into any contract on behalf of HomeLoan Partnership by 
email. HomeLoan Partnership is a trading name of H L Partnership Limited, 
registered in England and Wales with Registration Number 5011722. Registered 
office: 26-34 Old Street, London, EC1V 9QQ. H L Partnership Limited is 
authorised and regulated by the Financial Services Authority.
___
List: Catalyst@lists.scsys.co.uk
Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst
Searchable archive: http://www.mail-archive.com/catalyst@lists.scsys.co.uk/
Dev site: http://dev.catalyst.perl.org/


Re: [Catalyst] Canot get application working on IIS7 via FastCGI

2012-10-18 Thread David Schmidt
> As for the Data::Dumper information you requested, you will need to give me 
> more guidance because I can't get it to output anything?
>
> Firstly I cannot find the context variable '$c' , there is a '$ctx' , I 
> assume this is what was meant?
>
> I added
>
> dump($env);
> dump($ctx->request->uri);
> dump($ctx->request->base);

I am just guessing here but what I think you ought to do is

1)
enable debug output of your application by adding the -Debug flag to
your use Catalyst statement

2)
use Data::Dumper;
$ctx->log->debug(Dumper($ctx->request->uri))
...

___
List: Catalyst@lists.scsys.co.uk
Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst
Searchable archive: http://www.mail-archive.com/catalyst@lists.scsys.co.uk/
Dev site: http://dev.catalyst.perl.org/


RE: [Catalyst] Canot get application working on IIS7 via FastCGI

2012-10-18 Thread Craig Chant
Hi David,

OIC, sorry I thought you were talking about some logs to do with Catalyst other 
than the standard inetpub W3SVCxxx server logs.

Here is what IIS logs show when I access the application.. (IP's have been 
obfuscated)

#Software: Microsoft Internet Information Services 7.5
#Version: 1.0
#Date: 2012-10-18 09:44:38
#Fields: date time s-ip cs-method cs-uri-stem cs-uri-query s-port cs-username 
c-ip cs(User-Agent) sc-status sc-substatus sc-win32-status time-taken
2012-10-18 09:44:38 xxx.xxx.xxx.xxx GET /static/images/catalyst_logo.png - 80 - 
xxx.xxx.xxx.xxx 
Mozilla/5.0+(compatible;+MSIE+9.0;+Windows+NT+6.1;+WOW64;+Trident/5.0) 200 0 0 
125
2012-10-18 09:44:38 xxx.xxx.xxx.xxx GET / - 80 - xxx.xxx.xxx.xxx 
Mozilla/5.0+(compatible;+MSIE+9.0;+Windows+NT+6.1;+WOW64;+Trident/5.0) 200 0 0 
2937
2012-10-18 09:44:38 xxx.xx.xxx.xxx GET /favicon.ico - 80 - xxx.xxx.xxx.xxx 
Mozilla/5.0+(compatible;+MSIE+9.0;+Windows+NT+6.1;+WOW64;+Trident/5.0) 200 0 0 
46
2012-10-18 09:45:04 xxx.xxx.xxx.xxx GET /librarydocs - 80 - xxx.xxx.xxx.xxx 
Mozilla/5.0+(compatible;+MSIE+9.0;+Windows+NT+6.1;+WOW64;+Trident/5.0) 200 0 0 
46

The first 3 GET entries are when I visit the root application URL (which 
displays the Catalyst welcome page) the 4th is the entry when navigating to the 
path for the LibraryDocs.pm controller.

As for the Data::Dumper information you requested, you will need to give me 
more guidance because I can't get it to output anything?

Firstly I cannot find the context variable '$c' , there is a '$ctx' , I assume 
this is what was meant?

I added

dump($env);
dump($ctx->request->uri);
dump($ctx->request->base);

After each assignment but nothing was displayed in the browser , nor were there 
any entries in the IIS logs.

I have tried 'print' , in front of those commands, nothing is outputted and 
nothing appears in the logs.

I've also tried 'die' but all I then get in the browser is a 400 error 'Bad 
Request'.

I've even outputted a header first with :- print "Content-type: text/html\n\n";

Before trying to output the variables, but again all I get is a 'Bad Request' 
error in my browser.

In fact I have now removed all added code by myself, the devel server fires up 
and I can use localhost:3000 to navigate to my application and it works fine.

However, using IE to navigate to the production IIS7 URL, all I get now is 400 
Bad Request, so now saying 'nothing works' is an accurate statement?

You really need to give me more guidance if I am to provide any of the 
information you request.

Kind regards,

Craig.

-Original Message-
From: David Schmidt [mailto:davew...@gmx.at]
Sent: 18 October 2012 07:44
To: The elegant MVC web framework
Subject: Re: [Catalyst] Canot get application working on IIS7 via FastCGI

> Sorry again for not providing enough information, I will try to give
> you what you need but I will need a little help doing that also, can
> you advise where the logs for the app when running over IIS7-> FastCGI
> are? Is there a file somewhere that gets written to each time the fastcgi.pl 
> script gets executed with this information in it?

I am pretty sure that you have to look where your webserver logs to.
With Apache it is possible to configure the log and errorlog location.
I suppose the same is possible for IIS7
Google it.

> Also can you guide me to where this change needs to be made
> 'Catalyst::Engine::prepare_path method ' for Data::Dumper:Dumper,
> where is the file that needs editing located? , Also is there a
> Catalyst method to spit out the data via Data::Dumper already integrated into 
> the framework, or do I need to import it myself?

Look for the file Catalyst/Engine.pm. then search for "prepare_path"

___
List: Catalyst@lists.scsys.co.uk
Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst
Searchable archive: http://www.mail-archive.com/catalyst@lists.scsys.co.uk/
Dev site: http://dev.catalyst.perl.org/
This Email and any attachments contain confidential information and is intended 
solely for the individual to whom it is addressed. If this Email has been 
misdirected, please notify the author as soon as possible. If you are not the 
intended recipient you must not disclose, distribute, copy, print or rely on 
any of the information contained, and all copies must be deleted immediately. 
Whilst we take reasonable steps to try to identify any software viruses, any 
attachments to this e-mail may nevertheless contain viruses, which our 
anti-virus software has failed to identify. You should therefore carry out your 
own anti-virus checks before opening any documents. HomeLoan Partnership will 
not accept any liability for damage caused by computer viruses emanating from 
any attachment or other document supplied with this e-mail. HomeLoan 
Partnersh

RE: [Catalyst] Canot get application working on IIS7 via FastCGI

2012-10-18 Thread Craig Chant
Hi David,

Ah gotcha, thanks found what I believe to be the culprit.

Though I think the code was auto generated when using the helper script to 
create the base application?

static  => {dirs => ['static', qr/^(images|css)/,]}

Replaced with...

'Plugin::Static::Simple'  => {dirs => ['static', qr/^(images|css)/,]}

The warning has now gone when firing up the devel server.

Much obliged

Craig.

-Original Message-
From: David Schmidt [mailto:davew...@gmx.at]
Sent: 18 October 2012 07:48
To: The elegant MVC web framework
Subject: Re: [Catalyst] Canot get application working on IIS7 via FastCGI

> Though while we are on the subject of  Catalyst plug-ins, I do get this 
> message in the devel server output when it's started.
>
> [warn] Deprecated 'static' config key used, please use the key 
> 'Plugin::Static::Simple' instead
>
> I've looked at the main application MyApp.pm in the lib folder and the 
> plug-ins loaded are :-
>
> use Catalyst qw/
> -Debug
> ConfigLoader
> Static::Simple
> StackTrace
> Session
> Session::Store::FastMmap
> Session::State::Cookie
> /;
>
> I've tried putting Plugin::Static::Simple insted but that falls over because 
> it can't locate the plug-in module, I've checked PPM and I have 
> 'Plugin::Static::Simple' Catalyst CPAN module installed so am little stumped 
> especially with the limited beginners knowledge I have of your framework so 
> perhaps you could advise.



Doesnt really matter in this case. It just warns you to use

MyApp->config(
'Plugin::Static::Simple' => {
...
}
);

instead of

MyApp->config(
static => {
...
}
);

___
List: Catalyst@lists.scsys.co.uk
Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst
Searchable archive: http://www.mail-archive.com/catalyst@lists.scsys.co.uk/
Dev site: http://dev.catalyst.perl.org/
This Email and any attachments contain confidential information and is intended 
solely for the individual to whom it is addressed. If this Email has been 
misdirected, please notify the author as soon as possible. If you are not the 
intended recipient you must not disclose, distribute, copy, print or rely on 
any of the information contained, and all copies must be deleted immediately. 
Whilst we take reasonable steps to try to identify any software viruses, any 
attachments to this e-mail may nevertheless contain viruses, which our 
anti-virus software has failed to identify. You should therefore carry out your 
own anti-virus checks before opening any documents. HomeLoan Partnership will 
not accept any liability for damage caused by computer viruses emanating from 
any attachment or other document supplied with this e-mail. HomeLoan 
Partnership reserves the right to monitor and archive all e-mail communications 
through its network. No representative or employee of HomeLoan Partnership has 
the authority to enter into any contract on behalf of HomeLoan Partnership by 
email. HomeLoan Partnership is a trading name of H L Partnership Limited, 
registered in England and Wales with Registration Number 5011722. Registered 
office: 26-34 Old Street, London, EC1V 9QQ. H L Partnership Limited is 
authorised and regulated by the Financial Services Authority.
___
List: Catalyst@lists.scsys.co.uk
Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst
Searchable archive: http://www.mail-archive.com/catalyst@lists.scsys.co.uk/
Dev site: http://dev.catalyst.perl.org/


Re: [Catalyst] Canot get application working on IIS7 via FastCGI

2012-10-17 Thread David Schmidt
> Though while we are on the subject of  Catalyst plug-ins, I do get this 
> message in the devel server output when it's started.
>
> [warn] Deprecated 'static' config key used, please use the key 
> 'Plugin::Static::Simple' instead
>
> I've looked at the main application MyApp.pm in the lib folder and the 
> plug-ins loaded are :-
>
> use Catalyst qw/
> -Debug
> ConfigLoader
> Static::Simple
> StackTrace
> Session
> Session::Store::FastMmap
> Session::State::Cookie
> /;
>
> I've tried putting Plugin::Static::Simple insted but that falls over because 
> it can't locate the plug-in module, I've checked PPM and I have 
> 'Plugin::Static::Simple' Catalyst CPAN module installed so am little stumped 
> especially with the limited beginners knowledge I have of your framework so 
> perhaps you could advise.



Doesnt really matter in this case. It just warns you to use

MyApp->config(
'Plugin::Static::Simple' => {
...
}
);

instead of

MyApp->config(
static => {
...
}
);

___
List: Catalyst@lists.scsys.co.uk
Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst
Searchable archive: http://www.mail-archive.com/catalyst@lists.scsys.co.uk/
Dev site: http://dev.catalyst.perl.org/


Re: [Catalyst] Canot get application working on IIS7 via FastCGI

2012-10-17 Thread David Schmidt
> Sorry again for not providing enough information, I will try to give you what 
> you need but I
> will need a little help doing that also, can you advise where the logs for 
> the app when
> running over IIS7-> FastCGI are? Is there a file somewhere that gets written 
> to each time
> the fastcgi.pl script gets executed with this information in it?

I am pretty sure that you have to look where your webserver logs to.
With Apache it is possible to configure the log and errorlog location.
I suppose the same is possible for IIS7
Google it.

> Also can you guide me to where this change needs to be made
> 'Catalyst::Engine::prepare_path method ' for Data::Dumper:Dumper, where is 
> the file that
> needs editing located? , Also is there a Catalyst method to spit out the data 
> via
> Data::Dumper already integrated into the framework, or do I need to import it 
> myself?

Look for the file Catalyst/Engine.pm. then search for "prepare_path"

___
List: Catalyst@lists.scsys.co.uk
Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst
Searchable archive: http://www.mail-archive.com/catalyst@lists.scsys.co.uk/
Dev site: http://dev.catalyst.perl.org/


RE: [Catalyst] Canot get application working on IIS7 via FastCGI

2012-10-17 Thread Craig Chant
Hello Tomas,

Many thanks for the quick reply, it really is appreciated.

I'll try to answer your comments as best I can and sorry if I haven't provided 
enough information or conveyed myself coherently enough.

> Patch please?

Do you mean there is a patch to address the path issue? '*.' vs '*'

Is this for Catalyst, perl, a CPAN module, IIS7?

Or do you mean what patch have I installed, if so, none to my knowledge, though 
I have installed a few CPAN Catalyst:: modules via perl PPM for DBI, Sessions 
and the dependencies.

Though while we are on the subject of  Catalyst plug-ins, I do get this message 
in the devel server output when it's started.

[warn] Deprecated 'static' config key used, please use the key 
'Plugin::Static::Simple' instead

I've looked at the main application MyApp.pm in the lib folder and the plug-ins 
loaded are :-

use Catalyst qw/
-Debug
ConfigLoader
Static::Simple
StackTrace
Session
Session::Store::FastMmap
Session::State::Cookie
/;

I've tried putting Plugin::Static::Simple insted but that falls over because it 
can't locate the plug-in module, I've checked PPM and I have 
'Plugin::Static::Simple' Catalyst CPAN module installed so am little stumped 
especially with the limited beginners knowledge I have of your framework so 
perhaps you could advise.

> Loading the wrong URI is significantly different to doing nothing, no?

Yes sorry if I gave the wrong impression, perhaps I should have worded it 
differently as I thought I had implied 'other than', maybe this would have been 
a better statement...

> "Now I cannot get any path to be recognised, 
http://mydomain/mycontroller/mymethod does nothing, *other than* load the 
Root.pm -> sub index :Path :Args(0) method."

Which is what is happening and I hope I've made things clearer as to exactly 
what I'm experiencing.

>You haven't given us anything to help try to explain why!
>Please can you give us the debug output from startup of the app + the debug 
>logs of asking for /, and asking for /a/uri/which/does/not/work ? Also, please 
>add a Data::Dumper::Dumper to the Catalyst::Engine::prepare_path method - one 
>at the start to dump $env, and two near the bottom to dump $c->request->uri 
>and $c->request->base just after they've been assigned to…

Sorry again for not providing enough information, I will try to give you what 
you need but I will need a little help doing that also, can you advise where 
the logs for the app when running over IIS7-> FastCGI are? Is there a file 
somewhere that gets written to each time the fastcgi.pl script gets executed 
with this information in it?

Also can you guide me to where this change needs to be made 
'Catalyst::Engine::prepare_path method ' for Data::Dumper:Dumper, where is the 
file that needs editing located? , Also is there a Catalyst method to spit out 
the data via Data::Dumper already integrated into the framework, or do I need 
to import it myself?

I hope you can assist as I've been looking forward to building my next app 
using your framework.

Many thanks,

Craig.


____________________
From: Tomas Doran [bobtf...@bobtfish.net]
Sent: 17 October 2012 21:24
To: The elegant MVC web framework
Subject: Re: [Catalyst] Canot get application working on IIS7 via FastCGI

On 17 Oct 2012, at 16:49, Craig Chant wrote:

> Hi,
>
> I’ve been going round in circles unable to find any help on why my catalyst 
> application won’t work on IIS7 Windows Server 2008 R2
>
> I find all the documentation to be incorrect,, such as setting the path to 
> ‘*’ stops all static content being served from the root/static directory , I 
> had to put ‘*.’ For images etc to show.
>

Patch please?

> Now I cannot get any path to be recognised, 
> http://mydomain/mycontroller/mymethod does nothing, and all that will load is 
> the Root.pm -> sub index :Path :Args(0) method.
>

Loading the wrong URI is significantly different to doing nothing, no?

> It doesn’t matter what URL I point my browser to all I ever get is the 
> welcome screen from the Root.pm index method.
>
> If I use localhost for the devel server the app resolves the URL path 
> correctly and the associated action runs from the correct controller.
>
> However, over IIS7 it will not work and I cannot find any resources to 
> explain why.
>
> Please help!
>

You haven't given us anything to help try to explain why!

Please can you give us the debug output from startup of the app + the debug 
logs of asking for /, and asking for /a/uri/which/does/not/work ? Also, please 
add a Data::Dumper::Dumper to the Catalyst::Engine::prepare_path method - one 
at the start to dump $env, and two near the bottom to dump $c->request->uri and 
$c-&

Re: [Catalyst] Canot get application working on IIS7 via FastCGI

2012-10-17 Thread Tomas Doran

On 17 Oct 2012, at 16:49, Craig Chant wrote:

> Hi,
>  
> I’ve been going round in circles unable to find any help on why my catalyst 
> application won’t work on IIS7 Windows Server 2008 R2
>  
> I find all the documentation to be incorrect,, such as setting the path to 
> ‘*’ stops all static content being served from the root/static directory , I 
> had to put ‘*.’ For images etc to show.
>  

Patch please?

> Now I cannot get any path to be recognised, 
> http://mydomain/mycontroller/mymethod does nothing, and all that will load is 
> the Root.pm -> sub index :Path :Args(0) method.
>  

Loading the wrong URI is significantly different to doing nothing, no?

> It doesn’t matter what URL I point my browser to all I ever get is the 
> welcome screen from the Root.pm index method.
>  
> If I use localhost for the devel server the app resolves the URL path 
> correctly and the associated action runs from the correct controller.
>  
> However, over IIS7 it will not work and I cannot find any resources to 
> explain why.
>  
> Please help!
>  

You haven't given us anything to help try to explain why!

Please can you give us the debug output from startup of the app + the debug 
logs of asking for /, and asking for /a/uri/which/does/not/work ? Also, please 
add a Data::Dumper::Dumper to the Catalyst::Engine::prepare_path method - one 
at the start to dump $env, and two near the bottom to dump $c->request->uri and 
$c->request->base just after they've been assigned to…

Cheers
t0m


___
List: Catalyst@lists.scsys.co.uk
Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst
Searchable archive: http://www.mail-archive.com/catalyst@lists.scsys.co.uk/
Dev site: http://dev.catalyst.perl.org/