reload or restart httpd

2006-02-06 Thread Ken Perl
When code is updated during developing period, httpd progress must be
reload or restart so that to see the change. If is it possible to see
the change without reload httpd?

--
perl -e 'print unpack(u,"62V5N\"FME;G\!E

Re: reload or restart httpd

2006-02-06 Thread Sean Davis

On 2/6/06 7:10 AM, "Ken Perl" <[EMAIL PROTECTED]> wrote:

> When code is updated during developing period, httpd progress must be
> reload or restart so that to see the change. If is it possible to see
> the change without reload httpd?


You didn't say which version of mod_perl you are using, but try looking
here:



Sean




Re: reload or restart httpd

2006-02-06 Thread Jeff Pang
hello,
it's not so exact from your words.when your main script change,there is no need 
to reload or restart httpd.
only when you 'use' or 'require'  modules in your main script,and then the 
modules have changed,it need to restart the httpd.
when your modules changed,you could use 'Apache::Reload' for your destination. 
see here pls:
http://perl.apache.org/docs/1.0/guide/porting.html#Using_Apache__Reload

-Original Message-
>From: Ken Perl <[EMAIL PROTECTED]>
>Sent: Feb 6, 2006 8:10 PM
>To: modperl@perl.apache.org
>Subject: reload or restart httpd
>
>When code is updated during developing period, httpd progress must be
>reload or restart so that to see the change. If is it possible to see
>the change without reload httpd?
>
>--
>perl -e 'print unpack(u,"62V5N\"FME;G\!E")'


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


mod_perl2 + DBILogger causes Segmentation fault (in modperl_dir_config () ?)

2006-02-06 Thread David Lamorski

Hello,


After upgrading from apache 1.3 to apache 2.0 I run into problems  
with the DBILogger.pm
This packages is used to insert logging informations into a mysql  
database.


To work together with the new mod_perl2 api I did lightly changes to  
the DBILogger.pm (attached below).


I installed Debian 3.1 Sarge (with almost standard packages) and use  
Apache2 (2.0.54-5) with mod_perl2 (1.999.21).
Everything works okay so far. But sometimes an apache child process  
exits randomly with
[Wed Feb 01 15:59:44 2006] [notice] child pid 24437 exit signal  
Segmentation fault (11)
This doesn't happen with each page request. Approximately every 8 or  
10th request causes the segfault in the error.log

Same manner with the most recent mod_perl2 (2.0.2)


Any ideas about what is the problem?


it follows my config:


Used Components and their Configuration:

*** mod_perl version 1.999021

*** using /usr/lib/perl5/Apache2/Apache/BuildConfig.pm

*** Makefile.PL options:
  MP_APR_LIB  => aprext
  MP_APXS => /usr/bin/apxs2
  MP_CCOPTS   => -g -Wall
  MP_COMPAT_1X=> 1
  MP_DEBUG=> 1
  MP_GENERATE_XS  => 1
  MP_INCLUDE_DIR  => /usr/include/apache2 /usr/include/apr-0
  MP_INST_APACHE2 => 1
  MP_LIBNAME  => mod_perl
  MP_TRACE=> 1
  MP_USE_DSO  => 1
  MP_USE_GTOP => 1
  MP_USE_STATIC   =>


*** /usr/bin/perl -V
Summary of my perl5 (revision 5 version 8 subversion 4) configuration:
  Platform:
osname=linux, osvers=2.6.15, archname=i386-linux-thread-multi
uname='linux ninsei 2.6.15 #1 smp preempt sat jan 7 12:47:52 pst  
2006 i686 gnulinux '
config_args='-Dusethreads -Duselargefiles -Dccflags=-DDEBIAN - 
Dcccdlflags=-fPIC -Darchname=i386-linux -Dprefix=/usr -Dprivlib=/usr/ 
share/perl/5.8 -Darchlib=/usr/lib/perl/5.8 -Dvendorprefix=/usr - 
Dvendorlib=/usr/share/perl5 -Dvendorarch=/usr/lib/perl5 -Dsiteprefix=/ 
usr/local -Dsitelib=/usr/local/share/perl/5.8.4 -Dsitearch=/usr/local/ 
lib/perl/5.8.4 -Dman1dir=/usr/share/man/man1 -Dman3dir=/usr/share/man/ 
man3 -Dsiteman1dir=/usr/local/man/man1 -Dsiteman3dir=/usr/local/man/ 
man3 -Dman1ext=1 -Dman3ext=3perl -Dpager=/usr/bin/sensible-pager - 
Uafs -Ud_csh -Uusesfio -Uusenm -Duseshrplib -Dlibperl=libperl.so. 
5.8.4 -Dd_dosuid -des'

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 -DDEBIAN -fno-strict-aliasing -I/usr/local/include  
-D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64',

optimize='-O2',
cppflags='-D_REENTRANT -D_GNU_SOURCE -DTHREADS_HAVE_PIDS - 
DDEBIAN -fno-strict-aliasing -I/usr/local/include'
ccversion='', gccversion='3.3.5 (Debian 1:3.3.5-13)',  
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 =' -L/usr/local/lib'
libpth=/usr/local/lib /lib /usr/lib
libs=-lgdbm -lgdbm_compat -ldb -ldl -lm -lpthread -lc -lcrypt
perllibs=-ldl -lm -lpthread -lc -lcrypt
libc=/lib/libc-2.3.2.so, so=so, useshrplib=true,  
libperl=libperl.so.5.8.4

gnulibc_version='2.3.2'
  Dynamic Linking:
dlsrc=dl_dlopen.xs, dlext=so, d_dlsymun=undef, ccdlflags='-Wl,-E'
cccdlflags='-fPIC', lddlflags='-shared -L/usr/local/lib'


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

  Built under linux
  Compiled at Jan 12 2006 14:54:46
  %ENV:
PERL_LWP_USE_HTTP_10="1"
  @INC:
/etc/perl
/usr/local/lib/perl/5.8.4
/usr/local/share/perl/5.8.4
/usr/lib/perl5
/usr/share/perl5
/usr/lib/perl/5.8
/usr/share/perl/5.8
/usr/local/lib/site_perl
.

*** Packages of interest status:

Apache::Request: -
CGI: 3.04
LWP: 5.803
mod_perl   : 1.999021



[Wed Feb 01 15:59:44 2006] [notice] child pid 24437 exit signal  
Segmentation fault (11), possible coredump in /var/lib/apache2/tmp


(gdb) bt
#0  0x405c8cee in modperl_dir_config ()
   from /usr/lib/apache2/modules/mod_perl.so
#1  0x40bb93f9 in XS_Apache__RequestRec_dir_config ()
   from /usr/lib/perl5/Apache2/auto/Apache/RequestUtil/RequestUtil.so
#2  0x4067bb09 in Perl_pp_entersub () from /usr/lib/libperl.so.5.8
#3  0x40673ce9 in Perl_runops_standard () from /usr/lib/libperl.so.5.8
#4  0x40616459 in Perl_call_sv () from /usr/lib/libperl.so.5.8
#5  0x4061623d in Perl_call_sv () from /usr/lib/libperl.so.5.8
#6  0x40c85b0d in ?? () from /usr/lib/perl5/Apache2/auto/APR/Pool/ 
Pool.so

#7  0x087ce470 in ?? ()
#8  0x086bf2e4 

Re: reload or restart httpd

2006-02-06 Thread Ken Perl
Yes, I am using Apache2, the doc is very useful.
in httpd.conf file, I use PerlInitHandler example.pm's handler() as
starting point, when I update the code in handler(), I didn't see the
updates, so I asked previous question.
After I read the head of the doc, I make sense that I need to modify
the global %INC after server is started.
I am going to do like this
sub handler {
my $r = shift;
my $s = Apache2::ServerUtil->server;
my $WRoot = $s->dir_config('WRoot');
use lib "$FindBin::Bin/$WRoot";
}

Am I correct?

On 2/6/06, Sean Davis <[EMAIL PROTECTED]> wrote:
>
> On 2/6/06 7:10 AM, "Ken Perl" <[EMAIL PROTECTED]> wrote:
>
> > When code is updated during developing period, httpd progress must be
> > reload or restart so that to see the change. If is it possible to see
> > the change without reload httpd?
>
>
> You didn't say which version of mod_perl you are using, but try looking
> here:
>
>  d>
>
> Sean
>
>
>


--
perl -e 'print unpack(u,"62V5N\"FME;G\!E

Re: mod_perl2 + DBILogger causes Segmentation fault (in modperl_dir_config () ?)

2006-02-06 Thread Tom Schindl
Hi David,

sorry to disappoint you here but version 1.9921 is a preview release of
mp2 and not marked stable. At the moment we have 2.0.2, I know that
1.9921 is the version debian ships with but to get support you'll
certainly have to upgrade your mp2 to an offically stable release, maybe
debian does this already in the unstable branch?

The main problem for debian and other distributions to stick with such
an ancient mp2 is the well known namespace swicht between 1.9921 and 1.9922.

If you start porting things from mp1 to mp2 only make it once and not
twice ;-)

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

Tom

David Lamorski wrote:
> Hello,
> 
> 
> After upgrading from apache 1.3 to apache 2.0 I run into problems  with
> the DBILogger.pm
> This packages is used to insert logging informations into a mysql 
> database.
> 
> To work together with the new mod_perl2 api I did lightly changes to 
> the DBILogger.pm (attached below).
> 
> I installed Debian 3.1 Sarge (with almost standard packages) and use 
> Apache2 (2.0.54-5) with mod_perl2 (1.999.21).
> Everything works okay so far. But sometimes an apache child process 
> exits randomly with
> [Wed Feb 01 15:59:44 2006] [notice] child pid 24437 exit signal 
> Segmentation fault (11)
> This doesn't happen with each page request. Approximately every 8 or 
> 10th request causes the segfault in the error.log
> Same manner with the most recent mod_perl2 (2.0.2)
> 
> 
> Any ideas about what is the problem?
> 
> 
> it follows my config:
> 
> 
> Used Components and their Configuration:
> 
> *** mod_perl version 1.999021
> 
> *** using /usr/lib/perl5/Apache2/Apache/BuildConfig.pm
> 
> *** Makefile.PL options:
>   MP_APR_LIB  => aprext
>   MP_APXS => /usr/bin/apxs2
>   MP_CCOPTS   => -g -Wall
>   MP_COMPAT_1X=> 1
>   MP_DEBUG=> 1
>   MP_GENERATE_XS  => 1
>   MP_INCLUDE_DIR  => /usr/include/apache2 /usr/include/apr-0
>   MP_INST_APACHE2 => 1
>   MP_LIBNAME  => mod_perl
>   MP_TRACE=> 1
>   MP_USE_DSO  => 1
>   MP_USE_GTOP => 1
>   MP_USE_STATIC   =>
> 
> 
> *** /usr/bin/perl -V
> Summary of my perl5 (revision 5 version 8 subversion 4) configuration:
>   Platform:
> osname=linux, osvers=2.6.15, archname=i386-linux-thread-multi
> uname='linux ninsei 2.6.15 #1 smp preempt sat jan 7 12:47:52 pst 
> 2006 i686 gnulinux '
> config_args='-Dusethreads -Duselargefiles -Dccflags=-DDEBIAN -
> Dcccdlflags=-fPIC -Darchname=i386-linux -Dprefix=/usr -Dprivlib=/usr/
> share/perl/5.8 -Darchlib=/usr/lib/perl/5.8 -Dvendorprefix=/usr -
> Dvendorlib=/usr/share/perl5 -Dvendorarch=/usr/lib/perl5 -Dsiteprefix=/
> usr/local -Dsitelib=/usr/local/share/perl/5.8.4 -Dsitearch=/usr/local/
> lib/perl/5.8.4 -Dman1dir=/usr/share/man/man1 -Dman3dir=/usr/share/man/
> man3 -Dsiteman1dir=/usr/local/man/man1 -Dsiteman3dir=/usr/local/man/
> man3 -Dman1ext=1 -Dman3ext=3perl -Dpager=/usr/bin/sensible-pager - Uafs
> -Ud_csh -Uusesfio -Uusenm -Duseshrplib -Dlibperl=libperl.so. 5.8.4
> -Dd_dosuid -des'
> 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
> -DDEBIAN -fno-strict-aliasing -I/usr/local/include  -D_LARGEFILE_SOURCE
> -D_FILE_OFFSET_BITS=64',
> optimize='-O2',
> cppflags='-D_REENTRANT -D_GNU_SOURCE -DTHREADS_HAVE_PIDS - DDEBIAN
> -fno-strict-aliasing -I/usr/local/include'
> ccversion='', gccversion='3.3.5 (Debian 1:3.3.5-13)',  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 =' -L/usr/local/lib'
> libpth=/usr/local/lib /lib /usr/lib
> libs=-lgdbm -lgdbm_compat -ldb -ldl -lm -lpthread -lc -lcrypt
> perllibs=-ldl -lm -lpthread -lc -lcrypt
> libc=/lib/libc-2.3.2.so, so=so, useshrplib=true, 
> libperl=libperl.so.5.8.4
> gnulibc_version='2.3.2'
>   Dynamic Linking:
> dlsrc=dl_dlopen.xs, dlext=so, d_dlsymun=undef, ccdlflags='-Wl,-E'
> cccdlflags='-fPIC', lddlflags='-shared -L/usr/local/lib'
> 
> 
> Characteristics of this binary (from libperl):
>   Compile-time options: MULTIPLICITY USE_ITHREADS USE_LARGE_FILES 
> PERL_IMPLICIT_CONTEXT
>   Built under linux
>   Compiled at Jan 12 2006 14:54:46
>   %ENV:
> PERL_LWP_USE_HTTP_10="1"
>   @INC:
> /etc/perl
> /usr/local/lib/perl/5.8.4
> /usr/local/share/perl/5.8.4
> /usr/lib/perl5
> /usr/share/perl5
> /usr/lib/perl/5.8
> /usr/share/perl/5.8
> /usr/local/lib/site_perl
> .
> 
> *** Packag

interactive debuging modperl2 using Apache::DB

2006-02-06 Thread Ken Perl
Hi,
I configured Apache::DB in my modperl2 and got a notice message in
apache2 startup error.log,
[notice] Apache::DB initialized in child 1123

I think I have setuped it successfully.
And I also see the debugger welcome message,
Loading DB routines from perl5db.pl version 1.28
Editor support available.

Enter h or `h h' for help, or `man perldebug' for more help.

But I don't know to interactive with modperl to debug my program, I
can only see  DB<1>  prompt symbol in the log file.

--
perl -e 'print unpack(u,"62V5N\"FME;G\!E

Re: interactive debuging modperl2 using Apache::DB

2006-02-06 Thread Michael Peters


Ken Perl wrote:
> Hi,
> I configured Apache::DB in my modperl2 and got a notice message in
> apache2 startup error.log,
> [notice] Apache::DB initialized in child 1123
> 
> I think I have setuped it successfully.
> And I also see the debugger welcome message,
> Loading DB routines from perl5db.pl version 1.28
> Editor support available.
> 
> Enter h or `h h' for help, or `man perldebug' for more help.
> 
> But I don't know to interactive with modperl to debug my program, I
> can only see  DB<1>  prompt symbol in the log file.

You need to start apache in single process mode and not detach it from the
terminal like so:

  httpd -X -D PERLDB

Look at
http://perl.apache.org/docs/1.0/guide/debug.html#Interactive_mod_perl_Debugging

-- 
Michael Peters
Developer
Plus Three, LP



Re: reload or restart httpd

2006-02-06 Thread Sean Davis



On 2/6/06 9:06 AM, "Ken Perl" <[EMAIL PROTECTED]> wrote:

> Yes, I am using Apache2, the doc is very useful.
> in httpd.conf file, I use PerlInitHandler example.pm's handler() as
> starting point, when I update the code in handler(), I didn't see the
> updates, so I asked previous question.
> After I read the head of the doc, I make sense that I need to modify
> the global %INC after server is started.
> I am going to do like this
> sub handler {
> my $r = shift;
> my $s = Apache2::ServerUtil->server;
> my $WRoot = $s->dir_config('WRoot');
> use lib "$FindBin::Bin/$WRoot";
> }

Unless I am misunderstanding what you are trying to do, I think you just
need to add these two lines to your httpd.conf to have any changed modules
reloaded:

  PerlModule Apache2::Reload
  PerlInitHandler Apache2::Reload

I don't think you have to do anything special with %INC.

Sean




Re: mod_perl2 + DBILogger causes Segmentation fault (in modperl_dir_config () ?)

2006-02-06 Thread David Lamorski

-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Hi Tom,


thanks for the hint. I always tried out one self compiled mp2 2.0.2  
and got the same segfault with exactly the same

backtrace in gdb.

- --
Dave

Am 06.02.2006 um 15:10 schrieb Tom Schindl:


Hi David,

sorry to disappoint you here but version 1.9921 is a preview  
release of

mp2 and not marked stable. At the moment we have 2.0.2, I know that
1.9921 is the version debian ships with but to get support you'll
certainly have to upgrade your mp2 to an offically stable release,  
maybe

debian does this already in the unstable branch?

The main problem for debian and other distributions to stick with such
an ancient mp2 is the well known namespace swicht between 1.9921  
and 1.9922.


If you start porting things from mp1 to mp2 only make it once and not
twice ;-)

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

Tom



[Wed Feb 01 15:59:44 2006] [notice] child pid 24437 exit signal
Segmentation fault (11), possible coredump in /var/lib/apache2/tmp

(gdb) bt
#0  0x405c8cee in modperl_dir_config ()
   from /usr/lib/apache2/modules/mod_perl.so
#1  0x40bb93f9 in XS_Apache__RequestRec_dir_config ()
   from /usr/lib/perl5/Apache2/auto/Apache/RequestUtil/RequestUtil.so
#2  0x4067bb09 in Perl_pp_entersub () from /usr/lib/libperl.so.5.8
#3  0x40673ce9 in Perl_runops_standard () from /usr/lib/libperl.so. 
5.8

#4  0x40616459 in Perl_call_sv () from /usr/lib/libperl.so.5.8
#5  0x4061623d in Perl_call_sv () from /usr/lib/libperl.so.5.8
#6  0x40c85b0d in ?? () from /usr/lib/perl5/Apache2/auto/APR/Pool/  
Pool.so

#7  0x087ce470 in ?? ()
#8  0x086bf2e4 in ?? ()
#9  0x0004 in ?? ()
#10 0x4030f5d8 in ?? () from /usr/lib/libapr-0.so.0
#11 0x089bb378 in ?? ()
#12 0x08a2a778 in ?? ()
#13 0x087687f8 in ?? ()
#14 0x4030f5d8 in ?? () from /usr/lib/libapr-0.so.0
#15 0x089bd418 in ?? ()
#16 0x089bd408 in ?? ()
#17 0xb198 in ?? ()
#18 0x4030b76d in apr_pool_cleanup_run () from /usr/lib/libapr-0.so.0
#19 0x4030b76d in apr_pool_cleanup_run () from /usr/lib/libapr-0.so.0
#20 0x4030ae09 in apr_pool_clear () from /usr/lib/libapr-0.so.0
---Type  to continue, or q  to quit---
#21 0x080767c5 in ap_graceful_stop_signalled ()
#22 0x08076ac7 in ap_graceful_stop_signalled ()
#23 0x08076be8 in ap_graceful_stop_signalled ()
#24 0x0807745a in ap_mpm_run ()
#25 0x0807da8d in main ()

-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.1 (Darwin)

iD8DBQFD52Eqwmr1dznBY0YRAvWaAJ9lJYaEVUOiIQjTR6PPkfkCNwAjTgCfUZj0
QARMjpLWj98O232tbH6x/mw=
=bJHk
-END PGP SIGNATURE-


Re: mod_perl2 + DBILogger causes Segmentation fault (in modperl_dir_config () ?)

2006-02-06 Thread Tom Schindl
I'm not a guru in gdb and with stack traces but some guesses!

Did you tried it with a recent perl compiled by your own and not the
stock perl from debian.

I always compile perl myself because most distros ship with a threaded
perl (and so does debian) which is not needed when e.g. running apache
in prefork-mode.

Tom

David Lamorski wrote:
> Hi Tom,
> 
> 
> thanks for the hint. I always tried out one self compiled mp2 2.0.2  and
> got the same segfault with exactly the same
> backtrace in gdb.
> 
> --
> Dave
> 
> Am 06.02.2006 um 15:10 schrieb Tom Schindl:
> 
>>> Hi David,
>>>
>>> sorry to disappoint you here but version 1.9921 is a preview  release of
>>> mp2 and not marked stable. At the moment we have 2.0.2, I know that
>>> 1.9921 is the version debian ships with but to get support you'll
>>> certainly have to upgrade your mp2 to an offically stable release,  maybe
>>> debian does this already in the unstable branch?
>>>
>>> The main problem for debian and other distributions to stick with such
>>> an ancient mp2 is the well known namespace swicht between 1.9921  and
>>> 1.9922.
>>>
>>> If you start porting things from mp1 to mp2 only make it once and not
>>> twice ;-)
>>>
>>> See here:
>>> http://perl.apache.org/docs/2.0/rename.html
>>>
>>> Tom
> 
> 
 [Wed Feb 01 15:59:44 2006] [notice] child pid 24437 exit signal
 Segmentation fault (11), possible coredump in /var/lib/apache2/tmp

 (gdb) bt
 #0  0x405c8cee in modperl_dir_config ()
from /usr/lib/apache2/modules/mod_perl.so
 #1  0x40bb93f9 in XS_Apache__RequestRec_dir_config ()
from /usr/lib/perl5/Apache2/auto/Apache/RequestUtil/RequestUtil.so
 #2  0x4067bb09 in Perl_pp_entersub () from /usr/lib/libperl.so.5.8
 #3  0x40673ce9 in Perl_runops_standard () from /usr/lib/libperl.so. 5.8
 #4  0x40616459 in Perl_call_sv () from /usr/lib/libperl.so.5.8
 #5  0x4061623d in Perl_call_sv () from /usr/lib/libperl.so.5.8
 #6  0x40c85b0d in ?? () from /usr/lib/perl5/Apache2/auto/APR/Pool/ 
 Pool.so
 #7  0x087ce470 in ?? ()
 #8  0x086bf2e4 in ?? ()
 #9  0x0004 in ?? ()
 #10 0x4030f5d8 in ?? () from /usr/lib/libapr-0.so.0
 #11 0x089bb378 in ?? ()
 #12 0x08a2a778 in ?? ()
 #13 0x087687f8 in ?? ()
 #14 0x4030f5d8 in ?? () from /usr/lib/libapr-0.so.0
 #15 0x089bd418 in ?? ()
 #16 0x089bd408 in ?? ()
 #17 0xb198 in ?? ()
 #18 0x4030b76d in apr_pool_cleanup_run () from /usr/lib/libapr-0.so.0
 #19 0x4030b76d in apr_pool_cleanup_run () from /usr/lib/libapr-0.so.0
 #20 0x4030ae09 in apr_pool_clear () from /usr/lib/libapr-0.so.0
 ---Type  to continue, or q  to quit---
 #21 0x080767c5 in ap_graceful_stop_signalled ()
 #22 0x08076ac7 in ap_graceful_stop_signalled ()
 #23 0x08076be8 in ap_graceful_stop_signalled ()
 #24 0x0807745a in ap_mpm_run ()
 #25 0x0807da8d in main ()
> 


signature.asc
Description: OpenPGP digital signature


Re: interactive debuging modperl2 using Apache::DB

2006-02-06 Thread Frank Wiles
On Mon, 6 Feb 2006 22:25:34 +0800
Ken Perl <[EMAIL PROTECTED]> wrote:

> Hi,
> I configured Apache::DB in my modperl2 and got a notice message in
> apache2 startup error.log,
> [notice] Apache::DB initialized in child 1123
> 
> I think I have setuped it successfully.
> And I also see the debugger welcome message,
> Loading DB routines from perl5db.pl version 1.28
> Editor support available.
> 
> Enter h or `h h' for help, or `man perldebug' for more help.
> 
> But I don't know to interactive with modperl to debug my program, I
> can only see  DB<1>  prompt symbol in the log file.

  That means you're *in* the interactive debugger.  You can hit 'h'
  for help or read 'man perldebug' for more information on how to
  debug your program. 

 -
   Frank Wiles <[EMAIL PROTECTED]>
   http://www.wiles.org
 -



Ocassionally POST data is missing

2006-02-06 Thread Peter Klump
Hi list,

I'm having a problem with my perl scripts after I ported them into a new
server environment.
My server environment:

Apache2 2.0.55
Perl 5.8.3
CGI 3.15
mod_perl 2.0.2

What is happening is that _occasionaly_ (maybe 1 out of 20 times) the POST
data users send by their browser to my perl scripts is not arriving. Instead
my parameters stay empty. When I look into the environment variables I can
see that the CONTENT_LENGTH returns the right value for the data ought to
arrive. For the errorprone calls I also used CGI::Batch to look into the
POST data and still it was empty. It is very hard to reproduce the error
intentionally - e.g. when I refresh a POST call to my perl script 50 times
it happens that the 51st time the data is gone and the 52nd time everything
is fine again.


The used code looks like this:

print "Content-type:text/html\n\n";
use CGI qw/:standard/;
use CGI::Carp 'fatalsToBrowser';

my $query = new CGI;
my $name = $query->param('name');
my $pass = $query->param('pass');



The environment variables of an exemplary call returning empty post data
like this:

SCRIPT_NAME=...
SERVER_NAME=...
HTTP_REFERER=...
SERVER_ADMIN=...
HTTP_ACCEPT_ENCODING=gzip, deflate
HTTP_CONNECTION=Keep-Alive
REQUEST_METHOD=POST
CONTENT_LENGTH=35
HTTP_ACCEPT=image/gif, image/x-xbitmap, image/jpeg, image/pjpeg,
application/x-shockwave-flash, application/msword,
application/vnd.ms-powerpoi nt, application/vnd.ms-excel, */*
SCRIPT_FILENAME=...
SERVER_SOFTWARE=Apache/2.0.55 (Unix) mod_perl/2.0.2 Perl/v5.8.3
QUERY_STRING= REMOTE_PORT=61160 HTTP_USER_AGENT=Mozilla/4.0 (compatible;
MSIE 6.0; Windows NT 5.1; .NET CLR 1.1.4322) SERVER_PORT=80
SERVER_SIGNATURE=Apache/2.0.55 (Unix) mod_perl/2.0.2 Perl/v5.8.3
Server at ...

HTTP_CACHE_CONTROL=no-cache
HTTP_ACCEPT_LANGUAGE=de
HTTP_COOKIE=...
REMOTE_ADDR=217.85.246.87
CONTENT_TYPE=application/x-www-form-urlencoded
SERVER_PROTOCOL=HTTP/1.1
PATH=/usr/sbin:/bin:/usr/bin:/sbin:/usr/X11R6/bin
REQUEST_URI=...
GATEWAY_INTERFACE=CGI/1.1
SERVER_ADDR=...
DOCUMENT_ROOT=...
HTTP_HOST=...


I should mention that the same scripts performed without any errors in my
earlier server environment which I unfortunately cannot reference to with
exact version numbers - for sure I know only that it was an Apache 1.3 withd
mod_perl < 2 ...

Any feedback is appreciated,
Thomas


-- 
Lust, ein paar Euro nebenbei zu verdienen? Ohne Kosten, ohne Risiko!
Satte Provisionen für GMX Partner: http://www.gmx.net/de/go/partner


Re: Ocassionally POST data is missing

2006-02-06 Thread David Wheeler

On Feb 6, 2006, at 4:06 PM, Peter Klump wrote:

I'm having a problem with my perl scripts after I ported them into  
a new

server environment.
My server environment:

Apache2 2.0.55
Perl 5.8.3
CGI 3.15
mod_perl 2.0.2

What is happening is that _occasionaly_ (maybe 1 out of 20 times)  
the POST
data users send by their browser to my perl scripts is not  
arriving. Instead

my parameters stay empty.


Just out of curiosity, is this server behind a 2.0.55 reverse proxy  
over https? I found that 2.0.55 had a proxy POST bug that really made  
things behave very weirdly. The solution was to drop back to 2.0.54  
or to apply the patch in this bug report:


  http://issues.apache.org/bugzilla/show_bug.cgi?id=37145

HTH,

David


Re: apache2 -t... can't find Apache.pm?

2006-02-06 Thread will trillich
On 2/6/06, Ben Kim <[EMAIL PROTECTED]> wrote:
> 1. Are the permissions right?

when launching apache as root, permissions aren't very significant, are they?


> 2. Just curious, by any chance did you update mod_perl from 1.99xxx to
> 2.0?

this was on a fresh debian setup:

apt-get install apache2-common apache2-mpm-worker apache2-utils apache2
apt-get install libapache-mod-perl

oops!

apt-get --purge remove libapache-mod-perl
apt-get install libapache2-mod-perl2

that's how we got to where we are now.

the html and perl files, of course, migrated from an older apache1.3 system...


identifying mod_perl process at runtime

2006-02-06 Thread Daniel McBrearty
If I have a library which is used for both mod_perl and standard cgi
processes, and I want to know at runtime which, how can I do that?

thanks

Daniel-- Daniel McBreartyemail : danielmcbrearty at gmail.comwww.engoi.com : the multi - language vocab trainerBTW : 0873928131


Re: identifying mod_perl process at runtime

2006-02-06 Thread William A. Rowe, Jr.

Daniel McBrearty wrote:
If I have a library which is used for both mod_perl and standard cgi 
processes, and I want to know at runtime which, how can I do that?


does ARGV[0] tell you?  I'd expect it to be 'httpd' for apache/modperl.


timestamp of Apache::DB

2006-02-06 Thread Ken Perl
when Apache::DB is initialized it will write a line of log into
error.log, but without a timestamp,
[notice] Apache::DB initialized in child 1957
May I add one?

--
perl -e 'print unpack(u,"62V5N\"FME;G\!E

Re: timestamp of Apache::DB

2006-02-06 Thread John Doe
Ken Perl am Dienstag, 7. Februar 2006 07.44:
> when Apache::DB is initialized it will write a line of log into
> error.log, but without a timestamp,
> [notice] Apache::DB initialized in child 1957
> May I add one?
>
> --
> perl -e 'print unpack(u,"62V5N\"FME;G\!E ")'

yes, by putting the line

use CGI::Carp

into the httpd.conf file :-)

hth,
joe