You are viewing a plain text version of this content. The canonical link for it is here.
Posted to modperl@perl.apache.org by Jeff Pang <pa...@earthlink.net> on 2007/06/13 11:44:34 UTC

Apache2::Request install

hello,

When I installed Apache2::Request (without make test) and rut it I got
the errors:

[root@Gateway libapreq2-2.08]# perl -MApache2::Request -e ''
Can't load
'/usr/lib/perl5/site_perl/5.8.5/i386-linux-thread-multi/auto/APR/APR.so'
for module APR: libaprutil-0.so.0: cannot open shared object file: No
such file or directory at
/usr/lib/perl5/5.8.5/i386-linux-thread-multi/DynaLoader.pm line 230.
 at /usr/lib/perl5/site_perl/5.8.5/i386-linux-thread-multi/APR/Pool.pm
line 23
Compilation failed in require at
/usr/lib/perl5/site_perl/5.8.5/i386-linux-thread-multi/APR/Pool.pm line 23.
BEGIN failed--compilation aborted at
/usr/lib/perl5/site_perl/5.8.5/i386-linux-thread-multi/APR/Pool.pm line 23.
Compilation failed in require at
/usr/lib/perl5/site_perl/5.8.5/i386-linux-thread-multi/APR/Request.pm
line 26.
BEGIN failed--compilation aborted at
/usr/lib/perl5/site_perl/5.8.5/i386-linux-thread-multi/APR/Request.pm
line 26.
Compilation failed in require at
/usr/lib/perl5/site_perl/5.8.5/i386-linux-thread-multi/APR/Request/Param.pm
line 27.
BEGIN failed--compilation aborted at
/usr/lib/perl5/site_perl/5.8.5/i386-linux-thread-multi/APR/Request/Param.pm
line 27.
Compilation failed in require at
/usr/lib/perl5/site_perl/5.8.5/i386-linux-thread-multi/Apache2/Request.pm
line 2.
BEGIN failed--compilation aborted at
/usr/lib/perl5/site_perl/5.8.5/i386-linux-thread-multi/Apache2/Request.pm
line 2.
Compilation failed in require.
BEGIN failed--compilation aborted.


[root@Gateway libapreq2-2.08]# perl -MAPR -e ''
Can't load
'/usr/lib/perl5/site_perl/5.8.5/i386-linux-thread-multi/auto/APR/APR.so'
for module APR: libaprutil-0.so.0: cannot open shared object file: No
such file or directory at
/usr/lib/perl5/5.8.5/i386-linux-thread-multi/DynaLoader.pm line 230.
 at -e line 0
Compilation failed in require.
BEGIN failed--compilation aborted.


What's the correct way to install Apache2::Request?
Thanks!

Re: Performance Questions

Posted by Foo JH <jh...@extracktor.com>.
>
> Let us know how it goes - using XSLT that way is often desirable from 
> a developer's point of view, but is usually impractical due to the 
> processing overhead.  If you end up successfully using this technique 
> in production without complaints from users please let the list know, 
> I'm sure a few other people are curious too!
Just a personal opinion: wouldn't xslt juice out the cpu faster than a 
conventional template engine (eg. HTML::Template)? If you are running a 
fairly high-use environment, you may want to implement stuff that is 
easy on the processor.

Thinking aloud though, perhaps if the xslt engine caches the compiled 
xslt file, performance may improve...


Re: Performance Questions

Posted by John ORourke <jo...@o-rourke.org>.
Marc M. Adkins wrote:
> Well, I _am_ using XSLT for my template expansion.  That kind of makes 
> XML important.
>
> Thanks for the responses, and that's about what I figured I would try. 
> Just wondering if anyone would answer "no it won't work because..."

Let us know how it goes - using XSLT that way is often desirable from a 
developer's point of view, but is usually impractical due to the 
processing overhead.  If you end up successfully using this technique in 
production without complaints from users please let the list know, I'm 
sure a few other people are curious too!

cheers
John


Re: Performance Questions

Posted by "Marc M. Adkins" <Pe...@Doorways.org>.
Well, I _am_ using XSLT for my template expansion.  That kind of makes 
XML important.

Thanks for the responses, and that's about what I figured I would try. 
Just wondering if anyone would answer "no it won't work because..."

John Drago wrote:
> --- John ORourke <jo...@o-rourke.org> wrote:
> 
>> I've no experience of parsing XML on every request
>> (not that I'd want 
>> to, what an overhead!) but could you just output
>> nothing in the response 
>> phase, and put the XML object reference using  
>> $r->pnotes('my_xml_object', $my_xml_object) then in
>> your output filter 
>> do $my_xml_object=$r->pnotes('my_xml_object') ?
>>
> 
> That's exactly what I would do.  In fact you may be
> able to avoid generating and parsing the XML
> altogether, and just use a regular Perl object
> instead.  That is unless the data represented as XML
> would lose something by not *being* XML.
> 
> Regards,
> John Drago
> 
> 
> 
> 
>        
> ____________________________________________________________________________________
> Got a little couch potato? 
> Check out fun summer activities for kids.
> http://search.yahoo.com/search?fr=oni_on_mail&p=summer+activities+for+kids&cs=bz 
> 


Re: Performance Questions

Posted by John Drago <jd...@yahoo.com>.
--- John ORourke <jo...@o-rourke.org> wrote:

> I've no experience of parsing XML on every request
> (not that I'd want 
> to, what an overhead!) but could you just output
> nothing in the response 
> phase, and put the XML object reference using  
> $r->pnotes('my_xml_object', $my_xml_object) then in
> your output filter 
> do $my_xml_object=$r->pnotes('my_xml_object') ?
> 

That's exactly what I would do.  In fact you may be
able to avoid generating and parsing the XML
altogether, and just use a regular Perl object
instead.  That is unless the data represented as XML
would lose something by not *being* XML.

Regards,
John Drago




       
____________________________________________________________________________________
Got a little couch potato? 
Check out fun summer activities for kids.
http://search.yahoo.com/search?fr=oni_on_mail&p=summer+activities+for+kids&cs=bz 

Re: Performance Questions

Posted by John ORourke <jo...@o-rourke.org>.
Marc M. Adkins wrote:
> The other side of this is that the response handler generates XML and 
> the output filter handler consumes it.  I was thinking that I should 
> be able to hang the XML object (not the text representation thereof) 
> on the request object and avoid the overhead of printing the XML and 
> then parsing it again.  Has anyone tried doing this?

I've no experience of parsing XML on every request (not that I'd want 
to, what an overhead!) but could you just output nothing in the response 
phase, and put the XML object reference using  
$r->pnotes('my_xml_object', $my_xml_object) then in your output filter 
do $my_xml_object=$r->pnotes('my_xml_object') ?

cheers
John


Performance Questions

Posted by "Marc M. Adkins" <Pe...@Doorways.org>.
Is there a performance advantage to using bucket brigades vs. just 
"printing" to the request object?  I assume the latter uses the former 
at some level.

I have a PerlResponseHandler feeding into a PerlOutputFilterHandler. 
The latter uses bucket brigades directly for both input and output.  The 
former just prints to the request object.  I was wondering if I should 
fix the PerlResponseHandler to use bucket brigades directly, or if it 
really mattered.

The other side of this is that the response handler generates XML and 
the output filter handler consumes it.  I was thinking that I should be 
able to hang the XML object (not the text representation thereof) on the 
request object and avoid the overhead of printing the XML and then 
parsing it again.  Has anyone tried doing this?

Marc M. Adkins


Re: Apache2::Request install

Posted by Jonathan Vanasco <jv...@2xlp.com>.
On Jun 13, 2007, at 11:52 AM, Jeff Pang wrote:
>
> It said I was making test with root identify,but Apache would be  
> run as nobody.So in the source dir,I do "chown -R nobody:nobody ."  
> and re-make test with root and nobody,but both still got failed.
>
> I run MP1 with Apache::Request well for long time.But couldn't  
> upgrade to MP2 and Apache2::Request.:(

apache drops to nobody, so thats fine.

what was the error ?  why did it fail ?



// Jonathan Vanasco

| - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -  
- - - - - - - - - - - - - - - - - - -
|   CEO/Founder SyndiClick Networks
| - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -  
- - - - - - - - - - - - - - - - - - -
|      FindMeOn.com - The cure for Multiple Web Personality Disorder
|      Web Identity Management and 3D Social Networking
| - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -  
- - - - - - - - - - - - - - - - - - -
|      RoadSound.com - Tools For Bands, Stuff For Fans
|      Collaborative Online Management And Syndication Tools
| - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -  
- - - - - - - - - - - - - - - - - - -



Re: Apache2::Request install

Posted by Jeff Pang <pa...@earthlink.net>.
Jonathan Vanasco 写道:
> 
> On Jun 13, 2007, at 5:44 AM, Jeff Pang wrote:
> 
>> When I installed Apache2::Request (without make test) and rut it I got
>> the errors:
> 
> at the risk of stating the obvious...
> 
> what happens why you run make test ?
> 

It said I was making test with root identify,but Apache would be run as 
nobody.So in the source dir,I do "chown -R nobody:nobody ." and re-make 
test with root and nobody,but both still got failed.

I run MP1 with Apache::Request well for long time.But couldn't upgrade 
to MP2 and Apache2::Request.:(

Re: Apache2::Request install

Posted by Jonathan Vanasco <jv...@2xlp.com>.
On Jun 13, 2007, at 5:44 AM, Jeff Pang wrote:

> When I installed Apache2::Request (without make test) and rut it I got
> the errors:

at the risk of stating the obvious...

what happens why you run make test ?



// Jonathan Vanasco

| - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -  
- - - - - - - - - - - - - - - - - - -
|   CEO/Founder SyndiClick Networks
| - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -  
- - - - - - - - - - - - - - - - - - -
|      FindMeOn.com - The cure for Multiple Web Personality Disorder
|      Web Identity Management and 3D Social Networking
| - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -  
- - - - - - - - - - - - - - - - - - -
|      RoadSound.com - Tools For Bands, Stuff For Fans
|      Collaborative Online Management And Syndication Tools
| - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -  
- - - - - - - - - - - - - - - - - - -



Re: Apache2::Request install

Posted by Jeff Pang <pa...@earthlink.net>.
Jeff Pang 写道:
> hello,
> 
> When I installed Apache2::Request (without make test) and rut it I got
> the errors:
> 

Sorry,forgot the info for my system.

[root@Gateway ~]# cat /etc/redhat-release
Red Hat Enterprise Linux AS release 4 (Nahant)

[root@Gateway ~]# uname -r
2.6.9-5.EL

[root@Gateway ~]# perl -v
This is perl, v5.8.5 built for i386-linux-thread-multi

Re: Apache2::Request install

Posted by Silent <si...@gmail.com>.
2007/6/13, Jeff Pang <pa...@earthlink.net>:
>
> hello,
>
> When I installed Apache2::Request (without make test) and rut it I got
> the errors:
>
> [root@Gateway libapreq2-2.08]# perl -MApache2::Request -e ''
> Can't load
> '/usr/lib/perl5/site_perl/5.8.5/i386-linux-thread-multi/auto/APR/APR.so'
> for module APR: libaprutil-0.so.0: cannot open shared object file: No
> such file or directory at
> /usr/lib/perl5/5.8.5/i386-linux-thread-multi/DynaLoader.pm line 230.
> at /usr/lib/perl5/site_perl/5.8.5/i386-linux-thread-multi/APR/Pool.pm
> line 23
> Compilation failed in require at
> /usr/lib/perl5/site_perl/5.8.5/i386-linux-thread-multi/APR/Pool.pm line
> 23.
> BEGIN failed--compilation aborted at
> /usr/lib/perl5/site_perl/5.8.5/i386-linux-thread-multi/APR/Pool.pm line
> 23.
> Compilation failed in require at
> /usr/lib/perl5/site_perl/5.8.5/i386-linux-thread-multi/APR/Request.pm
> line 26.
> BEGIN failed--compilation aborted at
> /usr/lib/perl5/site_perl/5.8.5/i386-linux-thread-multi/APR/Request.pm
> line 26.
> Compilation failed in require at
>
> /usr/lib/perl5/site_perl/5.8.5/i386-linux-thread-multi/APR/Request/Param.pm
> line 27.
> BEGIN failed--compilation aborted at
>
> /usr/lib/perl5/site_perl/5.8.5/i386-linux-thread-multi/APR/Request/Param.pm
> line 27.
> Compilation failed in require at
> /usr/lib/perl5/site_perl/5.8.5/i386-linux-thread-multi/Apache2/Request.pm
> line 2.
> BEGIN failed--compilation aborted at
> /usr/lib/perl5/site_perl/5.8.5/i386-linux-thread-multi/Apache2/Request.pm
> line 2.
> Compilation failed in require.
> BEGIN failed--compilation aborted.
>
>
> [root@Gateway libapreq2-2.08]# perl -MAPR -e ''
> Can't load
> '/usr/lib/perl5/site_perl/5.8.5/i386-linux-thread-multi/auto/APR/APR.so'
> for module APR: libaprutil-0.so.0: cannot open shared object file: No
> such file or directory at
> /usr/lib/perl5/5.8.5/i386-linux-thread-multi/DynaLoader.pm line 230.
> at -e line 0
> Compilation failed in require.
> BEGIN failed--compilation aborted.
>
>
> What's the correct way to install Apache2::Request?
> Thanks!
>


Hi, I remembered that I have met this problem before, But not very clearly.
so I install these again, but not found any problem:

history:
    2  mkdir opt
    3  mv httpd-2.0.59.tar.bz2 /opt

    6  cd opt/

   10  wget
http://search.cpan.org/CPAN/authors/id/J/JO/JOESUF/libapreq2-2.08.tar.gz
   12  wget http://perl.apache.org/dist/mod_perl-2.0-current.tar.gz
   14  tar -jxvf httpd-2.0.59.tar.bz2
   16  tar -zxvf libapreq2-2.08.tar.gz
   18  tar -zxvf mod_perl-2.0-current.tar.gz

build apache2
   27  ./configure --prefix=/web --enable-so --with-mpm=prefork
   28  make && make install

build mod_perl
   32  cd ../mod_perl-2.0.3/
   34  perl Makefile.PL MP_APXS=/web/bin/apxs
   35  make
   36  make install

build libapreq
   47  cd ../libapreq2-2.08
   50  perl Makefile.PL --with-apache2-apxs=/web/bin/apxs
   51  make
   52  make install

perl -MApache2::Request -e ''      --- OK


I am running fedora6, and have removed the old mod_perl and libapreq before
this installation,
and this is not the best method to install them,

if you still have this problem,
you can copy the shared libs to apache2 lib directory:

libapreq2-2.08]#find . -name "*.so*"
./glue/perl/blib/arch/auto/APR/Request/Request.so
./glue/perl/blib/arch/auto/APR/Request/Cookie/Cookie.so
./glue/perl/blib/arch/auto/APR/Request/Apache2/Apache2.so
./glue/perl/blib/arch/auto/APR/Request/Error/Error.so
./glue/perl/blib/arch/auto/APR/Request/Parser/Parser.so
./glue/perl/blib/arch/auto/APR/Request/Hook/Hook.so
./glue/perl/blib/arch/auto/APR/Request/Param/Param.so
./glue/perl/blib/arch/auto/APR/Request/CGI/CGI.so
./module/apache2/.libs/mod_apreq2.so
./module/apache2/.libs/mod_apreq2.soT
./library/.libs/libapreq2.so.2
./library/.libs/libapreq2.so.2.6.0
./library/.libs/libapreq2.so



#find /web -name "libaprutil-0.so*"
/web/lib/libaprutil-0.so.0.9.12
/web/lib/libaprutil-0.so
/web/lib/libaprutil-0.so.0



ps: I know you translated some section of <Practical Mod_Perl>, thanks!

hope you can do more work to let Perl much more popular in Chin4.