Re: does pnotes() work at all in 1.27? [RESOLVED]

2003-07-20 Thread Mark Maunder
ime.types"
>  -D SERVER_CONFIG_FILE="conf/httpd.conf"
>  -D ACCESS_CONFIG_FILE="conf/access.conf"
>  -D RESOURCE_CONFIG_FILE="conf/srm.conf"
> 
> Got a sniffer on the wire too and the output looks like this. The
> request is:
> GET / HTTP/1.1
> Host: testserver
> User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.0.1)
> Gecko/20021003
> Accept:
> text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,video/x-mng,image/png,image/jpeg,image/gif;q=0.2,text/css,*/*;q=0.1
> Accept-Language: en-us, en;q=0.50
> Accept-Encoding: gzip, deflate, compress;q=0.9
> Accept-Charset: ISO-8859-1, utf-8;q=0.66, *;q=0.66
> Keep-Alive: 300
> Connection: keep-alive
> Cache-Control: max-age=0
> 
> 
> And the response is:
> HTTP/1.1 200 OK
> Date: Sat, 19 Jul 2003 20:17:05 GMT
> Server: ZipTree
> Keep-Alive: timeout=15, max=100
> Connection: Keep-Alive
> Transfer-Encoding: chunked
> Content-Type: text/html
> 
> 1c
> Hello World!
> You are in main
> 0
> 
> 
> On Sat, 2003-07-19 at 07:34, James Hartling wrote:
> > I think Mark had tried it without Apache::Request.  Also, it was obvious at
> > some point that he wasn't in a subrequest ($r->is_main returned true, but no
> > pnote).   Mark, have you tested $r->notes, and is that working?  I notice
> > that your 'marktest' pnote test used a string value.  Perhaps pnotes insists
> > on storing refs, not strings - I've never tried it though.  You might also
> > start farther back in the request cycle and see if pnotes are being passed
> > along at any stage (Init, Access, Fixup, etc).
> > 
> > Jim
> > 
> > - Original Message -
> > From: "Stas Bekman" <[EMAIL PROTECTED]>
> > To: "Mark Maunder" <[EMAIL PROTECTED]>
> > Cc: "James Hartling" <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]>
> > Sent: Saturday, July 19, 2003 4:55 AM
> > Subject: Re: does pnotes() work at all in 1.27?
> > 
> > 
> > > Mark Maunder wrote:
> > > > Hi Stas,
> > > >
> > > > Thanks for the input. Tried that and no luck. I tried using ->instance()
> > > > instead of ->new() in both handlers, and it didn't work. Just for kicks
> > > > I tried using a few combinations of new() and instance() and no go there
> > > > either. I also checked that I had the main request using is_main just to
> > > > be safe after retreiving the existing Apache::Request instance.
> > >
> > > What happens if you remove Apache::Request altogether and try 2 simple
> > > handlers, e.g. response handler and logging handler. Does that setup work
> > for
> > > you? If it does, it has something to do with Apache::Request and not
> > mod_perl
> > > per se.
> > >
> > > > I'm going to upgrade to 1.28 in a coupla days so hopefully that'll solve
> > > > it. wierd that noone seems to have reported this. The server I'm using
> > > > is a stock RH 8.0 server - I dont run redcarpet or anything like that,
> > > > and I've only upgraded the minimum to keep it secure. I'm no C
> > > > developer, just a perl geek, but I was wondering where pnotes() stores
> > > > it's data. In an Apache::Table object? Is there a way for me to manually
> > > > access the store somehow at various phases to figure out where the data
> > > > gets deleted? Any suggestions would help.
> > >
> > > You can debug on the C level.
> > >
> > >
> > > __
> > > Stas BekmanJAm_pH --> Just Another mod_perl Hacker
> > > http://stason.org/ mod_perl Guide ---> http://perl.apache.org
> > > mailto:[EMAIL PROTECTED] http://use.perl.org http://apacheweek.com
> > > http://modperlbook.org http://apache.org   http://ticketmaster.com
> > >
-- 
Mark Maunder <[EMAIL PROTECTED]>
ZipTree Inc.



Re: does pnotes() work at all in 1.27?

2003-07-19 Thread Mark Maunder
7:05 GMT
Server: ZipTree
Keep-Alive: timeout=15, max=100
Connection: Keep-Alive
Transfer-Encoding: chunked
Content-Type: text/html

1c
Hello World!
You are in main
0


On Sat, 2003-07-19 at 07:34, James Hartling wrote:
> I think Mark had tried it without Apache::Request.  Also, it was obvious at
> some point that he wasn't in a subrequest ($r->is_main returned true, but no
> pnote).   Mark, have you tested $r->notes, and is that working?  I notice
> that your 'marktest' pnote test used a string value.  Perhaps pnotes insists
> on storing refs, not strings - I've never tried it though.  You might also
> start farther back in the request cycle and see if pnotes are being passed
> along at any stage (Init, Access, Fixup, etc).
> 
> Jim
> 
> - Original Message -
> From: "Stas Bekman" <[EMAIL PROTECTED]>
> To: "Mark Maunder" <[EMAIL PROTECTED]>
> Cc: "James Hartling" <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]>
> Sent: Saturday, July 19, 2003 4:55 AM
> Subject: Re: does pnotes() work at all in 1.27?
> 
> 
> > Mark Maunder wrote:
> > > Hi Stas,
> > >
> > > Thanks for the input. Tried that and no luck. I tried using ->instance()
> > > instead of ->new() in both handlers, and it didn't work. Just for kicks
> > > I tried using a few combinations of new() and instance() and no go there
> > > either. I also checked that I had the main request using is_main just to
> > > be safe after retreiving the existing Apache::Request instance.
> >
> > What happens if you remove Apache::Request altogether and try 2 simple
> > handlers, e.g. response handler and logging handler. Does that setup work
> for
> > you? If it does, it has something to do with Apache::Request and not
> mod_perl
> > per se.
> >
> > > I'm going to upgrade to 1.28 in a coupla days so hopefully that'll solve
> > > it. wierd that noone seems to have reported this. The server I'm using
> > > is a stock RH 8.0 server - I dont run redcarpet or anything like that,
> > > and I've only upgraded the minimum to keep it secure. I'm no C
> > > developer, just a perl geek, but I was wondering where pnotes() stores
> > > it's data. In an Apache::Table object? Is there a way for me to manually
> > > access the store somehow at various phases to figure out where the data
> > > gets deleted? Any suggestions would help.
> >
> > You can debug on the C level.
> >
> >
> > __
> > Stas BekmanJAm_pH --> Just Another mod_perl Hacker
> > http://stason.org/ mod_perl Guide ---> http://perl.apache.org
> > mailto:[EMAIL PROTECTED] http://use.perl.org http://apacheweek.com
> > http://modperlbook.org http://apache.org   http://ticketmaster.com
> >
-- 
Mark Maunder <[EMAIL PROTECTED]>
ZipTree Inc.



Re: does pnotes() work at all in 1.27?

2003-07-19 Thread James Hartling

I think Mark had tried it without Apache::Request.  Also, it was obvious at
some point that he wasn't in a subrequest ($r->is_main returned true, but no
pnote).   Mark, have you tested $r->notes, and is that working?  I notice
that your 'marktest' pnote test used a string value.  Perhaps pnotes insists
on storing refs, not strings - I've never tried it though.  You might also
start farther back in the request cycle and see if pnotes are being passed
along at any stage (Init, Access, Fixup, etc).

Jim

- Original Message -
From: "Stas Bekman" <[EMAIL PROTECTED]>
To: "Mark Maunder" <[EMAIL PROTECTED]>
Cc: "James Hartling" <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]>
Sent: Saturday, July 19, 2003 4:55 AM
Subject: Re: does pnotes() work at all in 1.27?


> Mark Maunder wrote:
> > Hi Stas,
> >
> > Thanks for the input. Tried that and no luck. I tried using ->instance()
> > instead of ->new() in both handlers, and it didn't work. Just for kicks
> > I tried using a few combinations of new() and instance() and no go there
> > either. I also checked that I had the main request using is_main just to
> > be safe after retreiving the existing Apache::Request instance.
>
> What happens if you remove Apache::Request altogether and try 2 simple
> handlers, e.g. response handler and logging handler. Does that setup work
for
> you? If it does, it has something to do with Apache::Request and not
mod_perl
> per se.
>
> > I'm going to upgrade to 1.28 in a coupla days so hopefully that'll solve
> > it. wierd that noone seems to have reported this. The server I'm using
> > is a stock RH 8.0 server - I dont run redcarpet or anything like that,
> > and I've only upgraded the minimum to keep it secure. I'm no C
> > developer, just a perl geek, but I was wondering where pnotes() stores
> > it's data. In an Apache::Table object? Is there a way for me to manually
> > access the store somehow at various phases to figure out where the data
> > gets deleted? Any suggestions would help.
>
> You can debug on the C level.
>
>
> __
> Stas BekmanJAm_pH --> Just Another mod_perl Hacker
> http://stason.org/ mod_perl Guide ---> http://perl.apache.org
> mailto:[EMAIL PROTECTED] http://use.perl.org http://apacheweek.com
> http://modperlbook.org http://apache.org   http://ticketmaster.com
>



Re: does pnotes() work at all in 1.27?

2003-07-19 Thread Stas Bekman
Mark Maunder wrote:
Hi Stas,

Thanks for the input. Tried that and no luck. I tried using ->instance()
instead of ->new() in both handlers, and it didn't work. Just for kicks
I tried using a few combinations of new() and instance() and no go there
either. I also checked that I had the main request using is_main just to
be safe after retreiving the existing Apache::Request instance. 
What happens if you remove Apache::Request altogether and try 2 simple 
handlers, e.g. response handler and logging handler. Does that setup work for 
you? If it does, it has something to do with Apache::Request and not mod_perl 
per se.

I'm going to upgrade to 1.28 in a coupla days so hopefully that'll solve
it. wierd that noone seems to have reported this. The server I'm using
is a stock RH 8.0 server - I dont run redcarpet or anything like that,
and I've only upgraded the minimum to keep it secure. I'm no C
developer, just a perl geek, but I was wondering where pnotes() stores
it's data. In an Apache::Table object? Is there a way for me to manually
access the store somehow at various phases to figure out where the data
gets deleted? Any suggestions would help.
You can debug on the C level.

__
Stas BekmanJAm_pH --> Just Another mod_perl Hacker
http://stason.org/ mod_perl Guide ---> http://perl.apache.org
mailto:[EMAIL PROTECTED] http://use.perl.org http://apacheweek.com
http://modperlbook.org http://apache.org   http://ticketmaster.com


Re: does pnotes() work at all in 1.27?

2003-07-19 Thread Mark Maunder
Hi Stas,

Thanks for the input. Tried that and no luck. I tried using ->instance()
instead of ->new() in both handlers, and it didn't work. Just for kicks
I tried using a few combinations of new() and instance() and no go there
either. I also checked that I had the main request using is_main just to
be safe after retreiving the existing Apache::Request instance. 

I'm going to upgrade to 1.28 in a coupla days so hopefully that'll solve
it. wierd that noone seems to have reported this. The server I'm using
is a stock RH 8.0 server - I dont run redcarpet or anything like that,
and I've only upgraded the minimum to keep it secure. I'm no C
developer, just a perl geek, but I was wondering where pnotes() stores
it's data. In an Apache::Table object? Is there a way for me to manually
access the store somehow at various phases to figure out where the data
gets deleted? Any suggestions would help.

Mark.

On Fri, 2003-07-18 at 23:40, Stas Bekman wrote:
> James Hartling wrote:
> > I use pnotes all over the place in 1.27, and haven't noticed any problems.
> > I just stepped through some code and everything looks good between the Init
> > phase and the content handling phase.
> > 
> > I'm using Apache::Request->instance everywhere so I'm dealing with the same
> > request object, but even if you're using Apache::Request->new I'd still
> > expect that to work.
> 
> Apache::Request->instance is probably the magic pill for Mark ;)
> 
> __
> Stas BekmanJAm_pH --> Just Another mod_perl Hacker
> http://stason.org/ mod_perl Guide ---> http://perl.apache.org
> mailto:[EMAIL PROTECTED] http://use.perl.org http://apacheweek.com
> http://modperlbook.org http://apache.org   http://ticketmaster.com
-- 
Mark Maunder <[EMAIL PROTECTED]>
ZipTree Inc.



Re: does pnotes() work at all in 1.27?

2003-07-18 Thread Stas Bekman
James Hartling wrote:
I use pnotes all over the place in 1.27, and haven't noticed any problems.
I just stepped through some code and everything looks good between the Init
phase and the content handling phase.
I'm using Apache::Request->instance everywhere so I'm dealing with the same
request object, but even if you're using Apache::Request->new I'd still
expect that to work.
Apache::Request->instance is probably the magic pill for Mark ;)

__
Stas BekmanJAm_pH --> Just Another mod_perl Hacker
http://stason.org/ mod_perl Guide ---> http://perl.apache.org
mailto:[EMAIL PROTECTED] http://use.perl.org http://apacheweek.com
http://modperlbook.org http://apache.org   http://ticketmaster.com


Re: does pnotes() work at all in 1.27?

2003-07-18 Thread Dennis Stout
> No progress yet. I just tested pnotes in the same handler and it works.
> Tested it again by setting a value in the content handler and trying to
> retreive it it my logging handler and no luck.

It looks like I start work on finding out about your problem tonight instead
of last night.

Funny story:  I did a field call this morning in Palmer, had to do a line test
for DSL.  Then I had to do another one down Knik Goose Bay road (I know you
have no idea of these locations, but thats roughly 30 miles there...).  About
25 miles out of Palmer, I hear this "ti-ti-ti-ti-thwou - whack" vaguely
somewhere above and behind me.

Anwyays, get to the location, customers mahcine is up and running on DSL, so
no line test neccessary.

On my way back to Palmer, I see this laptop on the side of the road...  I pull
over, and guess what I left sitting on the van in Palmer?

W.  Ever seen remains of a laptop after hitting pavement at 55mph?

I can't believe it stayed up there for so long.  I was stopping at all kinds
of stop lights/signs and stuff, and reaching speeds of 80mph around curves :D

Alright, so this wasn't mod_perl related.  A bunch of techies can laugh over
this tho, and humor is a good thing :)

Dennis



Re: does pnotes() work at all in 1.27?

2003-07-18 Thread James Hartling

I use pnotes all over the place in 1.27, and haven't noticed any problems.
I just stepped through some code and everything looks good between the Init
phase and the content handling phase.

I'm using Apache::Request->instance everywhere so I'm dealing with the same
request object, but even if you're using Apache::Request->new I'd still
expect that to work.

Jim

- Original Message -
From: "Mark Maunder" <[EMAIL PROTECTED]>
To: "Perrin Harkins" <[EMAIL PROTECTED]>
Cc: "Dennis Stout" <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]>
Sent: Friday, July 18, 2003 3:08 PM
Subject: Re: does pnotes() work at all in 1.27?


> Hi Perrin, thanks for the reply.
>
> No progress yet. I just tested pnotes in the same handler and it works.
> Tested it again by setting a value in the content handler and trying to
> retreive it it my logging handler and no luck.
>
> #The line in my content handler is:
> $sess->get_r()->pnotes('marktest', 'anotherpnotestest');
> warn "PNOTES: " . $sess->get_r()->pnotes('marktest')
> if($sess->get_r()->is_main());
> #$sess is my session object where I store $r and my $dbh etc.
>
> #And the one in my logging phase handler is:
> warn "PNOTES2: " . $r->pnotes('marktest') if($r->is_main());
>
> This prints out the following:
> PNOTES: anotherpnotestest at /usr/local/ziptree/lib/ZT/ViewItem.pm line
> 16.
> PNOTES2:  at /usr/local/ziptree/lib/ZT/Logger.pm line 11.
>
> I'm using Apache::Request in the content handler, but I've tried it
> using the standard Apache->request object in both handlers and still no
> luck.
>
> Thanks,
>
> Mark.
>
> On Fri, 2003-07-18 at 10:09, Perrin Harkins wrote:
> > On Thu, 2003-07-17 at 16:51, Mark Maunder wrote:
> > > > And then install those as a content and logging phase handler. If
you
> > > > have the time and the interest. I've tried this and the logging
handler
> > > > comes up with nothing in pnotes. I've also checked that it's not a
sub
> > > > request.
> >
> > Did you get any further with this?  I've never heard of any problems
> > with pnotes(), but I also don't have a 1.27 installed to check it with.
> > Does it work if you just set and read a note in the same handler?
> >
> > - Perrin
> --
> Mark Maunder <[EMAIL PROTECTED]>
> ZipTree Inc.
>



Re: does pnotes() work at all in 1.27?

2003-07-18 Thread Mark Maunder
Hi Perrin, thanks for the reply.

No progress yet. I just tested pnotes in the same handler and it works.
Tested it again by setting a value in the content handler and trying to
retreive it it my logging handler and no luck.

#The line in my content handler is:
$sess->get_r()->pnotes('marktest', 'anotherpnotestest');
warn "PNOTES: " . $sess->get_r()->pnotes('marktest')
if($sess->get_r()->is_main());
#$sess is my session object where I store $r and my $dbh etc.

#And the one in my logging phase handler is:
warn "PNOTES2: " . $r->pnotes('marktest') if($r->is_main());

This prints out the following:
PNOTES: anotherpnotestest at /usr/local/ziptree/lib/ZT/ViewItem.pm line
16.
PNOTES2:  at /usr/local/ziptree/lib/ZT/Logger.pm line 11.

I'm using Apache::Request in the content handler, but I've tried it
using the standard Apache->request object in both handlers and still no
luck.

Thanks,

Mark.

On Fri, 2003-07-18 at 10:09, Perrin Harkins wrote:
> On Thu, 2003-07-17 at 16:51, Mark Maunder wrote:
> > > And then install those as a content and logging phase handler. If you
> > > have the time and the interest. I've tried this and the logging handler
> > > comes up with nothing in pnotes. I've also checked that it's not a sub
> > > request.
> 
> Did you get any further with this?  I've never heard of any problems
> with pnotes(), but I also don't have a 1.27 installed to check it with. 
> Does it work if you just set and read a note in the same handler?
> 
> - Perrin
-- 
Mark Maunder <[EMAIL PROTECTED]>
ZipTree Inc.



Re: does pnotes() work at all in 1.27?

2003-07-18 Thread Perrin Harkins
On Thu, 2003-07-17 at 16:51, Mark Maunder wrote:
> > And then install those as a content and logging phase handler. If you
> > have the time and the interest. I've tried this and the logging handler
> > comes up with nothing in pnotes. I've also checked that it's not a sub
> > request.

Did you get any further with this?  I've never heard of any problems
with pnotes(), but I also don't have a 1.27 installed to check it with. 
Does it work if you just set and read a note in the same handler?

- Perrin


Re: does pnotes() work at all in 1.27?

2003-07-17 Thread Mark Maunder
(That's supposed to be send_http_header() - and there's prob a few other
errors in there. :)

On Thu, 2003-07-17 at 13:50, Mark Maunder wrote:
> Thanks - would be helpful if you could try to use pnotes to communicate
> between two mod_perl handlers. Just some really basic code like:
> package MyContentHandler;
> use Apache::Constants qw( :common );
> sub handler
> {
>   my $r = shift @_;
>   $r->pnotes('mykey', 'A regular string scalar');
>   $r->send_header('text/html');
>   print "Hi there. This is a regular content handler.";
>   return OK;
> }
> 1;
> 
> and 
> package MyLoggingHandler;
> use Apache::Constants qw( :common );
> sub handler
> {
>   my $r = shift @_;
>   #Do some logging
>   warn "Value of pnotes is: " . $r->pnotes('mykey');
>   return OK;
> }
> 1;
> 
> And then install those as a content and logging phase handler. If you
> have the time and the interest. I've tried this and the logging handler
> comes up with nothing in pnotes. I've also checked that it's not a sub
> request. Thanks :)
> 
> On Thu, 2003-07-17 at 12:44, Dennis Stout wrote:
> > > Has anyone gotten $r->pnotes() to work under Apache 1.3.27 and mod_perl
> > > 1.27? A simple yes will do because then at least I'll know if it's my
> > > mistake or a bug.
> > 
> > I'll work on it when I get home again.  weee, thursday, gotta have this
> > project done monday..  *sigh*
> > 
> > The good news, is that I run Apache 1.3.27 and mod_perl 1.27.
> > 
> > Anyways, thought you might like to know I'll work on it and someone out there
> > HAS read your email :)
> > 
> > Dennis
-- 
Mark Maunder <[EMAIL PROTECTED]>
ZipTree Inc.



Re: does pnotes() work at all in 1.27?

2003-07-17 Thread Mark Maunder
Thanks - would be helpful if you could try to use pnotes to communicate
between two mod_perl handlers. Just some really basic code like:
package MyContentHandler;
use Apache::Constants qw( :common );
sub handler
{
my $r = shift @_;
$r->pnotes('mykey', 'A regular string scalar');
$r->send_header('text/html');
print "Hi there. This is a regular content handler.";
return OK;
}
1;

and 
package MyLoggingHandler;
use Apache::Constants qw( :common );
sub handler
{
my $r = shift @_;
#Do some logging
warn "Value of pnotes is: " . $r->pnotes('mykey');
return OK;
}
1;

And then install those as a content and logging phase handler. If you
have the time and the interest. I've tried this and the logging handler
comes up with nothing in pnotes. I've also checked that it's not a sub
request. Thanks :)

On Thu, 2003-07-17 at 12:44, Dennis Stout wrote:
> > Has anyone gotten $r->pnotes() to work under Apache 1.3.27 and mod_perl
> > 1.27? A simple yes will do because then at least I'll know if it's my
> > mistake or a bug.
> 
> I'll work on it when I get home again.  weee, thursday, gotta have this
> project done monday..  *sigh*
> 
> The good news, is that I run Apache 1.3.27 and mod_perl 1.27.
> 
> Anyways, thought you might like to know I'll work on it and someone out there
> HAS read your email :)
> 
> Dennis
-- 
Mark Maunder <[EMAIL PROTECTED]>
ZipTree Inc.



Re: does pnotes() work at all in 1.27?

2003-07-17 Thread Dennis Stout
> Has anyone gotten $r->pnotes() to work under Apache 1.3.27 and mod_perl
> 1.27? A simple yes will do because then at least I'll know if it's my
> mistake or a bug.

I'll work on it when I get home again.  weee, thursday, gotta have this
project done monday..  *sigh*

The good news, is that I run Apache 1.3.27 and mod_perl 1.27.

Anyways, thought you might like to know I'll work on it and someone out there
HAS read your email :)

Dennis



does pnotes() work at all in 1.27?

2003-07-17 Thread Mark Maunder
Sorry about the repost, but this is driving me nuts.

Has anyone gotten $r->pnotes() to work under Apache 1.3.27 and mod_perl
1.27? A simple yes will do because then at least I'll know if it's my
mistake or a bug. 

It's this posting that makes me think it's a bug:
http://groups.yahoo.com/group/modperl/message/45472