RE: Make Test problems...

2001-06-17 Thread Ian \(the webguy\)

Ok;

After a week to reinstall redhat, delete the perl, apache, and mod_perl
RPM's, and downloading the source files on my dinky little 28.8 connection,
I come again to building this package.

I used the makepl_args.mod_perl file that was given to me earlier, and I am
still getting the following error messages...
snippet number=1
make[1]: Leaving directory `/home/ian/mod_perl-1.25/Util'
cp t/conf/mod_perl_srm.conf t/conf/srm.conf
../apache_1.3.9/src/httpd -f `pwd`/t/conf/httpd.conf -X -d `pwd`/t 
httpd listening on port 8529
will write error_log to: t/logs/error_log
letting apache warm up...\c
done
/usr/bin/perl t/TEST 0
still waiting for server to warm up...not ok
server failed to start! (please examine t/logs/error_log) at t/TEST line 95.
make: *** [run_tests] Error 9
/snippet

From the t/logs/error_log file...
snippet number=2
Server is not starting !?
Subroutine main::pid redefined at /home/ian/mod_perl-1.25/t//docs/startup.pl
line 103.
Subroutine main::access redefined at
/home/ian/mod_perl-1.25/t//docs/startup.pl line 104.
Subroutine Outside::code redefined at
/home/ian/mod_perl-1.25/t//docs/startup.pl line 108.
Subroutine PerlTransHandler::handler redefined at
/home/ian/mod_perl-1.25/t//docs/startup.pl line 114.
Subroutine MyClass::method redefined at
/home/ian/mod_perl-1.25/t//docs/startup.pl line 121.
Subroutine BaseClass::handler redefined at
/home/ian/mod_perl-1.25/t//docs/startup.pl line 127.
Subroutine My::child_init redefined at
/home/ian/mod_perl-1.25/t//docs/startup.pl line 145.
Subroutine My::child_exit redefined at
/home/ian/mod_perl-1.25/t//docs/startup.pl line 155.
Subroutine My::restart redefined at
/home/ian/mod_perl-1.25/t//docs/startup.pl line 159.
Subroutine Apache::AuthenTest::handler redefined at
/home/ian/mod_perl-1.25/t//docs/startup.pl line 167.
Subroutine My::DirIndex::handler redefined at
/home/ian/mod_perl-1.25/t//docs/startup.pl line 189.
Subroutine My::ProxyTest::handler redefined at
/home/ian/mod_perl-1.25/t//docs/startup.pl line 207.
Subroutine handler redefined at /home/ian/mod_perl-1.25/t//docs/startup.pl
line 241.
Subroutine new redefined at /home/ian/mod_perl-1.25/t//docs/startup.pl line
263.
Subroutine DESTROY redefined at /home/ian/mod_perl1.25/t//docs/startup.pl
line 265.
[notice] Destruction-DESTROY called for $global_object
Subroutine handler redefined at /home/ian/mod_perl-1.25/t//docs/stacked.pl
line6.
Subroutine one redefined at /home/ian/mod_perl-1.25/t//docs/stacked.pl line
14.
Subroutine two redefined at /home/ian/mod_perl-1.25/t//docs/stacked.pl line
25.
Subroutine three redefined at /home/ian/mod_perl-1.25/t//docs/stacked.pl
line 31.
Subroutine four redefined at /home/ian/mod_perl-1.25/t//docs/stacked.pl line
37.
[Sun Jun 17 02:12:39 2001] [crit] (98)Address already in use: make_sock:
could not bind to port 8529
Server is not starting !?
Subroutine main::pid redefined at /home/ian/mod_perl-1.25/t//docs/startup.pl
line 103.
Subroutine main::access redefined at
/home/ian/mod_perl-1.25/t//docs/startup.pl line 104.
Subroutine Outside::code redefined at
/home/ian/mod_perl-1.25/t//docs/startup.pl
/snippet

I've tried make test port=12345 and it still errors out when I try to run
make test.

Any ideas where to look?  Anyone else using RH6.1 having/had the same
problems?  Any General Ideas (as I try to RTFM?)

Thanks...

Ian
-Original Message-
From: Steven Lembark [mailto:[EMAIL PROTECTED]]
Sent: Monday, June 11, 2001 11:08 AM
To: Ged Haywood; Ian (the webguy)
Cc: [EMAIL PROTECTED]
Subject: Re: Make Test problems...



snip

file called makpl_args.mod_perl in the mod_perl directory.  The best
arrangement for the directories seems to be something like:

snip

Even easier, put .makepl_args.mod_perl into your home directory and
you won't have to re-create it every time you go to re-build Apache.






RE: Make Test problems...

2001-06-17 Thread Stas Bekman


[parts of the message were snipped]

On Sun, 17 Jun 2001, Ian (the webguy) wrote:

 I used the makepl_args.mod_perl file that was given to me earlier, and I am
 still getting the following error messages...
 snippet number=1
 make[1]: Leaving directory `/home/ian/mod_perl-1.25/Util'
 cp t/conf/mod_perl_srm.conf t/conf/srm.conf
 ../apache_1.3.9/src/httpd -f `pwd`/t/conf/httpd.conf -X -d `pwd`/t 
 httpd listening on port 8529
 will write error_log to: t/logs/error_log
 letting apache warm up...\c
 done
 /usr/bin/perl t/TEST 0
 still waiting for server to warm up...not ok
 server failed to start! (please examine t/logs/error_log) at t/TEST line 95.
 make: *** [run_tests] Error 9
 /snippet

 [Sun Jun 17 02:12:39 2001] [crit] (98)Address already in use: make_sock:
 could not bind to port 8529
 Server is not starting !?

you already have a server running, kill it first.

$ killall httpd

test that you've it killed

$ ps auxc | grep httpd

now try again.

$ make test

_
Stas Bekman  JAm_pH --   Just Another mod_perl Hacker
http://stason.org/   mod_perl Guide  http://perl.apache.org/guide
mailto:[EMAIL PROTECTED]   http://apachetoday.com http://eXtropia.com/
http://singlesheaven.com http://perl.apache.org http://perlmonth.com/





RE: Make Test problems...

2001-06-17 Thread Ian \(the webguy\)

Nope.

I did a killall httpd as root then tried it again, but to no evail.
snip
[root@ian mod_perl-1.25]# killall httpd
httpd: no process killed
[root@ian mod_perl-1.25]# ps auxc | grep httpd
[root@ian mod_perl-1.25]# make test
(cd ../apache_1.3.9  PERL5LIB=/home/ian/mod_perl-1.25/lib make)
make[1]: Entering directory `/home/ian/apache_1.3.9'
=== src
make[2]: Entering directory `/home/ian/apache_1.3.9'
make[3]: Entering directory `/home/ian/apache_1.3.9/src'
=== src/regex
make[4]: Nothing to be done for `all'.
=== src/regex
=== src/os/unix
make[4]: Nothing to be done for `all'.
=== src/os/unix
=== src/ap
make[4]: Nothing to be done for `all'.
=== src/ap
=== src/main
make[4]: Nothing to be done for `all'.
=== src/main
=== src/lib
=== src/lib
=== src/modules
=== src/modules/standard
make[5]: Nothing to be done for `all'.
=== src/modules/standard
=== src/modules/proxy
make[5]: Nothing to be done for `all'.
=== src/modules/proxy
=== src/modules/perl
make[5]: Nothing to be done for `all'.
=== src/modules/perl
=== src/modules
cc -c -I. -I/usr/lib/perl5/5.00503/i386-linux/CORE -I./os/unix -I./include  
 -D
INUX=2 -DMOD_PERL -DUSE_PERL_SSI -Dbool=char -DHAS_BOOL -I/usr/local/include
 -D
SE_HSREGEX `./apaci` modules.c
cc -c -I. -I/usr/lib/perl5/5.00503/i386-linux/CORE -I./os/unix -I./include  
 -D
INUX=2 -DMOD_PERL -DUSE_PERL_SSI -Dbool=char -DHAS_BOOL -I/usr/local/include
 -D
SE_HSREGEX `./apaci` buildmark.c
cc  -DLINUX=2 -DMOD_PERL -DUSE_PERL_SSI -Dbool=char -DHAS_BOOL -I/usr/local/
inc
ude -DUSE_HSREGEX `./apaci`\
  -o httpd buildmark.o modules.o modules/standard/libstandard.a
modules/pro
y/libproxy.a modules/perl/libperl.a main/libmain.a ./os/unix/libos.a
ap/libap.a
regex/libregex.a   -lm -lcrypt -lndbm -rdynamic  -L/usr/local/lib
/usr/lib/perl
/5.00503/i386-linux/auto/DynaLoader/DynaLoader.a -L/usr/lib/perl5/5.00503/i3
86-
inux/CORE -lperl -lnsl -ldl -lm -lc -lposix -lcrypt
make[3]: Leaving directory `/home/ian/apache_1.3.9/src'
make[2]: Leaving directory `/home/ian/apache_1.3.9'
make[2]: Entering directory `/home/ian/apache_1.3.9'
=== src/support
make[3]: Entering directory `/home/ian/apache_1.3.9/src/support'
make[3]: Nothing to be done for `all'.
make[3]: Leaving directory `/home/ian/apache_1.3.9/src/support'
=== src/support
make[2]: Leaving directory `/home/ian/apache_1.3.9'
=== src
make[1]: Leaving directory `/home/ian/apache_1.3.9'
make[1]: Entering directory `/home/ian/mod_perl-1.25/Apache'
make[1]: Leaving directory `/home/ian/mod_perl-1.25/Apache'
make[1]: Entering directory `/home/ian/mod_perl-1.25/Connection'
make[1]: Leaving directory `/home/ian/mod_perl-1.25/Connection'
make[1]: Entering directory `/home/ian/mod_perl-1.25/Constants'
make[1]: Leaving directory `/home/ian/mod_perl-1.25/Constants'
make[1]: Entering directory `/home/ian/mod_perl-1.25/File'
make[1]: Leaving directory `/home/ian/mod_perl-1.25/File'
make[1]: Entering directory `/home/ian/mod_perl-1.25/Leak'
make[1]: Leaving directory `/home/ian/mod_perl-1.25/Leak'
make[1]: Entering directory `/home/ian/mod_perl-1.25/Log'
make[1]: Leaving directory `/home/ian/mod_perl-1.25/Log'
make[1]: Entering directory `/home/ian/mod_perl-1.25/ModuleConfig'
make[1]: Leaving directory `/home/ian/mod_perl-1.25/ModuleConfig'
make[1]: Entering directory `/home/ian/mod_perl-1.25/PerlRunXS'
make[1]: Leaving directory `/home/ian/mod_perl-1.25/PerlRunXS'
make[1]: Entering directory `/home/ian/mod_perl-1.25/Server'
make[1]: Leaving directory `/home/ian/mod_perl-1.25/Server'
make[1]: Entering directory `/home/ian/mod_perl-1.25/Symbol'
make[1]: Leaving directory `/home/ian/mod_perl-1.25/Symbol'
make[1]: Entering directory `/home/ian/mod_perl-1.25/Table'
make[1]: Leaving directory `/home/ian/mod_perl-1.25/Table'
make[1]: Entering directory `/home/ian/mod_perl-1.25/URI'
make[1]: Leaving directory `/home/ian/mod_perl-1.25/URI'
make[1]: Entering directory `/home/ian/mod_perl-1.25/Util'
make[1]: Leaving directory `/home/ian/mod_perl-1.25/Util'
cp t/conf/mod_perl_srm.conf t/conf/srm.conf
../apache_1.3.9/src/httpd -f `pwd`/t/conf/httpd.conf -X -d `pwd`/t 
httpd listening on port 8529
will write error_log to: t/logs/error_log
letting apache warm up...\c
done
/usr/bin/perl t/TEST 0
still waiting for server to warm up...not ok
server failed to start! (please examine t/logs/error_log) at t/TEST line 95.
make: *** [run_tests] Error 9
snipped

Ian
-Original Message-
From: Stas Bekman [mailto:[EMAIL PROTECTED]]
Sent: Sunday, June 17, 2001 2:47 AM
To: Ian (the webguy)
Cc: mod_perl list
Subject: RE: Make Test problems...



[parts of the message were snipped]

On Sun, 17 Jun 2001, Ian (the webguy) wrote:

 I used the makepl_args.mod_perl file that was given to me earlier, and I
am
 still getting the following error messages...
 snippet number=1
 make[1]: Leaving directory `/home/ian/mod_perl-1.25/Util'
 cp t/conf/mod_perl_srm.conf t/conf/srm.conf
 ../apache_1.3.9/src/httpd -f `pwd`/t/conf/httpd.conf -X -d `pwd`/t 
 httpd listening on port 8529
 will 

RE: Make Test problems...

2001-06-17 Thread Stas Bekman

 I did a killall httpd as root then tried it again, but to no evail.
 snip
 [root@ian mod_perl-1.25]# killall httpd
 httpd: no process killed
 [root@ian mod_perl-1.25]# ps auxc | grep httpd
 [root@ian mod_perl-1.25]# make test

[..]

 ../apache_1.3.9/src/httpd -f `pwd`/t/conf/httpd.conf -X -d `pwd`/t 
 httpd listening on port 8529
 will write error_log to: t/logs/error_log
 letting apache warm up...\c
 done
 /usr/bin/perl t/TEST 0
 still waiting for server to warm up...not ok
 server failed to start! (please examine t/logs/error_log) at t/TEST line 95.
 make: *** [run_tests] Error 9
 snipped


what the error_log says




 Ian
 -Original Message-
 From: Stas Bekman [mailto:[EMAIL PROTECTED]]
 Sent: Sunday, June 17, 2001 2:47 AM
 To: Ian (the webguy)
 Cc: mod_perl list
 Subject: RE: Make Test problems...



 [parts of the message were snipped]

 On Sun, 17 Jun 2001, Ian (the webguy) wrote:

  I used the makepl_args.mod_perl file that was given to me earlier, and I
 am
  still getting the following error messages...
  snippet number=1
  make[1]: Leaving directory `/home/ian/mod_perl-1.25/Util'
  cp t/conf/mod_perl_srm.conf t/conf/srm.conf
  ../apache_1.3.9/src/httpd -f `pwd`/t/conf/httpd.conf -X -d `pwd`/t 
  httpd listening on port 8529
  will write error_log to: t/logs/error_log
  letting apache warm up...\c
  done
  /usr/bin/perl t/TEST 0
  still waiting for server to warm up...not ok
  server failed to start! (please examine t/logs/error_log) at t/TEST line
 95.
  make: *** [run_tests] Error 9
  /snippet
 
  [Sun Jun 17 02:12:39 2001] [crit] (98)Address already in use: make_sock:
  could not bind to port 8529
  Server is not starting !?

 you already have a server running, kill it first.

 $ killall httpd

 test that you've it killed

 $ ps auxc | grep httpd

 now try again.

 $ make test

 _
 Stas Bekman  JAm_pH --   Just Another mod_perl Hacker
 http://stason.org/   mod_perl Guide  http://perl.apache.org/guide
 mailto:[EMAIL PROTECTED]   http://apachetoday.com http://eXtropia.com/
 http://singlesheaven.com http://perl.apache.org http://perlmonth.com/






_
Stas Bekman  JAm_pH --   Just Another mod_perl Hacker
http://stason.org/   mod_perl Guide  http://perl.apache.org/guide
mailto:[EMAIL PROTECTED]   http://apachetoday.com http://eXtropia.com/
http://singlesheaven.com http://perl.apache.org http://perlmonth.com/





RE: Make Test problems...

2001-06-17 Thread Ian \(the webguy\)

Server is not starting !?
Subroutine main::pid redefined at /home/ian/mod_perl-1.25/t//docs/startup.pl
line 103.
Subroutine main::access redefined at
/home/ian/mod_perl-1.25/t//docs/startup.pl line 104.
Subroutine Outside::code redefined at
/home/ian/mod_perl-1.25/t//docs/startup.pl line 108.
Subroutine PerlTransHandler::handler redefined at
/home/ian/mod_perl-1.25/t//docs/startup.pl line 114.
Subroutine MyClass::method redefined at
/home/ian/mod_perl-1.25/t//docs/startup.pl line 121.
Subroutine BaseClass::handler redefined at
/home/ian/mod_perl-1.25/t//docs/startup.pl line 127.
Subroutine My::child_init redefined at
/home/ian/mod_perl-1.25/t//docs/startup.pl line 145.
Subroutine My::child_exit redefined at
/home/ian/mod_perl-1.25/t//docs/startup.pl line 155.
Subroutine My::restart redefined at
/home/ian/mod_perl-1.25/t//docs/startup.pl line 159.
Subroutine Apache::AuthenTest::handler redefined at
/home/ian/mod_perl-1.25/t//docs/startup.pl line 167.
Subroutine My::DirIndex::handler redefined at
/home/ian/mod_perl-1.25/t//docs/startup.pl line 189.
Subroutine My::ProxyTest::handler redefined at
/home/ian/mod_perl-1.25/t//docs/startup.pl line 207.
Subroutine handler redefined at /home/ian/mod_perl-1.25/t//docs/startup.pl
line 241.
Subroutine new redefined at /home/ian/mod_perl-1.25/t//docs/startup.pl line
263.
Subroutine DESTROY redefined at /home/ian/mod_perl-1.25/t//docs/startup.pl
line 265.
[notice] Destruction-DESTROY called for $global_object
Subroutine handler redefined at /home/ian/mod_perl-1.25/t//docs/stacked.pl
line 6.
Subroutine one redefined at /home/ian/mod_perl-1.25/t//docs/stacked.pl line
14.
Subroutine two redefined at /home/ian/mod_perl-1.25/t//docs/stacked.pl line
25.
Subroutine three redefined at /home/ian/mod_perl-1.25/t//docs/stacked.pl
line 31.
Subroutine four redefined at /home/ian/mod_perl-1.25/t//docs/stacked.pl line
37.
[Sun Jun 17 02:57:52 2001] [warn] pid file
/home/ian/mod_perl-1.25/t/logs/httpd.pid overwritten -- Unclean shutdown of
previous Apache run?
[notice] Destruction-DESTROY called for $global_object
[Sun Jun 17 02:57:55 2001] [warn] [notice] child_init for process 2497,
report any problems to [no address given]

~Ian

-Original Message-
From: Stas Bekman [mailto:[EMAIL PROTECTED]]
Sent: Sunday, June 17, 2001 3:07 AM
To: Ian (the webguy)
Cc: mod_perl list
Subject: RE: Make Test problems...


 I did a killall httpd as root then tried it again, but to no evail.
 snip
 [root@ian mod_perl-1.25]# killall httpd
 httpd: no process killed
 [root@ian mod_perl-1.25]# ps auxc | grep httpd
 [root@ian mod_perl-1.25]# make test

[..]

 ../apache_1.3.9/src/httpd -f `pwd`/t/conf/httpd.conf -X -d `pwd`/t 
 httpd listening on port 8529
 will write error_log to: t/logs/error_log
 letting apache warm up...\c
 done
 /usr/bin/perl t/TEST 0
 still waiting for server to warm up...not ok
 server failed to start! (please examine t/logs/error_log) at t/TEST line
95.
 make: *** [run_tests] Error 9
 snipped


what the error_log says




 Ian
 -Original Message-
 From: Stas Bekman [mailto:[EMAIL PROTECTED]]
 Sent: Sunday, June 17, 2001 2:47 AM
 To: Ian (the webguy)
 Cc: mod_perl list
 Subject: RE: Make Test problems...



 [parts of the message were snipped]

 On Sun, 17 Jun 2001, Ian (the webguy) wrote:

  I used the makepl_args.mod_perl file that was given to me earlier, and I
 am
  still getting the following error messages...
  snippet number=1
  make[1]: Leaving directory `/home/ian/mod_perl-1.25/Util'
  cp t/conf/mod_perl_srm.conf t/conf/srm.conf
  ../apache_1.3.9/src/httpd -f `pwd`/t/conf/httpd.conf -X -d `pwd`/t 
  httpd listening on port 8529
  will write error_log to: t/logs/error_log
  letting apache warm up...\c
  done
  /usr/bin/perl t/TEST 0
  still waiting for server to warm up...not ok
  server failed to start! (please examine t/logs/error_log) at t/TEST line
 95.
  make: *** [run_tests] Error 9
  /snippet
 
  [Sun Jun 17 02:12:39 2001] [crit] (98)Address already in use: make_sock:
  could not bind to port 8529
  Server is not starting !?

 you already have a server running, kill it first.

 $ killall httpd

 test that you've it killed

 $ ps auxc | grep httpd

 now try again.

 $ make test

 _
 Stas Bekman  JAm_pH --   Just Another mod_perl Hacker
 http://stason.org/   mod_perl Guide  http://perl.apache.org/guide
 mailto:[EMAIL PROTECTED]   http://apachetoday.com http://eXtropia.com/
 http://singlesheaven.com http://perl.apache.org http://perlmonth.com/






_
Stas Bekman  JAm_pH --   Just Another mod_perl Hacker
http://stason.org/   mod_perl Guide  http://perl.apache.org/guide
mailto:[EMAIL PROTECTED]   http://apachetoday.com http://eXtropia.com/
http://singlesheaven.com http://perl.apache.org http://perlmonth.com/






RE: Make Test problems...

2001-06-17 Thread Philip Mak

On Sun, 17 Jun 2001, Ian (the webguy) wrote:

 I did a killall httpd as root then tried it again, but to no evail.

I don't think that httpd already being running was the problem. The test
script is supposed to pick a port that's NOT in use for the purposes of
the test, isn't it?

 still waiting for server to warm up...not ok
 server failed to start! (please examine t/logs/error_log) at t/TEST line 95.
 make: *** [run_tests] Error 9

Do what it says. Examine the file called t/logs/error_log. It should be
somewhere in the directory where you're compiling this stuff.

If you don't understand the contents of the error log, try posting them
here.

-Philip Mak ([EMAIL PROTECTED])




RE: Make Test problems...

2001-06-17 Thread Stas Bekman


in this case delete the old error_log file  before you start the test, you
have all the mess from the previous run posted.

 /home/ian/mod_perl-1.25/t/logs/httpd.pid overwritten -- Unclean shutdown of
 previous Apache run?

It looks like it starts here:

 [notice] Destruction-DESTROY called for $global_object
 [Sun Jun 17 02:57:55 2001] [warn] [notice] child_init for process 2497,
 report any problems to [no address given]

what happens when you run:

../apache_1.3.9/src/httpd -f `pwd`/t/conf/httpd.conf -X -d `pwd`/t 

Do you get a core file dumped?

I have missed the original problem post. Is this a static build or DSO?
What 'perl -V' says?


_
Stas Bekman  JAm_pH --   Just Another mod_perl Hacker
http://stason.org/   mod_perl Guide  http://perl.apache.org/guide
mailto:[EMAIL PROTECTED]   http://apachetoday.com http://eXtropia.com/
http://singlesheaven.com http://perl.apache.org http://perlmonth.com/





Capturing CGI output

2001-06-17 Thread Steve Wells

I have a mod_perl library that utilizes the Tempate Toolkit so that html
files are parsed through the toolkit before being sent back to the
browser.  It works great but now they require that the library be
upgraded to include support for CGI's.  In other words I need to capture
the output of the CGI as though it were a template and parse it as well.

I can use $r-lookup_uri('/cgifile.cgi') to gather up the subrequest and
run it using the run() command.  However, the information from the CGI
is passed back to the browser instead of handed off to me for
processing.  Is there some way to capture that information?

Thanks,
STEVE



Re: Capturing CGI output

2001-06-17 Thread Perrin Harkins

From: Steve Wells [EMAIL PROTECTED]
 I can use $r-lookup_uri('/cgifile.cgi') to gather up the subrequest and
 run it using the run() command.  However, the information from the CGI
 is passed back to the browser instead of handed off to me for
 processing.  Is there some way to capture that information?

You could use LWP to make the request instead of using a subrequest, or you
could use a modified version of Apache::PerlRun or Apache::Registry that
fakes CGI and captures the output.  You can look at Apache::Filter for some
ideas.

- Perrin




Re: mod_perl DSO leaking on restart?

2001-06-17 Thread Paul G. Weiss

Doug,

I'm confused as to how you managed to *not* leak when I'm still
leaking.  I've tried these tests on both a Solaris 2.7 system and
a Linux 7.1.

Here is a summary of what I do:

I build Perl

./Configure -des -Uusemymalloc -Dprefix=$(echo ~/test/prefix) -Dcc=gcc
make  make test  make install

I build Apache

~/test/prefix/bin/perl Makefile.PL USE_DSO=1 EVERYTHING=1 \
USE_APACI=1 APACHE_PREFIX=$(echo ~/test/prefix/apache) \
APACHE_SRC=../apache_1.3.19 \
APACI_ARGS='--enable-module=all --enable-shared=max' \
DO_HTTPD=1

make
make test

I now run the test:

make start_httpd_fork
ps -o 'pid,vsz,comm' -p $(cat t/logs/httpd.pid )
kill -USR1 $(cat t/logs/httpd.pid )
ps -o 'pid,vsz,comm' -p $(cat t/logs/httpd.pid )
kill -USR1 $(cat t/logs/httpd.pid )

etc.  The virtual size grows each time, although by different amounts 
in Linux and Solaris.  Both are around 4Mb.  So what are you doing 
differently?  Let me know so I can do the same thing.  The Perl I'm using
is 5.6.1 and the modperl is
modperl_20010614113010.tar.gz.

-P


On Fri, 15 Jun 2001, Paul G. Weiss wrote:

 Don't be so willing to bet.  Still leaking.
 
 I did as you said and just rebuilt Perl and mod_perl but didn't bother to
 rebuild all the Perl modules (I would have done so had I been successful
 here).
 
 Here's what I see:
 
  make start_httpd_fork
 ../apache_1.3.19/src/httpd -f `pwd`/t/conf/httpd.conf -d `pwd`/t
  ps -o 'pid,ppid,vsz,comm' -p $(cat t/logs/httpd.pid )
   PID  PPID  VSZ COMMAND
 28802 1 15528 ../apache_1.3.19/src/httpd
  kill -USR1 $(cat t/logs/httpd.pid )
  ps -o 'pid,ppid,vsz,comm' -p $(cat t/logs/httpd.pid )
   PID  PPID  VSZ COMMAND
 28802 1 20016 ../apache_1.3.19/src/httpd
  kill -USR1 $(cat t/logs/httpd.pid )
  ps -o 'pid,ppid,vsz,comm' -p $(cat t/logs/httpd.pid )
   PID  PPID  VSZ COMMAND
 28802 1 24544 ../apache_1.3.19/src/httpd
  kill -USR1 $(cat t/logs/httpd.pid )
  ps -o 'pid,ppid,vsz,comm' -p $(cat t/logs/httpd.pid )
   PID  PPID  VSZ COMMAND
 28802 1 27224 ../apache_1.3.19/src/httpd
  make kill_httpd
 kill `cat t/logs/httpd.pid`
 rm -f t/logs/httpd.pid
 rm -f t/logs/error_log
 
 
 
 On Thu, 14 Jun 2001, Doug MacEachern wrote:
 
  On Fri, 15 Jun 2001, Paul G. Weiss wrote:
  
   alignbytes=8, usemymalloc=y, prototype=define
  ^
  ok, here's why i kept asking for perl -V.  i don't see Perl's malloc.c
  ever release its memory pool.  when usemymalloc=y, free() only puts memory
  back into Perl's pool for use by other malloc()'s.  i don't see a function
  to destroy this pool when perl cleans itself up.  willing to bet if you
  rebuild Perl with: Configure -des -Uusemymalloc ...
  and then rebuild mod_perl, the leaks will go away.
  
 







CGI::Cookie vs Apache::Cookie -- help?

2001-06-17 Thread will trillich

On Sat, Jun 16, 2001 at 12:58:14AM +0200, Nenad wrote:
 package Apache::PermanentTicketRenewer
 my Counter;
 sub handler {
 my $r = shift;
 
 $Counter += 1;
 my $cookie = CGI::Cookie-new(-name = 'Ticket',
 -path = '/',
 -domain = '.my.com',
 -expires = '+1M',
 -value = { 'ID' = $Counter }
);

mine is similar:

$r-log_error( qq(...id=$ID, sending cookie) );
my $cookie =
Apache::Cookie-new( $r,
-name   = $cookie_name,
-value  = $ID ,
-domain = $r-hostname,
-path   = '/' ,
);
$r-header_out('Set-Cookie', = $cookie);

which sets a cookie value of SCALAR(0x863c9f8) instead of the
$ID string that shows up in the log, which is

...id=483dd0e2202accce6d4d3e07d976bfdc, sending cookie

in the original ticket example above, -value is a hashref:

-value = { ID = $ID }

instead of

-value = $ID

as the Apache::Cookie manpage suggests (a plain scalar value).

this worked just fine with CGI::Cookie (without the $r, of
course) -- can't get it to return the actual scalar value with
Apache::Cookie...

ideas? help!

-- 
I figure: if a man's gonna gamble, may as well do it
without plowing.   -- Bama Dillert, Some Came Running

[EMAIL PROTECTED]
http://sourceforge.net/projects/newbiedoc -- we need your brain!
http://www.dontUthink.com/ -- your brain needs us!



Re: CGI::Cookie vs Apache::Cookie -- help?

2001-06-17 Thread Chris Winters

* will trillich ([EMAIL PROTECTED]) [010617 23:04]:
 mine is similar:
 
   $r-log_error( qq(...id=$ID, sending cookie) );
   my $cookie =
   Apache::Cookie-new( $r,
   -name   = $cookie_name,
   -value  = $ID ,
   -domain = $r-hostname,
   -path   = '/' ,
   );
   $r-header_out('Set-Cookie', = $cookie);
 
 which sets a cookie value of SCALAR(0x863c9f8) instead of the
 $ID string that shows up in the log, which is
 
   ...id=483dd0e2202accce6d4d3e07d976bfdc, sending cookie
 
 in the original ticket example above, -value is a hashref:
 
   -value = { ID = $ID }
 
 instead of
 
   -value = $ID
 
 as the Apache::Cookie manpage suggests (a plain scalar value).
 
 this worked just fine with CGI::Cookie (without the $r, of
 course) -- can't get it to return the actual scalar value with
 Apache::Cookie...
 
 ideas? help!

From 'perldoc Apache::Cookie'

   bake
   Put cookie in the oven to bake.  (Add a Set-Cookie
   header to the outgoing headers table.)

   $cookie-bake;

   as_string
   Format the cookie object as a string:

   #same as $cookie-bake
   $r-err_headers_out-add(Set-Cookie = $cookie-as_string);


HTH

Chris

-- 
Chris Winters ([EMAIL PROTECTED])
Building enterprise-capable snack solutions since 1988.



Re: CGI::Cookie vs Apache::Cookie -- help?

2001-06-17 Thread Cees Hek

On Sun, 17 Jun 2001, will trillich wrote:

   $r-log_error( qq(...id=$ID, sending cookie) );
   my $cookie =
   Apache::Cookie-new( $r,
   -name   = $cookie_name,
   -value  = $ID ,
   -domain = $r-hostname,
   -path   = '/' ,
   );
   $r-header_out('Set-Cookie', = $cookie);

You forgot to bake your cookie...  Read the Apache::Cookie docs again.

Get rid of the $r-header_out(...) line and use the following instead.

$cookie-bake();

Cees




Re: [OT] Is this feasible in Perl??

2001-06-17 Thread will trillich

On Wed, Jun 13, 2001 at 06:57:45AM +0800, Gunther Birznieks wrote:
 My experience is that architecturally Perl cannot handle this. You should 
 switch to Java and use an Enterprise Java Bean to do all this for you.

you must have an interesting sense of humor.

-- 
I figure: if a man's gonna gamble, may as well do it
without plowing.   -- Bama Dillert, Some Came Running

[EMAIL PROTECTED]
http://sourceforge.net/projects/newbiedoc -- we need your brain!
http://www.dontUthink.com/ -- your brain needs us!



Re: CGI::Cookie vs Apache::Cookie -- help?

2001-06-17 Thread will trillich

On Sun, Jun 17, 2001 at 11:14:23PM -0400, Chris Winters wrote:
 * will trillich ([EMAIL PROTECTED]) [010617 23:04]:
  $r-log_error( qq(...id=$ID, sending cookie) );

--this outputs the string i'm hoping for, into the log file.

  my $cookie =
  Apache::Cookie-new( $r,
  -name   = $cookie_name,
  -value  = $ID ,
  -domain = $r-hostname,
  -path   = '/' ,
  );
  $r-header_out('Set-Cookie', = $cookie);

 From 'perldoc Apache::Cookie'
 
bake
Put cookie in the oven to bake.  (Add a Set-Cookie
header to the outgoing headers table.)
 
$cookie-bake;

what does $cookie-bake do (add set-cookie header) that
$r-header_out('set-cookie'=$cookie) (add set-cookie header)
does not?

[ and why ain't that mentioned in the manual? ]

-- 
I figure: if a man's gonna gamble, may as well do it
without plowing.   -- Bama Dillert, Some Came Running

[EMAIL PROTECTED]
http://sourceforge.net/projects/newbiedoc -- we need your brain!
http://www.dontUthink.com/ -- your brain needs us!



Re: CGI::Cookie vs Apache::Cookie -- help?

2001-06-17 Thread Per Einar


- Original Message -
From: will trillich [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Monday, June 18, 2001 7:09 AM
Subject: Re: CGI::Cookie vs Apache::Cookie -- help?


 On Sun, Jun 17, 2001 at 11:14:23PM -0400, Chris Winters wrote:
  * will trillich ([EMAIL PROTECTED]) [010617 23:04]:
   $r-log_error( qq(...id=$ID, sending cookie) );

 --this outputs the string i'm hoping for, into the log file.

That's because you're outputting $ID and not the cookie itself, which you're
creating below.


   my $cookie =
   Apache::Cookie-new( $r,
   -name   = $cookie_name,
   -value  = $ID ,
   -domain = $r-hostname,
   -path   = '/' ,
   );
   $r-header_out('Set-Cookie', = $cookie);

  From 'perldoc Apache::Cookie'
 
 bake
 Put cookie in the oven to bake.  (Add a Set-Cookie
 header to the outgoing headers table.)
 
 $cookie-bake;

 what does $cookie-bake do (add set-cookie header) that
 $r-header_out('set-cookie'=$cookie) (add set-cookie header)
 does not?

 [ and why ain't that mentioned in the manual? ]

As someone else stated, bake() actually sends a Set-Cookie header, but with
$cookie-as_string and not just $cookie (which is an instance of
Apache::Cookie). When you're just sending $cookie you're sending an object
reference.

Per Einar Ellefsen
[EMAIL PROTECTED]




Advanced daemon allocation

2001-06-17 Thread Trevor Phillips

Is there any way to control which daemon handles a certain request with apache
1.x?

eg; Out of a pool of 50 daemons, restricting accesses to a certain mod_perl
application to 10 specific daemons would improve the efficiency of data cached
in those processes.

If this is impossible in Apache 1.x, will it be possible in 2.x? I can really
see a more advanced model for allocation improving efficiency and performance.
Even if it isn't a hard-limit, but a preferential arrangement where, for
example, hits to a particular URL tend to go to the same daemon(s), this would
improve the efficiency of data cached within the daemon.

I suppose I could do this now by having a front-end proxy, and mini-Apache
configs for each group I want, but that seems to be going too far (at this
stage), especially if the functionality already exists to do this within the
one server.

-- 
. Trevor Phillips -   http://jurai.murdoch.edu.au/ . 
: CWIS Systems Administrator -   [EMAIL PROTECTED] : 
| IT Services   -   Murdoch University | 
 --- Member of the #SAS#  #CFC# 
| On nights such as this, evil deeds are done. And good deeds, of /
| course. But mostly evil, on the whole. /
 \  -- (Terry Pratchett, Wyrd Sisters)  /



Re: Advanced daemon allocation

2001-06-17 Thread Gunther Birznieks

Yeah, just use the mod_proxy model and then proxy to different mod_perl 
backend servers based on the URL itself.

At 01:17 PM 6/18/2001 +0800, Trevor Phillips wrote:
Is there any way to control which daemon handles a certain request with apache
1.x?

eg; Out of a pool of 50 daemons, restricting accesses to a certain mod_perl
application to 10 specific daemons would improve the efficiency of data cached
in those processes.

If this is impossible in Apache 1.x, will it be possible in 2.x? I can really
see a more advanced model for allocation improving efficiency and performance.
Even if it isn't a hard-limit, but a preferential arrangement where, for
example, hits to a particular URL tend to go to the same daemon(s), this would
improve the efficiency of data cached within the daemon.

I suppose I could do this now by having a front-end proxy, and mini-Apache
configs for each group I want, but that seems to be going too far (at this
stage), especially if the functionality already exists to do this within the
one server.

--
. Trevor Phillips -   http://jurai.murdoch.edu.au/ .
: CWIS Systems Administrator -   [EMAIL PROTECTED] :
| IT Services   -   Murdoch University |
  --- Member of the #SAS#  #CFC# 
| On nights such as this, evil deeds are done. And good deeds, of /
| course. But mostly evil, on the whole. /
  \  -- (Terry Pratchett, Wyrd Sisters)  /

__
Gunther Birznieks ([EMAIL PROTECTED])
eXtropia - The Open Web Technology Company
http://www.eXtropia.com/




Re: Advanced daemon allocation

2001-06-17 Thread Stas Bekman

On Mon, 18 Jun 2001, Trevor Phillips wrote:

 Is there any way to control which daemon handles a certain request with apache
 1.x?

http://perl.apache.org/guide/strategy.html#Running_More_than_One_mod_perl_S

 eg; Out of a pool of 50 daemons, restricting accesses to a certain mod_perl
 application to 10 specific daemons would improve the efficiency of data cached
 in those processes.

 If this is impossible in Apache 1.x, will it be possible in 2.x? I can really
 see a more advanced model for allocation improving efficiency and performance.
 Even if it isn't a hard-limit, but a preferential arrangement where, for
 example, hits to a particular URL tend to go to the same daemon(s), this would
 improve the efficiency of data cached within the daemon.

 I suppose I could do this now by having a front-end proxy, and mini-Apache
 configs for each group I want, but that seems to be going too far (at this
 stage), especially if the functionality already exists to do this within the
 one server.

 --
 . Trevor Phillips -   http://jurai.murdoch.edu.au/ .
 : CWIS Systems Administrator -   [EMAIL PROTECTED] :
 | IT Services   -   Murdoch University |
  --- Member of the #SAS#  #CFC# 
 | On nights such as this, evil deeds are done. And good deeds, of /
 | course. But mostly evil, on the whole. /
  \  -- (Terry Pratchett, Wyrd Sisters)  /




_
Stas Bekman  JAm_pH --   Just Another mod_perl Hacker
http://stason.org/   mod_perl Guide  http://perl.apache.org/guide
mailto:[EMAIL PROTECTED]   http://apachetoday.com http://eXtropia.com/
http://singlesheaven.com http://perl.apache.org http://perlmonth.com/





Re: mod_perl DSO leaking on restart?

2001-06-17 Thread Paul G. Weiss

Now I'm really confused.  I built the whole thing statically and it still
leaks:

the static build (using the same Perl):

~/test/prefix/bin/perl Makefile.PL EVERYTHING=1 \
APACHE_PREFIX=$(echo ~/test/prefix/apache) \
APACHE_SRC=../apache_1.3.19 DO_HTTPD=1

Now it still leaks 520K per restart:

 make start_httpd_fork
../apache_1.3.19/src/httpd -f `pwd`/t/conf/httpd.conf -d `pwd`/t
 ps -o pid,vsz,comm -p $(cat t/logs/httpd.pid )
  PID   VSZ COMMAND
 4877  7856 httpd
 kill -USR1  $(cat t/logs/httpd.pid )
 ps -o pid,vsz,comm -p $(cat t/logs/httpd.pid )
  PID   VSZ COMMAND
 4877  8488 httpd
 kill -USR1  $(cat t/logs/httpd.pid )
 ps -o pid,vsz,comm -p $(cat t/logs/httpd.pid )
  PID   VSZ COMMAND
 4877  9108 httpd

This is on Redhat 7.1 (not Linux 7.1 as I said below).  I didn't bother
trying it on Solaris.

You don't suppose building with APACHE_PREFIX could have anything to do
with it, do you?  I haven't heard of any leaks with a static build.

-P






On Sun, 17 Jun 2001, Paul G. Weiss wrote:

 Doug,
 
 I'm confused as to how you managed to *not* leak when I'm still
 leaking.  I've tried these tests on both a Solaris 2.7 system and
 a Linux 7.1.
 
 Here is a summary of what I do:
 
 I build Perl
 
 ./Configure -des -Uusemymalloc -Dprefix=$(echo ~/test/prefix) -Dcc=gcc
 make  make test  make install
 
 I build Apache
 
 ~/test/prefix/bin/perl Makefile.PL USE_DSO=1 EVERYTHING=1 \
 USE_APACI=1 APACHE_PREFIX=$(echo ~/test/prefix/apache) \
 APACHE_SRC=../apache_1.3.19 \
 APACI_ARGS='--enable-module=all --enable-shared=max' \
 DO_HTTPD=1
 
 make
 make test
 
 I now run the test:
 
 make start_httpd_fork
 ps -o 'pid,vsz,comm' -p $(cat t/logs/httpd.pid )
 kill -USR1 $(cat t/logs/httpd.pid )
 ps -o 'pid,vsz,comm' -p $(cat t/logs/httpd.pid )
 kill -USR1 $(cat t/logs/httpd.pid )
 
 etc.  The virtual size grows each time, although by different amounts 
 in Linux and Solaris.  Both are around 4Mb.  So what are you doing 
 differently?  Let me know so I can do the same thing.  The Perl I'm using
 is 5.6.1 and the modperl is
 modperl_20010614113010.tar.gz.
 
 -P
 
 
 On Fri, 15 Jun 2001, Paul G. Weiss wrote:
 
  Don't be so willing to bet.  Still leaking.
  
  I did as you said and just rebuilt Perl and mod_perl but didn't bother to
  rebuild all the Perl modules (I would have done so had I been successful
  here).
  
  Here's what I see:
  
   make start_httpd_fork
  ../apache_1.3.19/src/httpd -f `pwd`/t/conf/httpd.conf -d `pwd`/t
   ps -o 'pid,ppid,vsz,comm' -p $(cat t/logs/httpd.pid )
PID  PPID  VSZ COMMAND
  28802 1 15528 ../apache_1.3.19/src/httpd
   kill -USR1 $(cat t/logs/httpd.pid )
   ps -o 'pid,ppid,vsz,comm' -p $(cat t/logs/httpd.pid )
PID  PPID  VSZ COMMAND
  28802 1 20016 ../apache_1.3.19/src/httpd
   kill -USR1 $(cat t/logs/httpd.pid )
   ps -o 'pid,ppid,vsz,comm' -p $(cat t/logs/httpd.pid )
PID  PPID  VSZ COMMAND
  28802 1 24544 ../apache_1.3.19/src/httpd
   kill -USR1 $(cat t/logs/httpd.pid )
   ps -o 'pid,ppid,vsz,comm' -p $(cat t/logs/httpd.pid )
PID  PPID  VSZ COMMAND
  28802 1 27224 ../apache_1.3.19/src/httpd
   make kill_httpd
  kill `cat t/logs/httpd.pid`
  rm -f t/logs/httpd.pid
  rm -f t/logs/error_log
  
  
  
  On Thu, 14 Jun 2001, Doug MacEachern wrote:
  
   On Fri, 15 Jun 2001, Paul G. Weiss wrote:
   
alignbytes=8, usemymalloc=y, prototype=define
   ^
   ok, here's why i kept asking for perl -V.  i don't see Perl's malloc.c
   ever release its memory pool.  when usemymalloc=y, free() only puts memory
   back into Perl's pool for use by other malloc()'s.  i don't see a function
   to destroy this pool when perl cleans itself up.  willing to bet if you
   rebuild Perl with: Configure -des -Uusemymalloc ...
   and then rebuild mod_perl, the leaks will go away.