Maurice Height | 3 Jan 02:11 2004
Picon
Picon

Windows Binary of mod_perl2

Hi

I am trying to install the latest mod_perl2 (v1.99_12) into Apache 2.0.48
and ActivePerl v5.8.2.808
on Win2K.

Has a ppm of mod_perl v1.99_12 been released?

A search of the ppm repository at
http://theoryx5.uwinnipeg.ca/cgi-bin/ppmserver?urn:/PPMServer58
returns:

    mod_perl     [1.99_13-dev] Embed a Perl interpreter in the Apache/2.0.48
HTTP server

but no v1.99_12.

Is 1.99_13-dev OK to use?

Thanks for your time
Maurice

--

-- 
Reporting bugs: http://perl.apache.org/bugs/
Mail list info: http://perl.apache.org/maillist/modperl.html

Geoffrey Young | 2 Jan 16:03 2004

Re: Apache::DBI tests failing


Paul Makepeace wrote:
> Hi,
> 
> Apache::DBI doesn't seem to be caching connections here causing a test
> failure. I'm using Debian/unstable, Debian's perl 5.8.2, mysql 4.0.16,
> DBD::mysql 2.9003, and CPAN's DBI 1.39. (DBI warned about perl having
> threading enabled, FWIW.)
> 
> Any ideas what could be the problem?

after playing around a bit with this, it looks like the test isn't calling
Apache::DBI at all.

the attached patch adds some simple tests to make sure that the database
handles being compared actually come from Apache::DBI - they don't for me
using the latest DBI and DBD::mysql.  once the BEGIN logic is changed,
though, all the tests (old and new) pass just fine.

Apache-Test would be a perfect fit for this module ;)

--Geoff
--- t/10mysql.t	2003-05-05 11:14:22.000000000 -0400
+++ t/10mysql.t~	2004-01-02 10:00:59.000000000 -0500
 <at>  <at>  -1,30 +1,34  <at>  <at> 
 use strict;
-use Test::More tests => 7;
-use DBI;
(Continue reading)

Jan Algermissen | 2 Jan 20:11 2004

poking into request content?

Hi,

I want to write a Perl handler that pokes into the content
of a request in order to see if a certain parameter is present and
if so to change the request method.

Ok, I am finally aware that content() may onle be called once on
a request object so any further handlers won't be able to see the
original content.

Is there a way to restore that data after calling content() or read()?

(I had the idea that calling read might silently make the data available
via content() too, but unfortunately this is not true.

The practical reason for my question can be found here:

http://search.cpan.org/~alger/Apache-MagicPOST/

Thanks for any help or ideas.

Jan

-- 
Jan Algermissen                           http://www.topicmapping.com
Consultant & Programmer	                  http://www.gooseworks.org

--

-- 
Reporting bugs: http://perl.apache.org/bugs/
Mail list info: http://perl.apache.org/maillist/modperl.html
(Continue reading)

Geoffrey Young | 2 Jan 20:26 2004

Re: poking into request content?


Jan Algermissen wrote:
> Hi,
> 
> I want to write a Perl handler that pokes into the content
> of a request in order to see if a certain parameter is present and
> if so to change the request method.
> 
> Ok, I am finally aware that content() may onle be called once on
> a request object so any further handlers won't be able to see the
> original content.
> 
> Is there a way to restore that data after calling content() or read()?

see Apache::Request->instance()

HTH

--Geoff

--

-- 
Reporting bugs: http://perl.apache.org/bugs/
Mail list info: http://perl.apache.org/maillist/modperl.html

Stas Bekman | 2 Jan 20:40 2004

Re: Windows Binary of mod_perl2

Maurice Height wrote:
> Hi
> 
> I am trying to install the latest mod_perl2 (v1.99_12) into Apache 2.0.48
> and ActivePerl v5.8.2.808
> on Win2K.
> 
> Has a ppm of mod_perl v1.99_12 been released?
> 
> A search of the ppm repository at
> http://theoryx5.uwinnipeg.ca/cgi-bin/ppmserver?urn:/PPMServer58
> returns:
> 
>     mod_perl     [1.99_13-dev] Embed a Perl interpreter in the Apache/2.0.48
> HTTP server
> 
> but no v1.99_12.
> 
> Is 1.99_13-dev OK to use?

Should be OK, I'd guess (I'm not on WinFU). Randy keeps the cutting edge 
binary. May be it's a good idea to have the latest release binary as well.

__________________________________________________________________
Stas Bekman            JAm_pH ------> Just Another mod_perl Hacker
http://stason.org/     mod_perl Guide ---> http://perl.apache.org
mailto:stas <at> stason.org http://use.perl.org http://apacheweek.com
http://modperlbook.org http://apache.org   http://ticketmaster.com

--

-- 
(Continue reading)

Jan Algermissen | 2 Jan 21:14 2004

Re: poking into request content?

Geoffrey Young wrote:
> 
> Jan Algermissen wrote:
> > Hi,
> >
> > I want to write a Perl handler that pokes into the content
> > of a request in order to see if a certain parameter is present and
> > if so to change the request method.
> >
> > Ok, I am finally aware that content() may onle be called once on
> > a request object so any further handlers won't be able to see the
> > original content.
> >
> > Is there a way to restore that data after calling content() or read()?
> 
> see Apache::Request->instance()

Geoffrey--

thanks. I tried that but am I right in suspecting that subsequent handlers
also need to work with Apache::Request? IOW: is there a way to use Apache::Request
and later use the notrmal $r->content() call?

I want to impose abslolutely no constraint on subsequent handlers (as they
might not even be related to my application).

Jan

> 
> HTH
(Continue reading)

Stas Bekman | 2 Jan 21:33 2004

Re: poking into request content?

Jan Algermissen wrote:
> Geoffrey Young wrote:
> 
>>Jan Algermissen wrote:
>>
>>>Hi,
>>>
>>>I want to write a Perl handler that pokes into the content
>>>of a request in order to see if a certain parameter is present and
>>>if so to change the request method.
>>>
>>>Ok, I am finally aware that content() may onle be called once on
>>>a request object so any further handlers won't be able to see the
>>>original content.
>>>
>>>Is there a way to restore that data after calling content() or read()?
>>
>>see Apache::Request->instance()
> 
> 
> Geoffrey--
> 
> thanks. I tried that but am I right in suspecting that subsequent handlers
> also need to work with Apache::Request? IOW: is there a way to use Apache::Request
> and later use the notrmal $r->content() call?

Not really. You could subclass $r, but your other handlers need to be aware of 
this. So it's not transparent.

> I want to impose abslolutely no constraint on subsequent handlers (as they
(Continue reading)

Daniel Wilson | 5 Jan 06:36 2004

[mp1] modules not shared across children. preloading or fork() issue?

For referance the problem i am seeing, is that even though i have configured a load of modules to be preloaded, they are not being preloaded, or at least not being shared.

This happened after moving to a new server running the same redhat 9 but with different kernels and glibc's. I'm betting thats where the problem is. In the old server everything was shared for a good while.
 
Has anyone had similar problems with RedHat 9?
 
It appears to be one of two things;
 
1. mod_perl is not loading modules before the fork()'s.
2. fork() is not correctly identifing pages which can be shared.
 
How ever, all the code does appear to be loaded into the parent apache process its just seperated during the fork.
 
mod_perl / apache configured with
 
perl Makefile.PL APACHE_SRC=../apache_1.3.29/src USE_APACI=1 PERL_INIT=1 PERL_STACKED_HANDLERS=1 ALL_HOOKS=1 DO_HTTPD=1  APACI_ARGS='--prefix=/usr --activate-module=src/modules/gzip/mod_gzip.a --enable-module=env --activate-module=src/modules/php4/libphp4.a --activate-module=src/modules/perl/libperl.a --enable-module=log_config --disable-module=log_agent --disable-module=log_referer --enable-module=mime --enable-module=negotiation --enable-module=include --disable-module=autoindex --enable-module=dir --enable-module=cgi --enable-module=alias --enable-module=rewrite --enable-module=headers --enable-module=access --enable-module=auth --enable-module=expires --enable-module=setenvif --disable-module=userdir --disable-module=status --disable-module=info --disable-module=asis --enable-suexec --suexec-docroot=/var/www --suexec-caller=apache'
 

Useful stuff...
 

------- httpd.conf #####################
 
PerlModule Apache::Registry Apache::RegistryLoader DBD::mysql BSD::Resource DBI
PerlModule Storable Text::Kakasi Encode::Encoding Apache::DBI Carp
PerlModule IPC::Shareable Jcode IPC::SysV Encode Encode::Alias Lingua::JA::Romaji
PerlRequire "/var/www/startup.pl"
 
<Files anime.manga>
      SetHandler perl-script
      PerlHandler Apache::Registry
      Options ExecCGI
      PerlSendHeader On
</Files>
 
 
 
------- /var/www/startup.pl #####################
 
BEGIN {
use lib qw(/var/www/);
use strict;
#use Apache::Registry;
use lib::ModHTML ();
use IPC::Shareable ();
 

        use drivers::index ();
 .......
        use drivers::anistuff ();
 

use Apache::DBI;
 
#  use DBI;
 
use Apache::RegistryLoader;
  Apache::RegistryLoader->new->handler("/anime.manga","/var/www/html/anime.manga");
 
Apache::DBI->connect_on_init("DBI:mysql:database=xxxxx",  "xxxxx","xxxxxx",
   {
    PrintError => 1, # warn() on errors
    RaiseError => 0, # don't die on error
    AutoCommit => 1, # commit executes immediately
   }
 );
}
 
1;
 

}
 

------- TOP #####################
 
(apache was just started)
  PID USER     PRI  NI  SIZE  RSS SHARE STAT %CPU %MEM   TIME CPU COMMAND
25270 apache    15   0 12772  12M  3152 S     0.0  2.5   0:00   0 httpd
25255 apache    23   0 12640  12M  3120 S     0.0  2.4   0:00   0 httpd
25284 apache    15   0 12620  12M  3144 S     1.1  2.4   0:00   0 httpd
25254 root      15   0 11196  10M  2804 S     1.0  2.2   0:05   0 httpd (parent)
 

------- pmap - parent#####################
 
(other junk same as below)
mapped:   15720 KB writable/private: 8904 KB shared: 72 KB
 
 
 
------- pmap - child #####################
 
httpd(25270)
08048000 (1600 KB)     r-xp (03:03 131451)   /usr/sbin/httpd
081d8000 (88 KB)       rw-p (03:03 131451)   /usr/sbin/httpd
081ee000 (9384 KB)     rwxp (00:00 0)
40000000 (84 KB)       r-xp (03:01 539705)   /lib/ld-2.3.2.so
40015000 (4 KB)        rw-p (03:01 539705)   /lib/ld-2.3.2.so
40016000 (4 KB)        rw-p (00:00 0)
40017000 (12 KB)       r-xp (03:03 929343)   /usr/lib/perl5/site_perl/5.8.2/i686-linux/auto/BSD/Resource/Resource.so
4001a000 (4 KB)        rw-p (03:03 929343)   /usr/lib/perl5/site_perl/5.8.2/i686-linux/auto/BSD/Resource/Resource.so
4001b000 (12 KB)       r-xp (03:03 439898)   /usr/lib/perl5/5.8.2/i686-linux/auto/Fcntl/Fcntl.so
4001e000 (4 KB)        rw-p (03:03 439898)   /usr/lib/perl5/5.8.2/i686-linux/auto/Fcntl/Fcntl.so
4001f000 (8 KB)        r-xp (03:03 848151)   /usr/lib/perl5/site_perl/5.8.2/i686-linux/auto/Text/Kakasi/Kakasi.so
40021000 (4 KB)        rw-p (03:03 848151)   /usr/lib/perl5/site_perl/5.8.2/i686-linux/auto/Text/Kakasi/Kakasi.so
40022000 (4 KB)        rw-p (00:00 0)
40023000 (20 KB)       r-xp (03:01 539626)   /lib/libcrypt-2.3.2.so
40028000 (4 KB)        rw-p (03:01 539626)   /lib/libcrypt-2.3.2.so
40029000 (156 KB)      rw-p (00:00 0)
40050000 (60 KB)       r-xp (03:01 539648)   /lib/libresolv-2.3.2.so
4005f000 (4 KB)        rw-p (03:01 539648)   /lib/libresolv-2.3.2.so
40060000 (8 KB)        rw-p (00:00 0)
40062000 (132 KB)      r-xp (03:01 637731)   /lib/tls/libm-2.3.2.so
40083000 (4 KB)        rw-p (03:01 637731)   /lib/tls/libm-2.3.2.so
40084000 (12 KB)       r-xp (03:01 539628)   /lib/libdl-2.3.2.so
40087000 (4 KB)        rw-p (03:01 539628)   /lib/libdl-2.3.2.so
40088000 (72 KB)       r-xp (03:01 539632)   /lib/libnsl-2.3.2.so
4009a000 (4 KB)        rw-p (03:01 539632)   /lib/libnsl-2.3.2.so
4009b000 (8 KB)        rw-p (00:00 0)
4009d000 (24 KB)       r-xp (03:03 65209)    /usr/lib/libgdbm.so.2.0.0
400a3000 (4 KB)        rw-p (03:03 65209)    /usr/lib/libgdbm.so.2.0.0
400a4000 (4 KB)        rw-p (00:00 0)
400a5000 (932 KB)      r-xp (03:03 945623)   /usr/lib/perl5/5.8.2/i686-linux/CORE/libperl.so
4018e000 (40 KB)       rw-p (03:03 945623)   /usr/lib/perl5/5.8.2/i686-linux/CORE/libperl.so
40198000 (12 KB)       rw-p (00:00 0)
4019b000 (8 KB)        r-xp (03:01 539654)   /lib/libutil-2.3.2.so
4019d000 (4 KB)        rw-p (03:01 539654)   /lib/libutil-2.3.2.so
4019e000 (4 KB)        rw-p (00:00 0)
4019f000 (2048 KB)     r--p (03:03 196819)   /usr/lib/locale/locale-archive
4039f000 (88 KB)       r-xp (03:03 115375)   /usr/lib/perl5/site_perl/5.8.2/i686-linux/auto/DBI/DBI.so
403b5000 (4 KB)        rw-p (03:03 115375)   /usr/lib/perl5/site_perl/5.8.2/i686-linux/auto/DBI/DBI.so
403b6000 (60 KB)       r-xp (03:03 929331)   /usr/lib/perl5/site_perl/5.8.2/i686-linux/auto/DBD/mysql/mysql.so
403c5000 (8 KB)        rw-p (03:03 929331)   /usr/lib/perl5/site_perl/5.8.2/i686-linux/auto/DBD/mysql/mysql.so
403c7000 (116 KB)      r-xp (03:03 49195)    /usr/lib/mysql/libmysqlclient.so.12.0.0
403e4000 (16 KB)       rw-p (03:03 49195)    /usr/lib/mysql/libmysqlclient.so.12.0.0
403e8000 (48 KB)       r-xp (03:03 65251)    /usr/lib/libz.so.1.1.4
403f4000 (8 KB)        rw-p (03:03 65251)    /usr/lib/libz.so.1.1.4
403f6000 (56 KB)       r-xp (03:03 848128)   /usr/lib/perl5/5.8.2/i686-linux/auto/Storable/Storable.so
40404000 (4 KB)        rw-p (03:03 848128)   /usr/lib/perl5/5.8.2/i686-linux/auto/Storable/Storable.so
40405000 (32 KB)       r-xp (03:03 65367)    /usr/lib/libkakasi.so.2.1.0
4040d000 (32 KB)       rw-p (03:03 65367)    /usr/lib/libkakasi.so.2.1.0
40415000 (232 KB)      rw-p (00:00 0)
4044f000 (24 KB)       r-xp (03:03 945619)   /usr/lib/perl5/5.8.2/i686-linux/auto/Encode/Encode.so
40455000 (4 KB)        rw-p (03:03 945619)   /usr/lib/perl5/5.8.2/i686-linux/auto/Encode/Encode.so
40456000 (12 KB)       r-xp (03:03 782934)   /usr/lib/perl5/5.8.2/i686-linux/auto/IPC/SysV/SysV.so
40459000 (4 KB)        rw-p (03:03 782934)   /usr/lib/perl5/5.8.2/i686-linux/auto/IPC/SysV/SysV.so
4045a000 (12 KB)       r-xp (03:03 798327)   /usr/lib/perl5/5.8.2/i686-linux/auto/Filter/Util/Call/Call.so
4045d000 (4 KB)        rw-p (03:03 798327)   /usr/lib/perl5/5.8.2/i686-linux/auto/Filter/Util/Call/Call.so
4045e000 (24 KB)       r--s (03:03 407433)   /usr/lib/gconv/gconv-modules.cache
40464000 (12 KB)       r-xp (03:03 521487)   /usr/lib/perl5/5.8.2/i686-linux/auto/Time/HiRes/HiRes.so
40467000 (4 KB)        rw-p (03:03 521487)   /usr/lib/perl5/5.8.2/i686-linux/auto/Time/HiRes/HiRes.so
40468000 (48 KB)       rw-s (00:04 786432)   /SYSV00000000
40474000 (44 KB)       r-xp (03:01 539638)   /lib/libnss_files-2.3.2.so
4047f000 (4 KB)        rw-p (03:01 539638)   /lib/libnss_files-2.3.2.so
4048c000 (16 KB)       r-xp (03:01 539636)   /lib/libnss_dns-2.3.2.so
40490000 (4 KB)        rw-p (03:01 539636)   /lib/libnss_dns-2.3.2.so
42000000 (1216 KB)     r-xp (03:01 637971)   /lib/tls/libc-2.3.2.so
42130000 (12 KB)       rw-p (03:01 637971)   /lib/tls/libc-2.3.2.so
42133000 (12 KB)       rw-p (00:00 0)
bfff8000 (32 KB)       rwxp (00:00 0)
mapped:   16972 KB writable/private: 10140 KB shared: 72 KB
 

------- Linked against ###################
 
        libcrypt.so.1 => /lib/libcrypt.so.1 (0x40023000)
        libresolv.so.2 => /lib/libresolv.so.2 (0x40050000)
        libm.so.6 => /lib/tls/libm.so.6 (0x40062000)
        libdl.so.2 => /lib/libdl.so.2 (0x40084000)
        libnsl.so.1 => /lib/libnsl.so.1 (0x40088000)
        libgdbm.so.2 => /usr/lib/libgdbm.so.2 (0x4009d000)
        libperl.so => /usr/lib/perl5/5.8.2/i686-linux/CORE/libperl.so (0x400a5000)
        libutil.so.1 => /lib/libutil.so.1 (0x4019b000)
        libc.so.6 => /lib/tls/libc.so.6 (0x42000000)
        /lib/ld-linux.so.2 => /lib/ld-linux.so.2 (0x40000000)
S D | 5 Jan 09:54 2004
Picon

ERROR : Can't locate URI.pm in <at> INC ?

I am trying to use the LWP module & the perl module
contains  :
--------
.
.
use LWP::UserAgent;
.
.
--------

This line throws error :

Can't locate URI.pm in  <at> INC ( <at> INC contains:
/opt/ora9/product/9.2/Apache/perl/lib/5.00503/i686-linux
/opt/ora9/product/9.2/Apache/perl/lib/5.00503
/opt/ora9/product/9.2/Apache/perl/lib/site_perl/5.005/i686-linux
/opt/ora9/product/9.2/Apache/perl/lib/site_perl/5.005
/project/linux/902/APACHE/src/pdc_perl/bin/Linux/Opt/lib/5.00503/i686-linux
/project/linux/902/APACHE/src/pdc_perl/bin/Linux/Opt/lib/5.00503
/project/linux/902/APACHE/src/pdc_perl/bin/Linux/Opt/lib/site_perl/5.005/i686-linux
/project/linux/902/APACHE/src/pdc_perl/bin/Linux/Opt/lib/site_perl/5.005
. /opt/ora9/product/9.2/Apache/Apache/
/opt/ora9/product/9.2/Apache/Apache/lib/perl
/opt/ora9/product/9.2/Apache/perl/lib/5.00503
/opt/ora9/product/9.2/Apache/perl/lib/site_perl/5.005)
at (eval 14) line 3.
B
--- 

Now in the path shown above (below
/opt/ora9/product/9.2/Apache/perl/lib/5.00503
/opt/ora9/product/9.2/Apache/perl/lib/site_perl/5.005/i686-linux),
 Apache/URI.pm is present. There is no other file
named URI in any other packages. 

Also, in the UserAgent.pm, there is no direct
reference to any URI.pm module.

So, which 'URI.pm' is being referred here & how is it
to be included in  <at> INC ?

Thanks,
S

__________________________________
Do you Yahoo!?
Protect your identity with Yahoo! Mail AddressGuard
http://antispam.yahoo.com/whatsnewfree

--

-- 
Reporting bugs: http://perl.apache.org/bugs/
Mail list info: http://perl.apache.org/maillist/modperl.html

Ruslan U. Zakirov | 5 Jan 10:07 2004
Picon

Re: ERROR : Can't locate URI.pm in <at> INC ?

S D wrote:
> I am trying to use the LWP module & the perl module
> contains  :
> --------
> .
> .
> use LWP::UserAgent;
> .
> .
> --------
> 
> This line throws error :
> 
> Can't locate URI.pm in  <at> INC ( <at> INC contains:
> /opt/ora9/product/9.2/Apache/perl/lib/5.00503/i686-linux
> /opt/ora9/product/9.2/Apache/perl/lib/5.00503
> /opt/ora9/product/9.2/Apache/perl/lib/site_perl/5.005/i686-linux
> /opt/ora9/product/9.2/Apache/perl/lib/site_perl/5.005
> /project/linux/902/APACHE/src/pdc_perl/bin/Linux/Opt/lib/5.00503/i686-linux
> /project/linux/902/APACHE/src/pdc_perl/bin/Linux/Opt/lib/5.00503
> /project/linux/902/APACHE/src/pdc_perl/bin/Linux/Opt/lib/site_perl/5.005/i686-linux
> /project/linux/902/APACHE/src/pdc_perl/bin/Linux/Opt/lib/site_perl/5.005
> . /opt/ora9/product/9.2/Apache/Apache/
> /opt/ora9/product/9.2/Apache/Apache/lib/perl
> /opt/ora9/product/9.2/Apache/perl/lib/5.00503
> /opt/ora9/product/9.2/Apache/perl/lib/site_perl/5.005)
> at (eval 14) line 3.
> B
> --- 
> 
> Now in the path shown above (below
> /opt/ora9/product/9.2/Apache/perl/lib/5.00503
> /opt/ora9/product/9.2/Apache/perl/lib/site_perl/5.005/i686-linux),
>  Apache/URI.pm is present. There is no other file
> named URI in any other packages.
locate URI.pm ?

There is standalone module URI on CPAN. You have to install it.

	Good luck. Ruslan.
> 
> Also, in the UserAgent.pm, there is no direct
> reference to any URI.pm module.
> 
> So, which 'URI.pm' is being referred here & how is it
> to be included in  <at> INC ?
> 
> Thanks,
> S
> 
> __________________________________
> Do you Yahoo!?
> Protect your identity with Yahoo! Mail AddressGuard
> http://antispam.yahoo.com/whatsnewfree
> 

--

-- 
Reporting bugs: http://perl.apache.org/bugs/
Mail list info: http://perl.apache.org/maillist/modperl.html


Gmane