Re: Errors when trying to use AuthAny.pm

2001-07-13 Thread Ken Y. Clark

On Wed, 11 Jul 2001, Justin Rains wrote:

 Date: Wed, 11 Jul 2001 07:04:43 -0700 (PDT)
 From: Justin Rains [EMAIL PROTECTED]
 Reply-To: [EMAIL PROTECTED]
 To: [EMAIL PROTECTED]
 Subject: Errors when trying to use AuthAny.pm

 Hi all. I am relatively new to mod_perl so try to bear with me.
 I am trying to use the AuthAny.pm module to provide some basic
 authentication. First off.. Do I put it in the same directory as
 Registry.pm? That is where I have it now. In my httpd.conf file
 I put the following in:

 Location /tools
 AuthName Test
 AuthType Basic
 PerlAuthenHandler AuthAny
 require valid-user
 /Location
 /VirtualHost

 I am running on a cobalt raq 3. Here is what I have in AuthAny.pm:

 package Apache::AuthAny;
 # file: Apache/AuthAny.pm


 use strict;
 use Apache::Constants qw(:common);


 sub handler {
 my $r = shift;

 my($res, $sent_pw) = $r-get_basic_auth_pw;
 return $res if $res != OK;


 my $user = $r-connection-user;
 unless($user and $sent_pw) {
 $r-note_basic_auth_failure;
 $r-log_reason(Both a username and password must be
 provided, $r-filename);
 return AUTH_REQUIRED;
 }


 return OK;
 }


 1;
 __END__

 The error log message is:
 [Wed Jul 11 09:04:59 2001] [error] (2)No such file or directory:
 access to /tools/ failed for nr2-216-196-142-76.fuse.net, reason:
 User not known to the underlying authentication module

 Am I missing something here? I am using the standard apache that
 came with the raq.

 Thanks for any help!
 Justin

 ==
 Justin Rains
 WSI.com Consulting
 http://www.wsicnslt.com/

Justin!

Wassup?  Welcome to mod_perl!  It's good to see your name on the list.
Since no one seems to have answered your question, I'll give it a
shot.  The only thing I can come up with right now is that you might
have mistyped the Location directive.  You have:

PerlAuthenHandler AuthAny

And the Eagle book (page 283) has:

PerlAuthenHandler Apache::AuthAny

Other than that, I can't really see a problem.  I pasted your code
into my own module (not in the Apache namespace, however), and it all
worked without a problem.

FWIW, I tend to carve out my own namespaces and place my Apache Perl
modules into a library path that gets a use() in a startup file.  To
be more explicit, I'll put my stuff into a directory like
/usr/local/apache/lib/perl.  Then in my httpd.conf, I'll add a line
line like PerlRequire conf/perlstartup.pl (where conf is relative
to the server root, or just whereever you want to put it).  My Perl
startup file then uses all the modules I've written, like so:

#!/usr/bin/perl
# file: perlstartup.pl

use lib '/usr/local/apache/lib/perl';

use Foo::Bar;
use Foo::Baz;
use Foo::AuthAny;

1;

HTH!

ky




Re: [aliasing] Using mod_perl handlers for max speed?

2001-07-13 Thread Ken Williams

Heh - you're on the wrong track.  The whole quote below is part of a
double-quoted string, and each backslash is just to put a literal $ into
the code.  It will be eval'ed later.


[EMAIL PROTECTED] (raptor) wrote:
!!! Is it possible to have  reference on the left side of the equation !!!
I've tried this to alias HASH :) but didn't succeeded...
sub {
 my \$hash = shift; # $_[0] is  \%myhash
};

Yes I know that there is aliasing : my *hash = \%{$hashref}..
And I see that here u use  : \$r-blah
Never mind it is cute construct anyway. Do U have any benefit in speed
using it in this way ?!

PS. didn't u think that there must finaly alias keyword in perl
=
iVAN
[EMAIL PROTECTED]
=


 Files ~ (hello\.bench)
 Perl
# ModPerl Handler
  package Apache::bench;
  sub handler {
my(\$r) = shift;
\$r-content_type('text/html');
\$r-send_http_header();
\$r-print('Hello ');
\$r-print('World');
200;
  }
1;
 /Perl
 SetHandler perl-script
 PerlHandler Apache::bench
 /Files




  ------
  Ken Williams Last Bastion of Euclidity
  [EMAIL PROTECTED]The Math Forum



Re: can't start apache-1.3.20 with mod_perl and Mason

2001-07-13 Thread Louis-David Mitterrand

* On Wed, Jul 11, 2001 at 08:09:20AM -0700, Doug MacEachern wrote:
 On Wed, 11 Jul 2001, Louis-David Mitterrand wrote:
  
  Will I have to build a debugging-enabled libperl to get relevant
  information? Or is this enough to understand the problem?
 
 libperld would help, all i can tell is that something in %SIG is being
 caught, which normally shouldn't happen at startup.  are you assigning
 anything to %SIG ?
 
 you could also try this to get the perl filename:line where the segv
 happens:
 (gdb) source mod_perl-x.xx/.gdbinit
 (gdb) curinfo

Thanks again Doug for taking the time to help. Here is the output from
curinfo:

Program received signal SIGSEGV, Segmentation fault.
0x402b14b6 in Perl_sighandler () from /usr/lib/libperl.so.5.6
(gdb) source .gdbinit 
(gdb) curinfo
Attempt to extract a component of a value that is not a structure pointer.
(gdb) 

Does that help a little?


-- 
ISMENE: Non, Madame. les Dieux ne vous sont plus contraires,
Et Thésée a rejoint les mânes de vos frères.
  (Phèdre, J-B Racine, acte 2, scène 1)



Re: Can't load mod_perl in Solaris 8

2001-07-13 Thread Doug MacEachern

On Fri, 13 Jul 2001, Jie Gao wrote:
 
 This is different from what I have been hearing for the past few years:
 
 Solaris' malloc is better than perl's.

you're right, i just found this in the 5.6.1 announcement:

:On some systems (IRIX and Solaris among them) the system malloc is
:demonstrably better. While the defaults haven't been changed in order to
:retain binary compatibility with earlier releases, you may be better off
:building perl with Configure -Uusemymalloc ... as discussed in the
:INSTALL file.

that's good news, to bad it isn't the default, sure would save alot of
trouble.  i will change the Makefile.PL verbage.





Re: [ASP] FileUploadMax -- FileMaxUpload

2001-07-13 Thread Joshua Chamas

raptor wrote:
 
 hi,
 FileUploadMax wrongly stated in ASP docs, U should use :
 
 PerlSetVar FileMaxUpload  xxx
 
 instead.
 One more thing, does someone knows a way to capture the error, if the user
 tries to upload bigger file than accepted.
 So I can inform him.
 Is it possible to set CGI::POST_MAX on a per request i.e. dynamicly as I
 read in the dosc ASP.pm set this value every time before it calls CGI to
 handle the request...
 

I posted my answer to this to the [EMAIL PROTECTED] list.

-- Josh



tying STDIN/STDOUT

2001-07-13 Thread Jonathan Bartlett

I know this has been discussed a little before, but the Test.pm
PerlHandler I've attached does not work as expected.  The reason being
that dup-ing a read filehandle to STDIN overwrote STDOUT instead (well,
actually both, since apache apparently uses the same handle for 
input and output).  Anyway, this actually worked in RH 6.x, but stopped
working when I installed 7.1.  My guess is that for whatever versions are
in 6.x STDIN and STDOUT were only tied for registry scripts, but in 7.x
they got tied for regular content handlers as well.

Currently, I'm working around it by putting

untie(*STDIN);
untie(*STDOUT);

at the beginning of my handler.  Is that the best way to go?  I tried
sticking it in the initialization part of the module, but that didn't
work.  Why is that?

Anyway, if anyone has additional questions about what I'm doing here, let
me know.  The example is quite contrived, but it does affect a real-world
situation.

The actual problem line is open(STDIN, RD), which dups RD onto
filehandle 1 (STDOUT) instead of 0 (STDIN).  Later, when '/bin/ls' is
exec-d, when it tries to write to STDOUT, it gets EBADF because there's a
read file handle there.

Anyway, the script can be installed with

PerlRequire Test.pm
location /mytest/
SetHandler perl-script
PerlHandler WRI::Test::handler
/location

Anyway, let me know if there is a better way of handling the situation.

Jon

-- 
PGP information is available at http://members.wri.com/johnnyb/about/


package WRI::Test;

sub handler
{
my $r = shift;
my $testfh;
my $line;

$r-send_http_header('text/html');

$r-print(EOF);
html
head
title
My Test Page
/title
/head
body
pre
EOF

$testfh = runtest();

while($line = $testfh)
{
$r-print($line);
}

$r-print(EOF);
/pre
/body
/html
EOF

return OK;
}

sub runtest
{
pipe(RD, WR);

unless(open(MYHANDLE, -|))
{
close(WR);
open(STDIN, RD);

exec('/bin/ls');
}

close(RD);

close(WR);

return \*MYHANDLE;
}

1;



Re: Apache::Upload filehandle

2001-07-13 Thread Jay Buffington

Okay, that didn't fix the problem, but I have figured it out.  

Apache::Upload returns the filehandle as being blessed into Apache::Upload.  Whenever 
I send the filehandle to Image::Magick it thinks that it is a url of type Apache: 
(kind of like file: or http:).  If I bless the filehandle into a class that does not 
have a colon in it, it works.  

Here is my work around:

8... *snip*

my $fh = $r-upload-fh;
bless $fh, nonexistantclass;
my $error = $image-Read(file=$fh);

8... *snip*


I guess that this is a bug in Apache::Upload and Image::Magick.  Apache::Upload should 
not return the filehandle as blessed (I'm confused why it does this in the first 
place) and Image::Magick should do a better job checking to see if it has been sent a 
filehandle.  

Can this please be fixed in the next release of libapreq?

Thanks,
Jay Buffington 


On Thu, Jul 12, 2001 at 10:03:24AM -0400, darren chamberlain wrote:
 Jay Buffington [EMAIL PROTECTED] said something to this effect on 07/11/2001:
  I'm trying to use image magick to manipulate images that are
  uploaded via http.  To handle the uploaded images I'm using
  libapreq's Apache::Upload.
  
  I wrote the below simple example script to help explain my problem.
  
  When an image is uploaded to it I get this error in the apache
  error log: ImageMagick error: Warning 320: no delegate for this
  image format (:Upload=GLOB(0x873bcec)) [No such file or
  directory]
  
  I'm confused why this happens.  Could someone please explain
  this behaviour to me? 
 
 This looks like $r-upload-fh is being stringified, probably
 because of the context.  What happens when you assign the glob
 returned by $r-upload-fh to a lexical scalar, and then pass
 that into $image-Read()?  I hit this a few days ago, when
 passing a glob reference into a subroutine (not
 mod_perl-related), and this is the only thing that worked.
 
  
  package UploadFile;
  
  use Apache;
  use Apache::Request;
  use Apache::Constants qw(:common);
  use CGI qw(-compile :standard);
  use Image::Magick;
  
  sub handler {
  my $r = new Apache::Request(shift);
  
  if ($r-param('action') eq upload) {
  my $image = new Image::Magick;
 
 Add these changes: 
 
   my $fh = $r-upload-fh;
   my $error = $image-Read(file = $fh);
 
  $r-log_error(ImageMagick error: $error) if $error;
  $r-print(image geometry:  . join  x ,
$image-Get('width', 'height'));
  undef $image;
  }
  
  $r-print(start_html() . start_multipart_form() . Upload an image:  .
filefield(-name=uploadedfile) . submit(-name=action,
-value=upload) . end_form() . end_html());
  
  return OK;
  }
  
  1;
 
 (darren)
 
 -- 
 Death to all fanatics!



Re: tying STDIN/STDOUT

2001-07-13 Thread brian moseley


hmm... i think i have a similar question.

i want to prevent people from writing data directly to the
apache connection and instead force them to use an object i
provide for generating output. they can call $obj-print()
directly, but i also want them to be able to use 'print
foo\n' as is standard in handlers and registry scripts.

seems like i want to untie STDIN and STDOUT as per below..
but then how do i attach those handles to my object's print
method? is tieing the correct approach, or is there some
other kind of filehandle magic i can use?

On Fri, 13 Jul 2001, Jonathan Bartlett wrote:

 I know this has been discussed a little before, but the Test.pm
 PerlHandler I've attached does not work as expected.  The reason being
 that dup-ing a read filehandle to STDIN overwrote STDOUT instead (well,
 actually both, since apache apparently uses the same handle for
 input and output).  Anyway, this actually worked in RH 6.x, but stopped
 working when I installed 7.1.  My guess is that for whatever versions are
 in 6.x STDIN and STDOUT were only tied for registry scripts, but in 7.x
 they got tied for regular content handlers as well.

 Currently, I'm working around it by putting

 untie(*STDIN);
 untie(*STDOUT);

 at the beginning of my handler.  Is that the best way to go?  I tried
 sticking it in the initialization part of the module, but that didn't
 work.  Why is that?

 Anyway, if anyone has additional questions about what I'm doing here, let
 me know.  The example is quite contrived, but it does affect a real-world
 situation.

 The actual problem line is open(STDIN, RD), which dups RD onto
 filehandle 1 (STDOUT) instead of 0 (STDIN).  Later, when '/bin/ls' is
 exec-d, when it tries to write to STDOUT, it gets EBADF because there's a
 read file handle there.

 Anyway, the script can be installed with

 PerlRequire Test.pm
 location /mytest/
 SetHandler perl-script
 PerlHandler WRI::Test::handler
 /location

 Anyway, let me know if there is a better way of handling the situation.

 Jon






Re: detecting ssl

2001-07-13 Thread brian moseley


is checking for $ENV{HTTPS} not sufficient?

On Tue, 10 Jul 2001, João Pedro Gonçalves wrote:

 This approach should be ok:

 my $s = $r-lookup_uri($r-uri);
 my $ssl = $s-subprocess_env('HTTPS');

 I looked at this a while back and this is usually set internally
 in apache by the ssl implementation.

 João Pedro

 brian moseley wrote:
 
  warning: these may be silly questions. but i've looked
  through the guide and not found the answers, so hopefully
  they're not that silly.
 
  how can i test in a content handler if the request was
  received over an ssl connection? do i have to look for an
  environment variable? is there a test that works with all
  the various ssl modules? is there a standard ssl
  interface? if so, where is it documented?
 
  thanks!





Re: tying STDIN/STDOUT

2001-07-13 Thread Ken Williams

[EMAIL PROTECTED] (brian moseley) wrote:

hmm... i think i have a similar question.

i want to prevent people from writing data directly to the
apache connection and instead force them to use an object i
provide for generating output. they can call $obj-print()
directly, but i also want them to be able to use 'print
foo\n' as is standard in handlers and registry scripts.

seems like i want to untie STDIN and STDOUT as per below..
but then how do i attach those handles to my object's print
method? is tieing the correct approach, or is there some
other kind of filehandle magic i can use?

Tying is probably the way to go.  You can check out Apache::Filter for
an example of how to tie STDOUT.


  ------
  Ken Williams Last Bastion of Euclidity
  [EMAIL PROTECTED]The Math Forum



Re: [patch] a more user friendly server failure report

2001-07-13 Thread Doug MacEachern

On Sat, 30 Jun 2001, Stas Bekman wrote:

 
 As we see at the list, sometimes users have a problem to start the server
 in the 'make test' stage and when they see:
 
   server failed to start! (please examine t/logs/error_log)
 
 many times this log file doesn't exist. So let's check whether the file
 exists before we suggest to look at this file. In case it doesn't exist we
 should point to the debug resource. Since currently we don't have any
 final SUPPORT doc, I wrote some blurb. later on we can replace with a
 pointer to a doc that explains what to do.

looks good.  don't forget:
if () {
}
else {
}
not
if () {
} else {
}

this would be fine too:
my log_file_info = -e $log ? 
please examine $log :
$log wasn't created, start the server in debug mode;




custom config directives

2001-07-13 Thread brian moseley


is there any good thorough documentation on building custom
config directives other than what's in the eagle book? i
left mine back in au and i don't really want to buy another
one :)




[ANNOUNCE] Hello World Benchmarks, 10 Minute Run

2001-07-13 Thread Joshua Chamas

Hey,

It seemed that running the hello world benchmarks last time for only 
60 seconds had problems with reproducibility, especially with mod_caucho.

So here's some numbers for ~ 10 minute run.  Its actually something 
like 20 benchmarks run for 30 seconds a piece, and the results summed
together.  The source code for these benchmarks is available at:

  http://www.chamas.com/bench/hello.tar.gz

There's a new switch, -prime, which runs a short benchmark first 
and throws away the results, to get all the environments to cache
ahead of time.  This is of limited effect on many of the mod_perl
environments, since the web server is restarted every 30 seconds.

--Josh


DISCLAIMER: If you would like to know what the benchmarks are
really doing, download the source from above, and run them 
for yourself!  Please look at the secs/Hit column too to 
understand relative diffs in speed.

GROUPING: I messed up the grouping, now its just alpha sort,
so if you want to compare say AxKit XSLT with ASP XSLT, you'll
have to do a little extra work.

STATIC HTML: seems slower than mod_perl on my dual proc RedHat 6.2
Probably faster on your single proc box if you have one.

mod_caucho/resin/java: Seems to slow down the longer it runs for, 
so these numbers are quite different than when a 30 second 
benchmark is run.

iterations: The 600 seconds test was broken up into 20 30 second
tests and the results summed.  For the next release of benchmark,
I'd like to not restart the web server every 30 seconds for 
some better steady-state numbers.  In the process I'll likely
reduce MaxRequests from 10,000 to 1,000 so that apps that have
mem leaks won't be killed by swapping during the test.

  ./bench.pl -version -prime -time=600

Test Name   Test File  Hits/sec   # of Hits  Time(sec)  
secs/Hit   Bytes/Hit  
-   -  -  -  -  
-  -  
Apache::ASP v2.19   hello.asp   379.0 222987 588.36 
0.002639   242
Apache::ASP v2.19 2000  h2000.asp   225.5 132712 588.54 
0.004435   28998  
Apache::ASP v2.19 XSLT Hellohxslt.xml   219.0 128843 588.39 
0.004567   280
Apache::Dispatch v0.09 handler  hello/worl  594.8 349800 588.08 
0.001681   197
Apache::Registry v2.01 2000 mod_per h2000.reg   341.2 200718 588.32 
0.002931   28179  
Apache::Registry v2.01 CGI Raw  hello_raw.  681.0 400470 588.10 
0.001469   52 
Apache::Registry v2.01 CGI.pm   hello.cgi   453.2 266590 588.20 
0.002206   217
Apache::SSI v2.16   hello.shtm  544.2 320087 588.15 
0.001837   200
Apache::ePerl   hello.eper  345.7 203399 588.42 
0.002893   218
AxKit v1.4 XSLT Hello   hxslt.xml   292.0 171899 588.63 
0.003424   397
HTML static hello.html  704.9 414465 588.00 
0.001419   312
HTML::Embperl v1.3.0hello.epl   467.1 274769 588.19 
0.002141   221
HTML::Embperl v1.3.0 2000   h2000.epl   111.6  65652 588.43 
0.008963   28841  
HTML::Mason v1.03   hello.mas   370.5 217967 588.33 
0.002699   198
HTML::Mason v1.03 2000  h2000.mas83.6  49176 588.20 
0.011961   28799  
HTML::Template v2.3 hello.htmp  539.2 317344 588.60 
0.001855   199
HTML::Template v2.3 2000h2000.htmp   98.2  57791 588.28 
0.010179   29152  
Template v2.04 Toolkit  hello.tt465.7 273928 588.19 
0.002147   199
Template v2.04 Toolkit 2000 h2000.tt 52.7  30995 588.37 
0.018983   28889  
mod_caucho JSP  hello.jsp   118.0  70156 594.49 
0.008474   231
mod_caucho JSP 2000 h2000.jsp75.7  44739 591.15 
0.013213   28965  
mod_cgi CGI Raw hello_raw.  154.1  90655 588.11 
0.006487   197
mod_cgi CGI.pm  hello.cgi10.7   6326 591.81 
0.093552   217
mod_include SSI hello.shtm  288.5 171036 592.83 
0.003466   199
mod_perl handlerhello.benc  822.7 483808 588.06 
0.001215   197
mod_php PHP hello.php   658.5 387271 588.13 
0.001519   226
mod_php PHP 2000h2000.php   256.0 150596 588.37 
0.003907   28866  
mod_speedycgi   hello.cgi   134.6  79428 590.32 
0.007432   217

Apache Server Header Tokens
---
(Unix)
Apache/1.3.20
AxKit/1.4
OpenSSL/0.9.6a
PHP/4.0.3pl1
Resin/1.2.1
mod_perl/1.25

[ASP] FileUploadMax -- FileMaxUpload

2001-07-13 Thread raptor

hi,
FileUploadMax wrongly stated in ASP docs, U should use :

PerlSetVar FileMaxUpload  xxx

instead.
One more thing, does someone knows a way to capture the error, if the user
tries to upload bigger file than accepted.
So I can inform him.
Is it possible to set CGI::POST_MAX on a per request i.e. dynamicly as I
read in the dosc ASP.pm set this value every time before it calls CGI to
handle the request...

Thanx alot
=
iVAN
[EMAIL PROTECTED]
=




cvs commit: modperl-2.0/xs/maps apr_functions.map

2001-07-13 Thread dougm

dougm   01/07/13 09:34:03

  Modified:t/response/TestAPR pool.pm
   xs/maps  apr_functions.map
  Log:
  apr_pool_num_bytes is now only available #ifdef APR_POOL_DEBUG
  
  Revision  ChangesPath
  1.2   +4 -4  modperl-2.0/t/response/TestAPR/pool.pm
  
  Index: pool.pm
  ===
  RCS file: /home/cvs/modperl-2.0/t/response/TestAPR/pool.pm,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- pool.pm   2001/04/12 05:38:24 1.1
  +++ pool.pm   2001/07/13 16:33:45 1.2
  @@ -16,15 +16,15 @@
   sub handler {
   my $r = shift;
   
  -plan $r, tests = 3;
  +plan $r, tests = 2;
   
   my $p = APR::Pool-new;
   
   ok $p-isa('APR::Pool');
   
  -my $num_bytes = $p-num_bytes;
  -
  -ok $num_bytes;
  +#only available with -DAPR_POOL_DEBUG
  +#my $num_bytes = $p-num_bytes;
  +#ok $num_bytes;
   
   $p-cleanup_register(\cleanup, 33);
   
  
  
  
  1.13  +1 -1  modperl-2.0/xs/maps/apr_functions.map
  
  Index: apr_functions.map
  ===
  RCS file: /home/cvs/modperl-2.0/xs/maps/apr_functions.map,v
  retrieving revision 1.12
  retrieving revision 1.13
  diff -u -r1.12 -r1.13
  --- apr_functions.map 2001/06/15 03:58:54 1.12
  +++ apr_functions.map 2001/07/13 16:33:58 1.13
  @@ -127,7 +127,7 @@
   
   MODULE=APR::Pool
   apr_pool_free_blocks_num_bytes
  - apr_pool_num_bytes | | p, recurse=0
  +-apr_pool_num_bytes | | p, recurse=0 #only available with -DAPR_POOL_DEBUG
apr_pool_cleanup_for_exec
apr_pool_clear
apr_pool_destroy
  
  
  



cvs commit: modperl-2.0/xs/tables/current/Apache FunctionTable.pm StructureTable.pm

2001-07-13 Thread dougm

dougm   01/07/13 09:36:12

  Modified:xs/tables/current/Apache FunctionTable.pm StructureTable.pm
  Log:
  sync
  
  Revision  ChangesPath
  1.12  +245 -40   modperl-2.0/xs/tables/current/Apache/FunctionTable.pm
  
  Index: FunctionTable.pm
  ===
  RCS file: /home/cvs/modperl-2.0/xs/tables/current/Apache/FunctionTable.pm,v
  retrieving revision 1.11
  retrieving revision 1.12
  diff -u -r1.11 -r1.12
  --- FunctionTable.pm  2001/06/29 19:10:28 1.11
  +++ FunctionTable.pm  2001/07/13 16:35:58 1.12
  @@ -2,7 +2,7 @@
   
   # !!
   # ! WARNING: generated by Apache::ParseSource/0.02
  -# !  Fri Jun 29 11:44:12 2001
  +# !  Fri Jul 13 09:16:00 2001
   # !  do NOT edit, any changes will be lost !
   # !!
   
  @@ -1005,6 +1005,16 @@
   ]
 },
 {
  +'return_type' = 'process_score *',
  +'name' = 'ap_get_parent_scoreboard',
  +'args' = [
  +  {
  +'type' = 'int',
  +'name' = 'x'
  +  }
  +]
  +  },
  +  {
   'return_type' = 'const char *',
   'name' = 'ap_get_remote_host',
   'args' = [
  @@ -1067,6 +1077,20 @@
   'args' = []
 },
 {
  +'return_type' = 'worker_score *',
  +'name' = 'ap_get_servers_scoreboard',
  +'args' = [
  +  {
  +'type' = 'int',
  +'name' = 'x'
  +  },
  +  {
  +'type' = 'int',
  +'name' = 'y'
  +  }
  +]
  +  },
  +  {
   'return_type' = 'const char *',
   'name' = 'ap_get_status_line',
   'args' = [
  @@ -4496,7 +4520,7 @@
   'name' = 'apr_array_append',
   'args' = [
 {
  -'type' = 'struct apr_pool_t *',
  +'type' = 'apr_pool_t *',
   'name' = 'p'
 },
 {
  @@ -4528,7 +4552,7 @@
   'name' = 'apr_array_copy',
   'args' = [
 {
  -'type' = 'struct apr_pool_t *',
  +'type' = 'apr_pool_t *',
   'name' = 'p'
 },
 {
  @@ -4542,7 +4566,7 @@
   'name' = 'apr_array_copy_hdr',
   'args' = [
 {
  -'type' = 'struct apr_pool_t *',
  +'type' = 'apr_pool_t *',
   'name' = 'p'
 },
 {
  @@ -4556,7 +4580,7 @@
   'name' = 'apr_array_make',
   'args' = [
 {
  -'type' = 'struct apr_pool_t *',
  +'type' = 'apr_pool_t *',
   'name' = 'p'
 },
 {
  @@ -4574,7 +4598,7 @@
   'name' = 'apr_array_pstrcat',
   'args' = [
 {
  -'type' = 'struct apr_pool_t *',
  +'type' = 'apr_pool_t *',
   'name' = 'p'
 },
 {
  @@ -6946,6 +6970,20 @@
 },
 {
   'return_type' = 'apr_status_t',
  +'name' = 'apr_implode_gmt',
  +'args' = [
  +  {
  +'type' = 'apr_time_t *',
  +'name' = 'result'
  +  },
  +  {
  +'type' = 'apr_exploded_time_t *',
  +'name' = 'input'
  +  }
  +]
  +  },
  +  {
  +'return_type' = 'apr_status_t',
   'name' = 'apr_implode_time',
   'args' = [
 {
  @@ -8182,11 +8220,6 @@
   ]
 },
 {
  -'return_type' = 'apr_size_t',
  -'name' = 'apr_pool_free_blocks_num_bytes',
  -'args' = []
  -  },
  -  {
   'return_type' = 'apr_abortfunc_t',
   'name' = 'apr_pool_get_abort',
   'args' = [
  @@ -8239,20 +8272,6 @@
   ]
 },
 {
  -'return_type' = 'apr_size_t',
  -'name' = 'apr_pool_num_bytes',
  -'args' = [
  -  {
  -'type' = 'apr_pool_t *',
  -'name' = 'p'
  -  },
  -  {
  -'type' = 'int',
  -'name' = 'recurse'
  -  }
  -]
  -  },
  -  {
   'return_type' = 'void',
   'name' = 'apr_pool_set_abort',
   'args' = [
  @@ -9372,7 +9391,7 @@
   'name' = 'type'
 },
 {
  -'type' = 'void *',
  +'type' = 'const void *',
   'name' = 'data'
 },
 {
  @@ -9394,7 +9413,7 @@
   'name' = 'type'
 },
 {
  -'type' = 'void *',
  +'type' = 'const void *',
   'name' = 'data'
 },
 {
  @@ -9430,7 +9449,7 @@
   'name' = 'type'
 },
 {
  -'type' = 'void *',
  +'type' = 'const void *',
   'name' = 'data'
 },
 {
  @@ -9478,8 +9497,8 @@
   ]
 },
 {
  -'return_type' = 'apr_sms_t *',
  -'name' = 'apr_sms_get_parent',
  +'return_type' = 'apr_abortfunc_t',
  +'name' = 'apr_sms_get_abort',
   'args' = [
 {
   'type' = 'apr_sms_t *',
  @@ -9489,7 +9508,7 @@
 },
 {
   'return_type' = 'const char *',
  -'name' = 'apr_sms_identity',
  +'name' = 'apr_sms_get_identity',
   'args' = [
 {
   'type' = 'apr_sms_t *',
  @@ -9498,16 +9517,12 @@
   ]
 },
 {

cvs commit: modperl-2.0/src/modules/perl mod_perl.c

2001-07-13 Thread dougm

dougm   01/07/13 09:49:54

  Modified:src/modules/perl mod_perl.c
  Log:
  outline for future calls to PERL_SYS_{INIT,TERM} and PTHREAD_ATFORK
  
  Revision  ChangesPath
  1.59  +28 -0 modperl-2.0/src/modules/perl/mod_perl.c
  
  Index: mod_perl.c
  ===
  RCS file: /home/cvs/modperl-2.0/src/modules/perl/mod_perl.c,v
  retrieving revision 1.58
  retrieving revision 1.59
  diff -u -r1.58 -r1.59
  --- mod_perl.c2001/05/14 03:34:34 1.58
  +++ mod_perl.c2001/07/13 16:49:35 1.59
  @@ -219,9 +219,37 @@
   modperl_tls_create_request_rec(pconf);
   }
   
  +static apr_status_t modperl_sys_init(void)
  +{
  +#if 0 /*XXX*/
  +PERL_SYS_INIT(0, NULL);
  +
  +#ifdef PTHREAD_ATFORK
  +if (!ap_exists_config_define(PERL_PTHREAD_ATFORK_DONE)) {
  +PTHREAD_ATFORK(Perl_atfork_lock,
  +   Perl_atfork_unlock,
  +   Perl_atfork_unlock);
  +*(char **)apr_array_push(ap_server_config_defines) =
  +PERL_PTHREAD_ATFORK_DONE;
  +}
  +#endif
  +#endif
  +return APR_SUCCESS;
  +}
  +
  +static apr_status_t modperl_sys_term(void *data)
  +{
  +#if 0 /*XXX*/
  +PERL_SYS_TERM();
  +#endif
  +return APR_SUCCESS;
  +}
  +
   void modperl_hook_init(apr_pool_t *pconf, apr_pool_t *plog, 
  apr_pool_t *ptemp, server_rec *s)
   {
  +modperl_sys_init();
  +apr_pool_cleanup_register(pconf, NULL, modperl_sys_term, NULL);
   modperl_init_globals(s, pconf);
   modperl_init(s, pconf);
   }