Re: Errors in the wrong place and wrong format

2014-11-24 Thread Worik Stanton
On 21/11/14 04:19, Perrin Harkins wrote: > I think that only redirects errors logged with Apche2::Log, not all of > STDERR. There might be a workaround for capturing STDERR. I'd try searching > the mailing list archives. > > - Perrin I get "die" erors in one log file (the one specified for my vir

Prototype mismatch

2014-11-17 Thread Worik Stanton
I get the following messages in my apache2/error.log when I restart. Why is that? What steps should I take to diagnose the problem? The line in the script where this ocures says: use FileHandle; cheers Worik Prototype mismatch: sub Apache::AdMachine::Track::LOCK_UN: none vs () Prototype mism

Re: $r->path_info unreliable?

2014-06-18 Thread Worik Stanton
On 19/06/14 14:11, Jie Gao wrote: > * Worik Stanton wrote: > >> Date: Thu, 19 Jun 2014 12:13:10 +1200 >> From: Worik Stanton >> To: mod_perl list >> Subject: $r->path_info unreliable? >> User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/2010

Re: $r->path_info unreliable?

2014-06-18 Thread Worik Stanton
On 19/06/14 13:12, Jie Gao wrote: > Could it be that after the URI --> filename translation, there is > indeed nothing left there? > > A resource referred to by the "Location" directive does not > necessarily correspond to a local file. I am not sure. I do not do any translation deliberately.

$r->path_info unreliable?

2014-06-18 Thread Worik Stanton
In my handler I call $r->path_info to determine the path used to call my script. I am trying to have a test version of my code using the same module but which reads different data based on the path. So I have: SetHandler perl-script PerlResponseHandler Apache::MyPackage::FrontEnd2

Why is RecuestRec::path_info sometimes empty?

2014-06-18 Thread Worik Stanton
In my handler I call $r->path_info to determine the path used to call my script. I am trying to have a test version of my code using the same module but which reads different data based on the path. So I have: SetHandler perl-script PerlResponseHandler Apache::MyPackage::FrontEnd2

Re: Trouble with script execution

2014-05-18 Thread Worik Stanton
On 19/05/14 12:13, Brad Van Sickle wrote: > Yep you need to restart to see your changes. I am sure I read somewhere that mod_perl monitors scripts and reloads them if the modification date changes. But oh well. It definitely notices sometimes. cheers Worik -- The only true evil is turning peo

Re: What about debugging?

2014-05-18 Thread Worik Stanton
On 19/05/14 12:03, Worik Stanton wrote: > Is there a way to get useful debugging info? > > I am getting messages like: > > "failed to resolve handler `Apache::AdMachine::MyHandler;' > Excuse my sillieness. `Apache::AdMachine::MyHandler;' had a ';&#x

Re: Trouble with script execution

2014-05-18 Thread Worik Stanton
On 19/05/14 11:34, John Dunlap wrote: > No, you have to restart the server for code changes to be noticed. Does that mean I have to restart my server for every change to a script? Worik -- The only true evil is turning people into things Granny Weath

What about debugging?

2014-05-18 Thread Worik Stanton
Is there a way to get useful debugging info? I am getting messages like: "failed to resolve handler `Apache::AdMachine::MyHandler;' Which says something is wrong, but offers no clue. If I have a bug like: my $z = ; # Clearly wrong I get a useful error message. So when I see: "failed to re

Trouble with script execution

2014-05-18 Thread Worik Stanton
I am having a nproblem executing my handler. The short of it is it is when I make a change to the script I have to restart the server to get it noticed, and it does not always call the same code. The lng of it: I have a package with a 'handler' function. It starts... package Apache::Script; us

Re: API Docs

2014-05-17 Thread Worik Stanton
On 16/05/14 21:09, André Warnier wrote: > Maybe you should start here : > https://perl.apache.org/docs/2.0/user/handlers/intro.html#What_are_Handlers_ > Thank you. That is very useful Worik -- The only true evil is turning people into things Granny

Re: Testing mod_perl

2014-05-16 Thread Worik Stanton
and am making some progress. I have used the API today to get document_root (thank-you j...@lariat.co) and to filter by IP. cheers Worik > > > On Wed, May 14, 2014 at 5:01 PM, Worik Stanton wrote: > >> On another matter... >> >> On 15/05/14 05:16, Perrin Ha

Re: API Docs

2014-05-16 Thread Worik Stanton
as linked to now from the documentation at perl.apache.org. Now I can see what I was missing, a "handler" method from a registered module Worik > > - Perrin > > On Wed, May 14, 2014 at 7:52 PM, Worik Stanton > wrote: >> I am still trying to fathom the

Testing mod_perl

2014-05-15 Thread Worik Stanton
On another matter... On 15/05/14 05:16, Perrin Harkins wrote: > simpler things like PerlSetVar. There is an automated test for this > though: > http://cpansearch.perl.org/src/PHRED/mod_perl-2.0.8/t/response/TestApache/conftree.pm I have not used this testing frame work before (other than watch t

Re: Trouble with mod_perl API: E.g., Apache2::Directive::conftree()

2014-05-15 Thread Worik Stanton
tation to go with it? > > I'd suggest doing some more basic debugging, e.g. > > use Data::Dumper; > print Dumper $tree->as_hash; Thank you. That is helpful too. cheers Worik > > - Perrin > > On Tue, May 13, 2014 at 8:24 PM, Worik Stanton > wrote:

API Docs

2014-05-14 Thread Worik Stanton
I am still trying to fathom the API. I have struck a snag with the documentation. https://perl.apache.org/docs/2.0/api/Apache2/Connection.html#Synopsis says use Apache2::Connection (); use Apache2::RequestRec (); my $c = $r->connection; What is $r? I am missing something obvious,

Trouble with mod_perl API: E.g., Apache2::Directive::conftree()

2014-05-13 Thread Worik Stanton
I am having a lot of trouble with mod_perl APIs. The short of it is that when I say: use Apache2::Directive (); my $tree = Apache2::Directive::conftree(); my $documentroot = $tree->lookup('DocumentRoot'); warn "\$documentroot '$documentroot'"; I get: [Wed May 14 12:13:43 2014] -e: Use of uniniti