Re: Newbie help with Apache2::Request configuration

2006-01-03 Thread Philip M. Gollucci

Jeff Armstrong wrote:

I still can't seem to get this to work: the Apache error.log says:
This file is not one of the files in the Debian manifest for 
libapache2-request-perl. Are there any special build options I need to 
generate this handle.al?
I would strongly urge you to build it from SVN.  The Debian packages are 
pre-rename last I heard.


http://perl.apache.org/docs/2.0/rename.html

In brief:
PERL -MCPAN -e install 'ExtUtils::XSBuilder'

http://svn.apache.org/repos/asf/httpd/apreq/trunk apreq2-trunk

cd apreq2-trunk

./buildconf --with-perl=PERL --with-autoconf=autconf 

PERL Makefile.PL --with-apxs=APXS --with-expat 

make all test docs install install_docs

HTH



--

"Love is not the one you can picture yourself marrying,
but the one you can't picture the rest of your life without."

"It takes a minute to have a crush on someone, an hour to like someone,
and a day to love someone, but it takes a lifetime to forget someone..."

Philip M. Gollucci ([EMAIL PROTECTED]) 301.254.5198
Consultant / http://p6m7g8.net/Resume/resume.shtml
Senior Software Engineer - TicketMaster - http://ticketmaster.com



Re: Newbie help with Apache2::Request configuration

2006-01-03 Thread Jeff Armstrong

 Original Message  
From: "Philip M. Gollucci" <[EMAIL PROTECTED]>
To: Jeff Armstrong <[EMAIL PROTECTED]>
Cc: mod_perl List 
Subject: Re:Newbie help with Apache2::Request configuration
Date: Sun Jan 01 2006 21:01:39


My apologies for being a dumbo, your forbearance is much appreciated!


no problem... Everybody has to start somewhere.


I can't even seem to get the APR::Request->new() to work. 
[embarrassment!] Mmmm, maybe there isn't a new() method? Or maybe my 
install is broken: Can't locate auto/APR/Request/new.al


sub handler {

my $r = shift;
my $req = APR::Request->handle($r);

return Apache2::Const::OK;
}




I still can't seem to get this to work: the Apache error.log says:

  Can't locate auto/APR/Request/handle.al

and locate shows that I don't have this file anywhere on disk.

This file is not one of the files in the Debian manifest for 
libapache2-request-perl. Are there any special build options I need to 
generate this handle.al?


Regards & thanks,

Jeff


Re: Newbie help with Apache2::Request configuration

2006-01-02 Thread Philip M. Gollucci

One other thing, none of the SEE ALSO links work :(

Fixed in r365492 and will be part of the 2.07 docs



--

"Love is not the one you can picture yourself marrying,
but the one you can't picture the rest of your life without."

"It takes a minute to have a crush on someone, an hour to like someone,
and a day to love someone, but it takes a lifetime to forget someone..."

Philip M. Gollucci ([EMAIL PROTECTED]) 301.254.5198
Consultant / http://p6m7g8.net/Resume/resume.shtml
Senior Software Engineer - TicketMaster - http://ticketmaster.com



Re: Newbie help with Apache2::Request configuration

2006-01-02 Thread Philip M. Gollucci

Jeff wrote:

Thanks for all that - I will work through it!

I don't know I why I didn't think to say this sooner, but

Apache2::Cookie is actually a subclass of APR::Request::Cookie

if that helps any

--

"Love is not the one you can picture yourself marrying,
but the one you can't picture the rest of your life without."

"It takes a minute to have a crush on someone, an hour to like someone,
and a day to love someone, but it takes a lifetime to forget someone..."

Philip M. Gollucci ([EMAIL PROTECTED]) 301.254.5198
Consultant / http://p6m7g8.net/Resume/resume.shtml
Senior Software Engineer - TicketMaster - http://ticketmaster.com



Re: Newbie help with Apache2::Request configuration

2006-01-02 Thread Jeff

 Original Message  
From: "Philip M. Gollucci" <[EMAIL PROTECTED]>
To: Jeff Armstrong <[EMAIL PROTECTED]>
Cc: mod_perl List 
Subject: Re:Newbie help with Apache2::Request configuration
Date: Sun Jan 01 2006 21:01:39


My apologies for being a dumbo, your forbearance is much appreciated!

no problem... Everybody has to start somewhere.



Thanks for all that - I will work through it!

Regards
Jeff


Re: Newbie help with Apache2::Request configuration

2006-01-01 Thread Philip M. Gollucci

My apologies for being a dumbo, your forbearance is much appreciated!

no problem... Everybody has to start somewhere.



You seem to recommend the APR:* interfaces, but then go on to show that 
to use APR::Request::Param to handle uploads, we will have to code 
wrapper code similar to that in Apache2::Upload each time, for ourselves?
I was really just trying to illustrate a use of it and show that the 
Apache2::* API's are wrappers or applications of the APR.  Thus, you can 
do anything with the APR::* methods you could with the Apache2:: ones.


I also didn't understand the difference between the two cookie classes, 
except that there is an implication that the APR::Request::Cookie 
classes do not call freeze/thaw automatically? Does this mean that I 
have to call encode/decode on values when I create or access 
APR::Request::Cookie cookies?

One does encoding decoding for you aka ' ' => %20
You might not need this depending on what you put in your cookies.
APR's Cookies does call them, but there are not the same freeze thaw.
There implemented as:
sub freeze { };
sub thaw { shift->value }
[Thats from memory so don't quote me on it]

Whereas Apache2's Cookie are more complex.

I can't even seem to get the APR::Request->new() to work. 
[embarrassment!] Mmmm, maybe there isn't a new() method? Or maybe my 
install is broken: Can't locate auto/APR/Request/new.al

sub handler {

my $r = shift;
my $req = APR::Request->handle($r);

return Apache2::Const::OK;
}



  $req = APR::Request::Custom->handle($pool,
  "foo=arg1&bar=arg2",
  "cookie=apache",
   $parser, 1e6, $bb);
Thats to create a custom request object given the query string.  You'll 
like not going to use that particular method.  It has other uses though.



  $param = $req->param("foo");
  $cookie = $req->jar("cookie");


Any code samples would help me, though at this stage, it seems to me 
that the Apache2::Cookie is much easier to understand, create and use.
Familiar API .. aka CGI::Cookie().  Whereare the APR::* mirror the 
Apache's APR API




One other thing, none of the SEE ALSO links work :(

I'm working on that

Code sample:

package TEST::APREQ;

use strict;
use warnings FATAL => ’all’;

use Apache2::RequestRec ();
use Apache2::RequestIO ();
use Apache2::Const -compile => qw(OK);
use APR::Request::Apache2 ();

sub handler {
my $r = shift;
my $req = APR::Request::Apache2->handle($r);

my $p = $req->args(’p’); 

$r->content_type(’text/plain’);
$r->print("p: $p");

return Apache2::Const::OK;
}
1;

For cookies, see the FAQ I wrote on the mp site: (3rd one down)
http://perl.apache.org/docs/2.0/user/coding/cooking.html


--

"Love is not the one you can picture yourself marrying,
but the one you can't picture the rest of your life without."

"It takes a minute to have a crush on someone, an hour to like someone,
and a day to love someone, but it takes a lifetime to forget someone..."

Philip M. Gollucci ([EMAIL PROTECTED]) 301.254.5198
Consultant / http://p6m7g8.net/Resume/resume.shtml
Senior Software Engineer - TicketMaster - http://ticketmaster.com



Re: Newbie help with Apache2::Request configuration

2006-01-01 Thread Jeff Armstrong

 Original Message  
From: "Philip M. Gollucci" <[EMAIL PROTECTED]>
To: Jonathan Vanasco <[EMAIL PROTECTED]>
Cc: mod_perl List 
Subject: Re:Newbie help with Apache2::Request configuration
Date: Sat Dec 31 2005 19:22:28


Jonathan Vanasco wrote:


On Dec 31, 2005, at 1:22 PM, Philip M. Gollucci wrote:


One does CGI compatible decoding the other doesn't.


fully knowing this sounds stupid, can i just ask what that means?
APR::Request provides 2 functions encode and decode that access 
application/x-www-form-urlencoded data

which the Apache2::Cookie methods freeze and thaw call for you internally.

APR::Request::Cookie 's freeze/thaw are "no ops" per say... just data 
in/out.




--snip--

Philip,

My apologies for being a dumbo, your forbearance is much appreciated!

You seem to recommend the APR:* interfaces, but then go on to show that 
to use APR::Request::Param to handle uploads, we will have to code 
wrapper code similar to that in Apache2::Upload each time, for ourselves?


I also didn't understand the difference between the two cookie classes, 
except that there is an implication that the APR::Request::Cookie 
classes do not call freeze/thaw automatically? Does this mean that I 
have to call encode/decode on values when I create or access 
APR::Request::Cookie cookies?


I tried to get the APR::Request interface working to do some 
investigation, but whilst the Apache2::* works fine, I have not yet 
figured out how to get the cookies out of the APR::Request class.


I can't even seem to get the APR::Request->new() to work. 
[embarrassment!] Mmmm, maybe there isn't a new() method? Or maybe my 
install is broken: Can't locate auto/APR/Request/new.al


The docs say:

  use APR::Request;
  $req = APR::Request::Custom->handle($pool,
  "foo=arg1&bar=arg2",
  "cookie=apache",
   $parser, 1e6, $bb);
  $param = $req->param("foo");
  $cookie = $req->jar("cookie");

Why Custom? and this doesn't work for me because I don't have:
 $pool, $parser, $bb.

Now, I can guess, that $pool might be $r->pool, or maybe $r->pool->new 
or even APR::Pool->new(). The first literal looks like it might be 
$r->args(), the second literal looks like maybe I have to work my way 
manually through the request headers, pluck out the cookie-like lines 
and feed them in here, but then $parser - what is that?


And so I give up, not having been able to instantiate an
 $req = APR::Request::anything

Any code samples would help me, though at this stage, it seems to me 
that the Apache2::Cookie is much easier to understand, create and use.


One other thing, none of the SEE ALSO links work :(

Sorry to be such a pain - but the APR::Request interface and docs have 
defeated me!


Regards & thanks,

Jeff


Re: Newbie help with Apache2::Request configuration

2005-12-31 Thread Philip M. Gollucci

Jonathan Vanasco wrote:


On Dec 31, 2005, at 1:22 PM, Philip M. Gollucci wrote:


One does CGI compatible decoding the other doesn't.


fully knowing this sounds stupid, can i just ask what that means?
APR::Request provides 2 functions encode and decode that access 
application/x-www-form-urlencoded data

which the Apache2::Cookie methods freeze and thaw call for you internally.

APR::Request::Cookie 's freeze/thaw are "no ops" per say... just data 
in/out.


i've just been using Apache2 wrappers, because I need to access 
uploads.  and well, my options are this:


Apache2::Upload
or
APR::Request
section: uploads (APR::Request::Param::Table???)


http://httpd.apache.org/apreq/docs/libapreq2/group__apreq__xs__apr__request__param.html

If you look at Apache2::Upload you'll see its basically doing that.
sub Apache2::Request::upload {
my $req = shift;
my $body = $req->body or return;
$body->param_class(__PACKAGE__);
if (@_) {
my @uploads = grep $_->upload, $body->get(@_);
return wantarray ? @uploads : $uploads[0];
}

return map { $_->upload ? $_->name : () } values %$body
if wantarray;

   return $body->uploads($req->pool);

}



--

"Love is not the one you can picture yourself marrying,
but the one you can't picture the rest of your life without."

"It takes a minute to have a crush on someone, an hour to like someone,
and a day to love someone, but it takes a lifetime to forget someone..."

Philip M. Gollucci ([EMAIL PROTECTED]) 301.254.5198
Consultant / http://p6m7g8.net/Resume/resume.shtml
Senior Software Engineer - TicketMaster - http://ticketmaster.com



Re: Newbie help with Apache2::Request configuration

2005-12-31 Thread Jonathan Vanasco


On Dec 31, 2005, at 1:22 PM, Philip M. Gollucci wrote:


One does CGI compatible decoding the other doesn't.


fully knowing this sounds stupid, can i just ask what that means?

i've just been using Apache2 wrappers, because I need to access  
uploads.  and well, my options are this:


Apache2::Upload
or
APR::Request
section: uploads (APR::Request::Param::Table???)

the ??? is a real turnoff, suggests its unstable or something
it also doesn't have a bunch of the methods for dealing with the file  
i like that are in the Apache2::Upload module
(well it might, but the names and documentation for them in  
Apache2::Upload are more clear)






Re: Newbie help with Apache2::Request configuration

2005-12-31 Thread Philip M. Gollucci

Jeff Armstrong wrote:
APR::Request::Apache2 seems rather light in terms of documented 
functionality, but you recommend it over Apache2::Request? Do they all 
somehow end up at the same place?

Wrapper classes.  The difference is which ones the developers recommend.



The libapreq2 docs seem a little light when it comes to explaining which 
class to choose. For example, which and when for:

  Apache2::Request
  APR::Request

In general we recommend APR::* the Apache2::* are wrappers.
You should note, they are not neccessarily identical i.e.



or for cookies,
  Apache2::Cookie
  APR::Request::Cookie

One does CGI compatible decoding the other doesn't.



er? any thoughts appreciated!


Sumbit some docs :)

If you are using an SVN build, I higly recommend you build the SVN 
version of the docs as the website is on 2.06




--

"Love is not the one you can picture yourself marrying,
but the one you can't picture the rest of your life without."

"It takes a minute to have a crush on someone, an hour to like someone,
and a day to love someone, but it takes a lifetime to forget someone..."

Philip M. Gollucci ([EMAIL PROTECTED]) 301.254.5198
Consultant / http://p6m7g8.net/Resume/resume.shtml
Senior Software Engineer - TicketMaster - http://ticketmaster.com



Re: Newbie help with Apache2::Request configuration

2005-12-31 Thread Jeff Armstrong

 Original Message  
From: "Philip M. Gollucci" <[EMAIL PROTECTED]>
To: Joshua H <[EMAIL PROTECTED]>
Cc: modperl@perl.apache.org
Subject: Re:Newbie help with Apache2::Request configuration
Date: Sat Dec 31 2005 01:02:01


Joshua H wrote:

1) When I try to call Apache::Request methods (like new() ), I get an 


You want Apache2::Request->new()
or better yet
APR::Request::Apache2->new()

See:
http://httpd.apache.org/apreq/docs/libapreq2/group__apreq__xs__apr__request__apache2.html 



APR::Request::Apache2 seems rather light in terms of documented 
functionality, but you recommend it over Apache2::Request? Do they all 
somehow end up at the same place?


The libapreq2 docs seem a little light when it comes to explaining which 
class to choose. For example, which and when for:

  Apache2::Request
  APR::Request

or for cookies,
  Apache2::Cookie
  APR::Request::Cookie

er? any thoughts appreciated!

Regards & thanks,

Jeff


Re: Newbie help with Apache2::Request configuration

2005-12-30 Thread Joshua H
Thank you!  configure --enable-perl-glue complained about problems with 
XSBuilder.  After a ExtUtils re-install, the installation worked like a 
charm.  And no problems with startup.pl.  Thanks again.


-Joshua


Joshua H wrote:

I copied all the .pm files from the local /tmp install to the 
apparent correct places in @INC.  Now I get:


[Fri Dec 30 18:22:51 2005] [error] APR/Request/Param.pm did not 
return a true value at 
/usr/lib/perl5/site_perl/5.8.6/i586-linux-thread-multi/Apache2/Request.pm 
line 2.\nBEGIN failed--compilation aborted at 
/usr/lib/perl5/site_perl/5.8.6/i586-linux-thread-multi/Apache2/Request.pm 
line 2.\nCompilation failed in require at 
/usr/lib/perl5/site_perl/5.8.6/i586-linux-thread-multi/Apache2/Upload.pm 
line 2.\nBEGIN failed--compilation aborted at 
/usr/lib/perl5/site_perl/5.8.6/i586-linux-thread-multi/Apache2/Upload.pm 
line 2.\nCompilation failed in require at 
/etc/apache2/mod_perl-startup.pl line 23.\nBEGIN failed--compilation 
aborted at /etc/apache2/mod_perl-startup.pl line 23.\nCompilation 
failed in require at (eval 2) line 1.\n


Something strange... and probably due to a stupidism on my part. :(  
Sorry for the trouble.


-Joshua


Sounds like you didn't use the --enable-perl-glue option when you 
installed libapreq2.


-Glenn





Re: Newbie help with Apache2::Request configuration

2005-12-30 Thread Glenn Gallien

Joshua H wrote:

I copied all the .pm files from the local /tmp install to the apparent 
correct places in @INC.  Now I get:


[Fri Dec 30 18:22:51 2005] [error] APR/Request/Param.pm did not return 
a true value at 
/usr/lib/perl5/site_perl/5.8.6/i586-linux-thread-multi/Apache2/Request.pm 
line 2.\nBEGIN failed--compilation aborted at 
/usr/lib/perl5/site_perl/5.8.6/i586-linux-thread-multi/Apache2/Request.pm 
line 2.\nCompilation failed in require at 
/usr/lib/perl5/site_perl/5.8.6/i586-linux-thread-multi/Apache2/Upload.pm 
line 2.\nBEGIN failed--compilation aborted at 
/usr/lib/perl5/site_perl/5.8.6/i586-linux-thread-multi/Apache2/Upload.pm 
line 2.\nCompilation failed in require at 
/etc/apache2/mod_perl-startup.pl line 23.\nBEGIN failed--compilation 
aborted at /etc/apache2/mod_perl-startup.pl line 23.\nCompilation 
failed in require at (eval 2) line 1.\n


Something strange... and probably due to a stupidism on my part. :(  
Sorry for the trouble.


-Joshua


Sounds like you didn't use the --enable-perl-glue option when you 
installed libapreq2.


-Glenn


Re: Newbie help with Apache2::Request configuration

2005-12-30 Thread Joshua H
I copied all the .pm files from the local /tmp install to the apparent 
correct places in @INC.  Now I get:


[Fri Dec 30 18:22:51 2005] [error] APR/Request/Param.pm did not return a 
true value at 
/usr/lib/perl5/site_perl/5.8.6/i586-linux-thread-multi/Apache2/Request.pm 
line 2.\nBEGIN failed--compilation aborted at 
/usr/lib/perl5/site_perl/5.8.6/i586-linux-thread-multi/Apache2/Request.pm 
line 2.\nCompilation failed in require at 
/usr/lib/perl5/site_perl/5.8.6/i586-linux-thread-multi/Apache2/Upload.pm 
line 2.\nBEGIN failed--compilation aborted at 
/usr/lib/perl5/site_perl/5.8.6/i586-linux-thread-multi/Apache2/Upload.pm 
line 2.\nCompilation failed in require at 
/etc/apache2/mod_perl-startup.pl line 23.\nBEGIN failed--compilation 
aborted at /etc/apache2/mod_perl-startup.pl line 23.\nCompilation failed 
in require at (eval 2) line 1.\n


Something strange... and probably due to a stupidism on my part. :(  
Sorry for the trouble.


-Joshua


Thanks very much for the help.
I was actually using Apache2::Request->new(), instead of 
Apache::Request - just mis-typed in my posting.


Additional information you asked for:

httpd2 version = 2.0.53
mod_perl version = 2.0.2
libapreq2 version =  2.06-dev
OS = Suse 9.3 w/ 2.6.11 kernel
used make for mod_perl and libapreq2.

Perl -V :
--
Summary of my perl5 (revision 5 version 8 subversion 6) configuration:
 Platform:
   osname=linux, osvers=2.6.9, archname=i586-linux-thread-multi
   uname='linux salieri 2.6.9 #1 smp fri jan 14 15:41:33 utc 2005 i686 
athlon i386 gnulinux '
   config_args='-ds -e -Dprefix=/usr -Dvendorprefix=/usr 
-Dinstallusrbinperl -Dusethreads -Di_db -Di_dbm -Di_ndbm -Di_gdbm 
-Duseshrplib=true -Doptimize=-O2 -march=i586 -mcpu=i686 
-fmessage-length=0 -Wall -g -Wall -pipe'

   hint=recommended, useposix=true, d_sigaction=define
   usethreads=define use5005threads=undef useithreads=define 
usemultiplicity=define

   useperlio=define d_sfio=undef uselargefiles=define usesocks=undef
   use64bitint=undef use64bitall=undef uselongdouble=undef
   usemymalloc=n, bincompat5005=undef
 Compiler:
   cc='cc', ccflags ='-D_REENTRANT -D_GNU_SOURCE -DTHREADS_HAVE_PIDS 
-DDEBUGGING -fno-strict-aliasing -pipe -D_LARGEFILE_SOURCE 
-D_FILE_OFFSET_BITS=64',
   optimize='-O2 -march=i586 -mcpu=i686 -fmessage-length=0 -Wall -g 
-Wall -pipe',
   cppflags='-D_REENTRANT -D_GNU_SOURCE -DTHREADS_HAVE_PIDS 
-DDEBUGGING -fno-strict-aliasing -pipe'
   ccversion='', gccversion='3.3.5 20050117 (prerelease) (SUSE 
Linux)', gccosandvers=''

   intsize=4, longsize=4, ptrsize=4, doublesize=8, byteorder=1234
   d_longlong=define, longlongsize=8, d_longdbl=define, longdblsize=12
   ivtype='long', ivsize=4, nvtype='double', nvsize=8, Off_t='off_t', 
lseeksize=8

   alignbytes=4, prototype=define
 Linker and Libraries:
   ld='cc', ldflags =''
   libpth=/lib /usr/lib /usr/local/lib
   libs=-lnsl -ldl -lm -lcrypt -lutil -lpthread -lc
   perllibs=-lnsl -ldl -lm -lcrypt -lutil -lpthread -lc
   libc=, so=so, useshrplib=true, libperl=libperl.so
   gnulibc_version='2.3.4'
 Dynamic Linking:
   dlsrc=dl_dlopen.xs, dlext=so, d_dlsymun=undef, ccdlflags='-Wl,-E 
-Wl,-rpath,/usr/lib/perl5/5.8.6/i586-linux-thread-multi/CORE'

   cccdlflags='-fPIC', lddlflags='-shared'


Characteristics of this binary (from libperl):
 Compile-time options: DEBUGGING MULTIPLICITY USE_ITHREADS 
USE_LARGE_FILES PERL_IMPLICIT_CONTEXT

 Built under linux
 Compiled at Mar 19 2005 17:34:48
 @INC:
   /usr/lib/perl5/5.8.6/i586-linux-thread-multi
   /usr/lib/perl5/5.8.6
   /usr/lib/perl5/site_perl/5.8.6/i586-linux-thread-multi
   /usr/lib/perl5/site_perl/5.8.6
   /usr/lib/perl5/site_perl
   /usr/lib/perl5/vendor_perl/5.8.6/i586-linux-thread-multi
   /usr/lib/perl5/vendor_perl/5.8.6
   /usr/lib/perl5/vendor_perl
---

I added the modules you suggested to startup.pl.  It coughed on the 
APR files that didn't get installed from libapreq2 (e.g. Param.pm).  
I'm thinking I should just copy all the .pm files from libapreq2 over 
to where they should be. Root-causing the thing would feel good, but 
I'm not sure it's worth the effort.


-Joshua


Joshua H wrote:

1) When I try to call Apache::Request methods (like new() ), I get an 



You want Apache2::Request->new()
or better yet
APR::Request::Apache2->new()

See:
http://httpd.apache.org/apreq/docs/libapreq2/group__apreq__xs__apr__request__apache2.html 




error to the effect that it can't find Apache2/Request.pm in @INC.  
And indeed although it is in the temp directory that I built 
libapreq2 in, it didn't get installed into @INC even though there 
were no errors from 'make' or 'make install' .  I can copy it (and 
the .pm files under APR as well which also didn't get installed) 
into @INC directories, but I'm wondering if this is a symptom of a 
bigger problem.



They should have been installed.
How about some environment information?
httpd version
mod_perl version
liabpreq version
operating and version system
perl -V
Did you make or gmake ?

If you are 

Re: Newbie help with Apache2::Request configuration

2005-12-30 Thread Joshua H
Thanks very much for the help. 

I was actually using Apache2::Request->new(), instead of Apache::Request 
- just mis-typed in my posting.


Additional information you asked for:

httpd2 version = 2.0.53
mod_perl version = 2.0.2
libapreq2 version =  2.06-dev
OS = Suse 9.3 w/ 2.6.11 kernel
used make for mod_perl and libapreq2.

Perl -V :
--
Summary of my perl5 (revision 5 version 8 subversion 6) configuration:
 Platform:
   osname=linux, osvers=2.6.9, archname=i586-linux-thread-multi
   uname='linux salieri 2.6.9 #1 smp fri jan 14 15:41:33 utc 2005 i686 
athlon i386 gnulinux '
   config_args='-ds -e -Dprefix=/usr -Dvendorprefix=/usr 
-Dinstallusrbinperl -Dusethreads -Di_db -Di_dbm -Di_ndbm -Di_gdbm 
-Duseshrplib=true -Doptimize=-O2 -march=i586 -mcpu=i686 
-fmessage-length=0 -Wall -g -Wall -pipe'

   hint=recommended, useposix=true, d_sigaction=define
   usethreads=define use5005threads=undef useithreads=define 
usemultiplicity=define

   useperlio=define d_sfio=undef uselargefiles=define usesocks=undef
   use64bitint=undef use64bitall=undef uselongdouble=undef
   usemymalloc=n, bincompat5005=undef
 Compiler:
   cc='cc', ccflags ='-D_REENTRANT -D_GNU_SOURCE -DTHREADS_HAVE_PIDS 
-DDEBUGGING -fno-strict-aliasing -pipe -D_LARGEFILE_SOURCE 
-D_FILE_OFFSET_BITS=64',
   optimize='-O2 -march=i586 -mcpu=i686 -fmessage-length=0 -Wall -g 
-Wall -pipe',
   cppflags='-D_REENTRANT -D_GNU_SOURCE -DTHREADS_HAVE_PIDS -DDEBUGGING 
-fno-strict-aliasing -pipe'
   ccversion='', gccversion='3.3.5 20050117 (prerelease) (SUSE Linux)', 
gccosandvers=''

   intsize=4, longsize=4, ptrsize=4, doublesize=8, byteorder=1234
   d_longlong=define, longlongsize=8, d_longdbl=define, longdblsize=12
   ivtype='long', ivsize=4, nvtype='double', nvsize=8, Off_t='off_t', 
lseeksize=8

   alignbytes=4, prototype=define
 Linker and Libraries:
   ld='cc', ldflags =''
   libpth=/lib /usr/lib /usr/local/lib
   libs=-lnsl -ldl -lm -lcrypt -lutil -lpthread -lc
   perllibs=-lnsl -ldl -lm -lcrypt -lutil -lpthread -lc
   libc=, so=so, useshrplib=true, libperl=libperl.so
   gnulibc_version='2.3.4'
 Dynamic Linking:
   dlsrc=dl_dlopen.xs, dlext=so, d_dlsymun=undef, ccdlflags='-Wl,-E 
-Wl,-rpath,/usr/lib/perl5/5.8.6/i586-linux-thread-multi/CORE'

   cccdlflags='-fPIC', lddlflags='-shared'


Characteristics of this binary (from libperl):
 Compile-time options: DEBUGGING MULTIPLICITY USE_ITHREADS 
USE_LARGE_FILES PERL_IMPLICIT_CONTEXT

 Built under linux
 Compiled at Mar 19 2005 17:34:48
 @INC:
   /usr/lib/perl5/5.8.6/i586-linux-thread-multi
   /usr/lib/perl5/5.8.6
   /usr/lib/perl5/site_perl/5.8.6/i586-linux-thread-multi
   /usr/lib/perl5/site_perl/5.8.6
   /usr/lib/perl5/site_perl
   /usr/lib/perl5/vendor_perl/5.8.6/i586-linux-thread-multi
   /usr/lib/perl5/vendor_perl/5.8.6
   /usr/lib/perl5/vendor_perl
---

I added the modules you suggested to startup.pl.  It coughed on the APR 
files that didn't get installed from libapreq2 (e.g. Param.pm).  I'm 
thinking I should just copy all the .pm files from libapreq2 over to 
where they should be. Root-causing the thing would feel good, but I'm 
not sure it's worth the effort.


-Joshua


Joshua H wrote:

1) When I try to call Apache::Request methods (like new() ), I get an 


You want Apache2::Request->new()
or better yet
APR::Request::Apache2->new()

See:
http://httpd.apache.org/apreq/docs/libapreq2/group__apreq__xs__apr__request__apache2.html 




error to the effect that it can't find Apache2/Request.pm in @INC.  
And indeed although it is in the temp directory that I built 
libapreq2 in, it didn't get installed into @INC even though there 
were no errors from 'make' or 'make install' .  I can copy it (and 
the .pm files under APR as well which also didn't get installed) into 
@INC directories, but I'm wondering if this is a symptom of a bigger 
problem.


They should have been installed.
How about some environment information?
httpd version
mod_perl version
liabpreq version
operating and version system
perl -V
Did you make or gmake ?

If you are using mod_perl older then 2.0.0 upgrade before you do 
anything else.


2) My startup.pl file won't load with the line "Use Apache2();" in it, 


You'll probably want this in your startup.pl file for libapreq2
use APR::Request ();
use APR::Request::Apache2 ();
use APR::Request::CGI ();
use APR::Request::Cookie ();
use APR::Request::Error ();
use APR::Request::Hook ();
use APR::Request::Param ();
use APR::Request::Parser ();
use Apache2::Upload ();
use Apache2::Request ();
use Apache2::Cookie ();

also with an error that it isn't in @INC.  It's actually in @INC, but 
under Bundle/. When I include Bundle in @INC, it barfs on a whole 
bunch of XS stuff. My startup.pl file is copied here in case I've 
made other errors:


Apache2 is obsoleted.
See here:
http://perl.apache.org/docs/2.0/rename.html



  LoadModule apreq_module/usr/lib/apache2/mod_apreq2.so


Thats correct.





Re: Newbie help with Apache2::Request configuration

2005-12-30 Thread Philip M. Gollucci

Joshua H wrote:
1) When I try to call Apache::Request methods (like new() ), I get an 

You want Apache2::Request->new()
or better yet
APR::Request::Apache2->new()

See:
http://httpd.apache.org/apreq/docs/libapreq2/group__apreq__xs__apr__request__apache2.html


error to the effect that it can't find Apache2/Request.pm in @INC.  And 
indeed although it is in the temp directory that I built libapreq2 in, 
it didn't get installed into @INC even though there were no errors from 
'make' or 'make install' .  I can copy it (and the .pm files under APR 
as well which also didn't get installed) into @INC directories, but I'm 
wondering if this is a symptom of a bigger problem.

They should have been installed.
How about some environment information?
httpd version
mod_perl version
liabpreq version
operating and version system
perl -V
Did you make or gmake ?

If you are using mod_perl older then 2.0.0 upgrade before you do 
anything else.


2) My startup.pl file won't load with the line "Use Apache2();" in it, 

You'll probably want this in your startup.pl file for libapreq2
use APR::Request ();
use APR::Request::Apache2 ();
use APR::Request::CGI ();
use APR::Request::Cookie ();
use APR::Request::Error ();
use APR::Request::Hook ();
use APR::Request::Param ();
use APR::Request::Parser ();
use Apache2::Upload ();
use Apache2::Request ();
use Apache2::Cookie ();

also with an error that it isn't in @INC.  It's actually in @INC, but 
under Bundle/. When I include Bundle in @INC, it barfs on a whole bunch 
of XS stuff. My startup.pl file is copied here in case I've made other 
errors:

Apache2 is obsoleted.
See here:
http://perl.apache.org/docs/2.0/rename.html



  LoadModule apreq_module/usr/lib/apache2/mod_apreq2.so

Thats correct.

--

"Love is not the one you can picture yourself marrying,
but the one you can't picture the rest of your life without."

"It takes a minute to have a crush on someone, an hour to like someone,
and a day to love someone, but it takes a lifetime to forget someone..."

Philip M. Gollucci ([EMAIL PROTECTED]) 301.254.5198
Consultant / http://p6m7g8.net/Resume/resume.shtml
Senior Software Engineer - TicketMaster - http://ticketmaster.com



Newbie help with Apache2::Request configuration

2005-12-30 Thread Joshua H
I've compiled and (apparently) successfully installed libapreq2.  
However, I have two problems that are possibly related:


1) When I try to call Apache::Request methods (like new() ), I get an 
error to the effect that it can't find Apache2/Request.pm in @INC.  And 
indeed although it is in the temp directory that I built libapreq2 in, 
it didn't get installed into @INC even though there were no errors from 
'make' or 'make install' .  I can copy it (and the .pm files under APR 
as well which also didn't get installed) into @INC directories, but I'm 
wondering if this is a symptom of a bigger problem.


2) My startup.pl file won't load with the line "Use Apache2();" in it, 
also with an error that it isn't in @INC.  It's actually in @INC, but 
under Bundle/. When I include Bundle in @INC, it barfs on a whole bunch 
of XS stuff. My startup.pl file is copied here in case I've made other 
errors:

---
if ( ! {MOD_PERL}) { die "GATEWAY_INTERFACE not Perl!"; }

#use Apache2();

use lib qw(/srv/www/lib);

# enable if the mod_perl 1.0 compatibility is needed
# use Apache::compat ();

use ModPerl::Util (); #for CORE::GLOBAL::exit
use ModPerl::MethodLookup();

use Apache2::RequestRec ();
use Apache2::RequestIO ();
use Apache2::RequestUtil ();

use Apache2::ServerRec ();
use Apache2::ServerUtil ();
use Apache2::Connection ();
use Apache2::Log ();

use APR::Table ();

use ModPerl::Registry ();

use Apache2::Const -compile => ':common';
use APR::Const -compile => ':common';

1;
-
the relevant httpd.conf section if helpful:


  LoadModule apreq_module/usr/lib/apache2/mod_apreq2.so


  PerlRequire "/etc/apache2/mod_perl-startup.pl"

   ScriptAlias /perl/ "/srv/www/cgi-bin/"
   
  # mod_perl mode
  SetHandler perl-script
  PerlResponseHandler ModPerl::Registry
  PerlOptions +ParseHeaders
  Options +ExecCGI
   

   ScriptAlias /cgi-perl/ "/srv/www/cgi-bin/"
   
  # perl cgi mode
  SetHandler  perl-script
  PerlResponseHandler ModPerl::PerlRun
  PerlOptions +ParseHeaders
  Options +ExecCGI
   
---

This is my first mod_perl and my understanding of the mechanics are 
foggy at best right now. TIA for any help.


-Joshua