How to get remote host address in Apache::Request

2006-09-26 Thread Jeff Pang
Hello,list,

I want to get the remote client's IPs in Apache::Request like the method of 
'$q->remote_host()' in CGI.pm.
Can you help me?Thank you.

--
Jeff Pang
NetEase AntiSpam Team
http://corp.netease.com


Re: How to get remote host address in Apache::Request

2006-09-26 Thread Jeff Pang
Sorry for the trouble,I've got it.It's '$r->get_remote_host'.

-Original Message-
>From: Jeff Pang <[EMAIL PROTECTED]>
>Sent: Sep 26, 2006 5:22 AM
>To: modperl@perl.apache.org
>Subject: How to get remote host address in Apache::Request
>
>Hello,list,
>
>I want to get the remote client's IPs in Apache::Request like the method of 
>'$q->remote_host()' in CGI.pm.
>Can you help me?Thank you.
>
>--
>Jeff Pang
>NetEase AntiSpam Team
>http://corp.netease.com


--
Jeff Pang
NetEase AntiSpam Team
http://corp.netease.com


make test failure Test.pm line 500

2006-09-26 Thread Rippetoe, David



-8<-- Start Bug Report 
8<--1. Problem Description: 
Getting error during 
make test.  Pattern match error in Test.pm line 500 - my @digits = shift =~ 
m/(\d+)\.?(\d*)\.?(\d*)/;
Ran 
below:
t/TEST -clean 
t/TEST -verbose t/api/aplog.t 
 
t/logs/error_log
 
[Tue Sep 26 10:56:56 
2006] [info] Init: Initializing OpenSSL library[Tue Sep 26 10:56:56 2006] 
[info] Init: Seeding PRNG with 0 bytes of entropy[Tue Sep 26 10:56:56 2006] 
[info] Init: Generating temporary RSA private keys (512/1024 bits)[Tue Sep 
26 10:56:57 2006] [info] Init: Generating temporary DH parameters (512/1024 
bits)[Tue Sep 26 10:56:57 2006] [warn] Init: Session Cache is not configured 
[hint: SSLSessionCache][Tue Sep 26 10:56:57 2006] [info] Init: Initializing 
(virtual) servers for SSL[Tue Sep 26 10:56:57 2006] [info] Server: /2.0.52, 
Interface: mod_ssl/2.0.52, Library: OpenSSL/0.9.7d[Tue Sep 26 10:56:57 2006] 
[info] mod_unique_id: using ip addr 209.62.129.212END in modperl_extra.pl, 
pid=20221END in modperl_extra.pl, pid=20221[Tue Sep 26 10:57:08 2006] 
[info] Init: Initializing OpenSSL library[Tue Sep 26 10:57:08 2006] [info] 
Init: Seeding PRNG with 0 bytes of entropy[Tue Sep 26 10:57:08 2006] [info] 
Init: Generating temporary RSA private keys (512/1024 bits)[Tue Sep 26 
10:57:08 2006] [info] Init: Generating temporary DH parameters (512/1024 
bits)[Tue Sep 26 10:57:08 2006] [info] Init: Initializing (virtual) servers 
for SSL[Tue Sep 26 10:57:08 2006] [info] Server: /2.0.52, Interface: 
mod_ssl/2.0.52, Library: OpenSSL/0.9.7d[Tue Sep 26 10:57:08 2006] [info] 
mod_unique_id: using ip addr 209.62.129.212[Tue Sep 26 10:57:09 2006] 
[notice] /2.0.52 (Unix) world domination series/2.0 DAV/2 mod_ssl/2.0.52 
OpenSSL/0.9.7d mod_perl/2.0.2 Perl/v5.8.3 configured -- resuming normal 
operations[Tue Sep 26 10:57:09 2006] [info] Server built: Dec 21 2004 
10:50:03[Tue Sep 26 10:57:09 2006] [debug] worker.c(1631): AcceptMutex: 
fcntl (default: fcntl) *** The following warn entry is expected and 
harmless ***[Tue Sep 26 10:57:11 2006] [info] [client 127.0.0.1] 
TestAPI::aplog test in progress *** The following warn entry is 
expected and harmless ***This log message comes with no 
header *** The following warn entry is expected and harmless 
***[Tue Sep 26 10:57:11 2006] [debug] 
/http/mktmp/mod_perl-2.0.2/t/response/TestAPI/aplog.pm(71): log_serror test 
1[Tue Sep 26 10:57:11 2006] [error] [client 127.0.0.1] Use of uninitialized 
value in pattern match (m//) at 
/http/mktmp/mod_perl-2.0.2/Apache-Test/lib/Apache/Test.pm line 500, <$fh> 
line 3.\n[Tue Sep 26 10:57:11 2006] [warn] child process 20308 still did not 
exit, sending a SIGTERM[Tue Sep 26 10:57:11 2006] [info] Child process 
pid=20308 is exiting[Tue Sep 26 10:57:11 2006] [info] Child process 
pid=20308 is exiting - server pushEND in modperl_extra.pl, pid=20308END 
in modperl_extra.pl, pid=20308[Tue Sep 26 10:57:12 2006] [info] removed PID 
file /http/mktmp/mod_perl-2.0.2/t/logs/httpd.pid (pid=20280)[Tue Sep 26 
10:57:12 2006] [notice] caught SIGTERM, shutting downEND in 
modperl_extra.pl, pid=20280END in modperl_extra.pl, 
pid=20280
 
 2 Used Components and their 
Configuration: *** mod_perl version 2.02 *** using 
/http/mktmp/mod_perl-2.0.2/lib/Apache2/BuildConfig.pm *** 
Makefile.PL options:  MP_APR_LIB => 
aprext  MP_AP_PREFIX   => /opt/apache  
MP_COMPAT_1X   => 1  MP_GENERATE_XS => 1  
MP_LIBNAME => mod_perl  
MP_USE_DSO => 1  *** 
/opt/apache/bin/httpd -VServer version: /2.0.52Server built:   
Dec 21 2004 10:50:03Server's Module Magic Number: 
20020903:9Architecture:   32-bitServer compiled 
with -D APACHE_MPM_DIR="server/mpm/worker" -D 
APR_HAS_SENDFILE -D APR_HAS_MMAP -D 
APR_USE_FCNTL_SERIALIZE -D APR_USE_PTHREAD_SERIALIZE -D 
SINGLE_LISTEN_UNSERIALIZED_ACCEPT -D APR_HAS_OTHER_CHILD -D 
AP_HAVE_RELIABLE_PIPED_LOGS -D HTTPD_ROOT="/opt/apache" -D 
SUEXEC_BIN="/opt/apache/bin/suexec" -D 
DEFAULT_SCOREBOARD="logs/apache_runtime_status" -D 
DEFAULT_ERRORLOG="logs/error_log" -D 
AP_TYPES_CONFIG_FILE="conf/mime.types" -D 
SERVER_CONFIG_FILE="conf/httpd.conf" *** /bin/ldd 
/opt/apache/bin/httpd    libz.so.1 
=> 
/usr/lib/libz.so.1    libssl.so.0.9.7 
=>   
/opt/USIopenssl/lib/libssl.so.0.9.7    
libcrypto.so.0.9.7 =>    
/opt/USIopenssl/lib/libcrypto.so.0.9.7    
libaprutil-0.so.0 => 
/opt/apache/lib/libaprutil-0.so.0    
libexpat.so.0 => 
/opt/apache/lib/libexpat.so.0    
libapr-0.so.0 => 
/opt/apache/lib/libapr-0.so.0    
libsendfile.so.1 =>  
/usr/lib/libsendfile.so.1    
librt.so.1 =>    
/usr/lib/librt.so.1    libm.so.1 
=> 
/usr/lib/libm.so.1    libsocket.so.1 
=>    
/usr/lib/libsocket.so.1    
libnsl.so.1 =>   
/usr/lib/libnsl.so.1    
libresolv.so.2 =>    
/usr/lib/libresolv.so.2    
libpthread.so.1 =>   
/usr/lib/libpthread.so.1    
libdl.so.1 =>    
/usr/lib/libdl.so.1    libc.so.1 
=> 
/usr/lib/libc.so

Re: make test failure Test.pm line 500

2006-09-26 Thread Philip M. Gollucci
Rippetoe, David wrote:
> -8<-- Start Bug Report 8<--
> 1. Problem Description:
>  
> Getting error during make test.  Pattern match error in Test.pm line 500
> - my @digits = shift =~ m/(\d+)\.?(\d*)\.?(\d*)/;
I'm not sure when/where/how, but this is fixed in SVN.

Thats Test.pm v1.27 which was distributed with mod_perl 2.0.2. (yes, you match 
-- thats correct)


-- 

Philip M. Gollucci ([EMAIL PROTECTED]) 323.219.4708
Consultant / http://p6m7g8.net/Resume/resume.shtml
Senior Software Engineer - TicketMaster - http://ticketmaster.com
1024D/A79997FA F357 0FDD 2301 6296 690F  6A47 D55A 7172 A799 97F

When I call your name, Girl, it starts to flame
Burning in my heart, Tearing it all apart..
No matter how I try My love I cannot hide


Re: Apache2::Upload Works in Test Environment But Not In Test Environment

2006-09-26 Thread Philip M. Gollucci
Jay Truesdale wrote:
> I am having a strange problem with Apache2::Upload in a Mason mod_perl
> environment. It works on a test box running Centos (2.6.9-42.0.2.EL)
> but then crashes on a production box running RHEL (2.6.9-42.0.2.ELsmp)
> as shown here:
As I tried to say yesterday, but had e-mail issues, My best guess is deinstall
then manually check for left overs and manuall clean.  Then install from source.

This is especially true if you had 2.03 -> 2.06 or so installed previously as 
IIRC some of
these functions moved while we were still in -dev.

-- 

Philip M. Gollucci ([EMAIL PROTECTED]) 323.219.4708
Consultant / http://p6m7g8.net/Resume/resume.shtml
Senior Software Engineer - TicketMaster - http://ticketmaster.com
1024D/A79997FA F357 0FDD 2301 6296 690F  6A47 D55A 7172 A799 97F

When I call your name, Girl, it starts to flame
Burning in my heart, Tearing it all apart..
No matter how I try My love I cannot hide


apache 1.37 + mod_perl + libapreq

2006-09-26 Thread David Scott

Guys,

I'm trying to build a bundled version of Apache 1 + mod_perl but am 
having a hell of a time building the Apache::Request and Apache::Cookie 
modules.


I've built the shared object version of libapreq and that works fine 
(I've got my Apache 1.37 in a special source file and libapreq finds it 
fine).  The problem is that when I come to build the Perl wrapper later, 
it tries to re-build the C library.  This is bad, because there is no 
way to pass in the location of the Apache header files during the Perl 
build process, so the whole thing fails.


According to the docs, if I have libapreq.so and the Perl build can find 
it, it will use that library rather than re-building it.  So I say


perl Makefile LIBS='-L/path/to/my/libapreq -lapreq'

When building the Perl module.  Seems to me it should find libapreq.  
But it wants to build the C library anyway.  What am I doing wrong???


Thanks in advance.

David


Re: apache 1.37 + mod_perl + libapreq

2006-09-26 Thread Philip M. Gollucci
David Scott wrote:
> Guys,
> 
> I'm trying to build a bundled version of Apache 1 + mod_perl but am
> having a hell of a time building the Apache::Request and Apache::Cookie
> modules.
> 
> I've built the shared object version of libapreq and that works fine
> (I've got my Apache 1.37 in a special source file and libapreq finds it
> fine).  The problem is that when I come to build the Perl wrapper later,
> it tries to re-build the C library.  This is bad, because there is no
> way to pass in the location of the Apache header files during the Perl
> build process, so the whole thing fails.
> 
> According to the docs, if I have libapreq.so and the Perl build can find
> it, it will use that library rather than re-building it.  So I say
What docs ?

> 
> perl Makefile LIBS='-L/path/to/my/libapreq -lapreq'
I assume you mean
-L/usr/local/X
ls -l X/*
  libapreq.so

Personally, never tried, but if you point me at the docs your following, I'm 
willing to try it.
-- 

Philip M. Gollucci ([EMAIL PROTECTED]) 323.219.4708
Consultant / http://p6m7g8.net/Resume/resume.shtml
Senior Software Engineer - TicketMaster - http://ticketmaster.com
1024D/A79997FA F357 0FDD 2301 6296 690F  6A47 D55A 7172 A799 97F

When I call your name, Girl, it starts to flame
Burning in my heart, Tearing it all apart..
No matter how I try My love I cannot hide