Re: [Catalyst] New install getting "Wide character in syswrite" error
Good morning, On 22/09/10 at 4:35 PM +0100, Tomas Doran wrote: >On 22 Sep 2010, at 14:53, Charlie Garrison wrote: >>I think I already submitted a patch for this; yep, r13505. >> >>t0m, any chance of a new release of C::P::Session::State::URI? >>In the meantime I'll apply the above patch to the new dev's machine. > >This adds a test which fails. You appear to have forgotten to commit your >additions to the test >application? > >But sure as soon as that's fixed up :) Hmm, I somehow managed to miss one of the test files when committing. I'll get that fixed up. Thanks, Charlie -- Ꮚ Charlie Garrison ♊ O< ascii ribbon campaign - stop html mail - www.asciiribbon.org 〠 http://www.ietf.org/rfc/rfc1855.txt ___ 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/
[Catalyst] Remote authN not getting username from remote_user()
Hi, I'm using: Catalyst::Runtime -- 5.80022 Catalyst::Plugin::Authentication -- 0.10016 I'm finding that C::Request->remote_user is not returning my username when I have authenticated under apache, whereas the deprecated C::R->user does. This means that C::AuthN::Cred::Remote->authenticate fails under "option 2" -- elsif ($c->req->can('remote_user')) {...} -- since yes, it can(), but alas 'undef' is the return value. I'm unclear on how C::Request->remote_user is populated, or maybe I'd have figured out what's [not] going on here. Any pointers, hints, perl packages that may need an upgrade, etc? Thanks, --Trevor FWIW, here are relevant snippets from my App.pm and App::C::Root: __PACKAGE__->config( name => 'App', 'Plugin::Authentication' => { default_realm => 'remoterealm', realms => { remoterealm => { credential => { class=> 'Remote', }, store => {class => 'Null',}, }, }, }, ); sub begin : Private { my ($self, $c) = @_; my $r = $c->req; # returns yes, 'undef' warn "*** can remote_user? ", ($r->can('remote_user') ? 'yes' : 'no'), "\n"; my $ru = $r->remote_user; warn "*** remote_user: [", (defined $ru ? $ru : 'undef'), "]\n"; # returns yes, 'tleffler' warn "*** can user? ", ($r->can('user') ? 'yes' : 'no'), "\n"; my $u = $r->user; warn "*** user: [", (defined $u ? $u : 'undef'), "]\n"; # returns $VAR1 = undef; use Data::Dumper; warn "*** env...", Dumper $c->engine->env; unless ($c->user_exists) { unless ($c->authenticate({})) { warn "*** failed authN ***\n"; # I get here $c->response->status(HTTP::Status::RC_FORBIDDEN()); } } } ___ 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] New install getting "Wide character in syswrite" error
On 22 Sep 2010, at 14:53, Charlie Garrison wrote: I think I already submitted a patch for this; yep, r13505. t0m, any chance of a new release of C::P::Session::State::URI? In the meantime I'll apply the above patch to the new dev's machine. This adds a test which fails. You appear to have forgotten to commit your additions to the test application? But sure as soon as that's fixed up :) 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] New install getting "Wide character in syswrite" error
Good evening, On 22/09/10 at 7:24 AM -0600, Larry Leszczynski wrote: May be totally related but I have seen those symptoms when the body of a POST request gets read earlier in the request than usual, and then looks empty when it is supposed to be read (so the Content-Length is zero instead of whatever it should be). In my case I was calling $c->req->param inside prepare_path, and it seemed like it was sucking in the whole POST body, leaving it empty for when it needed to be accessed later. Thanks for that. I thought this issue seemed familiar. Fingers in too many pies and I just couldn't remember where I had seen it recently. It's an issue with Catalyst::Plugin::Session::State::URI. I don't have access to the problem machine right now, but I'm sure this will fix it. @@ -320,7 +320,7 @@ if ( my $param = $c->_session_plugin_config->{param} ) { # use param style rewriting -if ( my $sid = $c->request->param($param) ) { +if ( my $sid = $c->request->query_parameters->{$param} ) { $c->_sessionid_from_uri($sid); $c->_tried_loading_session_id(0); $c->log->debug(qq/Found sessionid "$sid" in query parameters/) I think I already submitted a patch for this; yep, r13505. t0m, any chance of a new release of C::P::Session::State::URI? In the meantime I'll apply the above patch to the new dev's machine. Charlie -- Ꮚ Charlie Garrison ♊ O< ascii ribbon campaign - stop html mail - www.asciiribbon.org 〠 http://www.ietf.org/rfc/rfc1855.txt ___ 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] New install getting "Wide character in syswrite" error
Hi Charlie - > once the problem starts the test server won't respond to any further > requests; requires a restart. Canceling the current request results in > following error: > > Caught exception in engine "Wrong Content-Length value: 52" May be totally related but I have seen those symptoms when the body of a POST request gets read earlier in the request than usual, and then looks empty when it is supposed to be read (so the Content-Length is zero instead of whatever it should be). In my case I was calling $c->req->param inside prepare_path, and it seemed like it was sucking in the whole POST body, leaving it empty for when it needed to be accessed later. HTH, Larry ___ 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] New install getting "Wide character in syswrite" error
On 22 Sep 2010, at 11:15, Charlie Garrison wrote: Any other suggestions? Using Devel::SimpleTrace or Carp::Always to get a backtrace of what is doing the bad syswrite would be helpful.. 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] Make the money format macro globally available.
Works like a charm. Thanks. -Original Message- From: Larry Leszczynski [mailto:lar...@emailplus.org] Sent: 21 September 2010 18:05 To: The elegant MVC web framework; catalyst@lists.scsys.co.uk Subject: Re: [Catalyst] Make the money format macro globally available. Hi Duncan - On Tue, 21 Sep 2010 17:52 +0100, "Duncan Garland" wrote: > How do you make the money macro available in all templates? > > [% USE money=format('%.2f') -%] > > Presumably something goes in here: > > __PACKAGE__->config( > TEMPLATE_EXTENSION => '.tt', > render_die => 1, > WRAPPER => 'wrapper.tt', > ); You can put commonly used macros, formats, etc. in a file named e.g. "pre_process_config.tt" in your main templates directory, then add "PRE_PROCESS" to your config: __PACKAGE__->config( TEMPLATE_EXTENSION => '.tt', render_die => 1, WRAPPER => 'wrapper.tt', PRE_PROCESS => 'pre_process_config.tt'. ); HTH, Larry ___ 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/ ___ 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] New install getting "Wide character in syswrite" error
Good evening, On 22/09/10 at 10:21 AM +0100, Tomas Doran wrote: How is this deployed? I mean, is this with the test server, or other? Using myapp_server.pl; eg: $ ./script/myapp_server.pl -k --port 3124 There was a test error when installing Catalyst::Plugin::Unicode::Encoding. I downgraded Encode to v2.39 and then Catalyst::Plugin::Unicode::Encoding installed cleanly. Aha: https://rt.cpan.org/Ticket/Display.html?id=61456 Upgrading LWP fixes the tests issue.. Yep. Upgrading LWP, Encode and C::P::Unicode::Encoding to latest versions was successful. Can you try version 1.0 of Unicode::Encoding to see if this fixes your issue? I tried that before doing above upgrade. It didn't fix the problem. I'm not getting the "Wide character in syswrite" error now, but the symptoms still persist. Also, once the problem starts the test server won't respond to any further requests; requires a restart. Canceling the current request results in following error: Caught exception in engine "Wrong Content-Length value: 52" Any other suggestions? Thanks, Charlie -- Ꮚ Charlie Garrison ♊ O< ascii ribbon campaign - stop html mail - www.asciiribbon.org 〠 http://www.ietf.org/rfc/rfc1855.txt ___ 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] New install getting "Wide character in syswrite" error
On 22 Sep 2010, at 04:00, Charlie Garrison wrote: Good afternoon, I setup an installation of our app for a new developer last night and keep getting the 'Caught exception in engine "Wide character in syswrite at...' error when making POST requests. Reading through the archives I expect this is a Unicode encoding problem. But I can't figure out where I'm going wrong with the new setup. (Note, the app works fine on 4 other workstations/servers, so I'm guessing it's a problem specific to this one setup.) How is this deployed? I mean, is this with the test server, or other? There was a test error when installing Catalyst::Plugin::Unicode::Encoding. I downgraded Encode to v2.39 and then Catalyst::Plugin::Unicode::Encoding installed cleanly. Aha: https://rt.cpan.org/Ticket/Display.html?id=61456 Upgrading LWP fixes the tests issue.. Thanks for the notification! Can you try version 1.0 of Unicode::Encoding to see if this fixes your issue? 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/