Using PerlTypeHandler and PerlHandler for the same Location

2001-08-08 Thread Jay Buffington

Hi,

In my httpd.conf file I have: 
Location /foo/
SetHandler perl-script
PerlTypeHandler foo
PerlHandler bar
/Location

and then in the foo and bar files I have: 

--file foo.pm-
package foo;

sub handler {
my $r = shift;

$r-log_error(I'm in foo.);
}
1;


--file bar.pm-
package bar; 

sub handler {
my $r = shift;

$r-log_error(I'm in bar.);
}
1;


I would expect this experiment would print out I'm in foo. followed by I'm in bar. 
to my apache error log.  It only prints I'm in foo.  If I remove the PerlTypeHandler 
line from the httpd.conf I get only I'm in bar.  If I leave the TypeHandler but omit 
the PerlHandler, and add $r-push_handlers(PerlHandler=\bar::handler); to foo.pm I 
still only get I'm in foo.

I'm using Perl 5.6 and mod_perl 1.25 with apache 1.3.19 

Why does this not work as I expected?

Thanks.
Jay Buffington



perl-status problems

2001-08-08 Thread Pawe Piecuch



With this config file, when I access 
/perl-status I got message in log file:

[Wed Aug 8 14:09:00 2001] [error] 
Undefined subroutine Apache::Status::handler called.
What does it mean?
Pawel


VirtualHost 
195.216.96.8:80 ServerName www.energetyka.net 
ServerAdmin [EMAIL PROTECTED] 
DocumentRoot 
/home/almainet/www-enet/html Alias 
/cgi-bin/ 
/home/almainet/www-enet/cgi-bin/ 
Alias /cgi-admin/ 
/home/almainet/www-enet/cgi-admin/ 
ErrorLog 
/var/log/httpd/enet-error.log 
CustomLog /var/log/httpd/enet-access.log combined

 
PerlModule B::TerseSize PerlModule 
Apache:Status

 
Location 
/cgi-admin 
SetHandler 
perl-script 
PerlHandler 
Apache::Registry 
Options 
ExecCGI 
Allow from 
all 
PerlSendHeader On 
/Location

 
Location 
/cgi-bin 
SetHandler 
perl-script 
PerlHandler 
Apache::Registry 
Options 
ExecCGI 
Allow from 
all 
PerlSendHeader On 
/Location

 
Location 
/server-status 
SetHandler 
server-status 
Order 
deny,allow 
Deny from 
all 
Allow from .almainternet.pl 
.alma.poznan.pl 
/Location

 
Location 
/server-info 
SetHandler 
server-info 
Order 
deny,allow 
Deny from 
all 
Allow from .almainternet.pl 
.alma.poznan.pl 
/Location

 
Location 
/perl-status 
SetHandler 
perl-script 
PerlHandler 
Apache::Status 
PerlSetVar StatusOptionsAll 
On 
PerlSetVar StatusTerse 
On 
PerlSetVar StatusTerseSize 
On 
PerlSetVar StatusTerseSizeMainSummary 
On 
order 
deny,allow 
Deny from 
all 
Allow from .almainternet.pl 
.alma.poznan.pl 
/Location/VirtualHost




Pawe³ 
Piecuch___ Zawarte w niniejszej 
wiadomo¶ci o¶wiadczenia stanowi±_ o¶wiadczenia woli lub wiedzy sk³adane w 
imieniu Alma Internet S.A__ Alma Internet SA_ tel +48-61-8432630, 
fax +48-61-8432629_ www: http://www.almainternet.pl e-mail: [EMAIL PROTECTED]_


RE: perl-status problems

2001-08-08 Thread Robert Ahrendt



It 
sounds like you either don't have mod_perl(Apache::*) installed correctly or you 
don't have your Apache libs in your @INC. Try: (perldoc Apache::Status) 
from the command line and see if it finds the module. if it doesn't, make sure 
you are pointing to the right libs in your startup.pl. i.e. use lib 
qw(/dir/where/ApachePM's); good luck

  -Original Message-From: Pawel Piecuch 
  [mailto:[EMAIL PROTECTED]]Sent: Wednesday, August 08, 2001 8:36 
  AMTo: [EMAIL PROTECTED]Subject: perl-status 
  problems
  With this config file, when I access 
  /perl-status I got message in log file:
  
  [Wed Aug 8 14:09:00 2001] [error] 
  Undefined subroutine Apache::Status::handler called.
  What does it mean?
  Pawel
  
  
  VirtualHost 
  195.216.96.8:80 ServerName 
  www.energetyka.net 
  ServerAdmin [EMAIL PROTECTED] 
  DocumentRoot 
  /home/almainet/www-enet/html 
  Alias /cgi-bin/ 
  /home/almainet/www-enet/cgi-bin/ 
  Alias /cgi-admin/ 
  /home/almainet/www-enet/cgi-admin/ 
  ErrorLog 
  /var/log/httpd/enet-error.log 
  CustomLog /var/log/httpd/enet-access.log combined
  
   
  PerlModule B::TerseSize 
  PerlModule Apache:Status
  
   
  Location 
  /cgi-admin 
  SetHandler 
  perl-script 
  PerlHandler 
  Apache::Registry 
  Options 
  ExecCGI 
  Allow from 
  all 
  PerlSendHeader On 
  /Location
  
   
  Location 
  /cgi-bin 
  SetHandler 
  perl-script 
  PerlHandler 
  Apache::Registry 
  Options 
  ExecCGI 
  Allow from 
  all 
  PerlSendHeader On 
  /Location
  
   
  Location 
  /server-status 
  SetHandler 
  server-status 
  Order 
  deny,allow 
  Deny from 
  all 
  Allow from .almainternet.pl 
  .alma.poznan.pl 
  /Location
  
   
  Location 
  /server-info 
  SetHandler 
  server-info 
  Order 
  deny,allow 
  Deny from 
  all 
  Allow from .almainternet.pl 
  .alma.poznan.pl 
  /Location
  
   
  Location 
  /perl-status 
  SetHandler 
  perl-script 
  PerlHandler 
  Apache::Status 
  PerlSetVar StatusOptionsAll 
  On 
  PerlSetVar StatusTerse 
  On 
  PerlSetVar StatusTerseSize 
  On 
  PerlSetVar StatusTerseSizeMainSummary 
  On 
  order 
  deny,allow 
  Deny from 
  all 
  Allow from .almainternet.pl 
  .alma.poznan.pl 
  /Location/VirtualHost
  
  
  
  
  Pawe³ 
  Piecuch___ Zawarte w niniejszej 
  wiadomo¶ci o¶wiadczenia stanowi±_ o¶wiadczenia woli lub wiedzy sk³adane w 
  imieniu Alma Internet S.A__ Alma Internet SA_ tel +48-61-8432630, 
  fax +48-61-8432629_ www: http://www.almainternet.pl e-mail: [EMAIL PROTECTED]_


Segmentation faults, some strace logs

2001-08-08 Thread Andrei A. Voropaev

Here's some output from strace on Linux
Apache 1.13.19  with mod_perl 1.24 and perl 5.6.0
=
04:48:26 stat64(/proj/Web/EMIS/Mason/live/redirect, {st_mode=S_IFREG|0775, 
st_size=243, ...}) = 0
04:48:26 stat64(/proj/Web/EMIS/Mason/obj/live/redirect, {st_mode=S_IFREG|0644, 
st_size=902, ...})
= 0
04:48:26 rt_sigprocmask(SIG_BLOCK, NULL, [], 8) = 0
04:48:26 rt_sigprocmask(SIG_BLOCK, NULL, [], 8) = 0
04:48:26 rt_sigprocmask(SIG_BLOCK, NULL, [], 8) = 0
04:48:26 --- SIGSEGV (Segmentation fault) ---
04:48:26 chdir(/etc/httpd/core)   = 0
04:48:26 rt_sigaction(SIGSEGV, {SIG_DFL}, {SIG_DFL}, 8) = 0
04:48:26 getpid()   = 5320
04:48:26 kill(5320, SIGSEGV)= 0
04:48:26 sigreturn()= ? (mask now [])
04:48:26 --- SIGSEGV (Segmentation fault) ---
==

Here's redirect Mason component.

%init
#$r-status(200);
$r-header_out(Location=$url);

# Do this so Apache doesn't try to re-read post data
$r-method('GET');
$r-headers_in-unset('Content-length');

# Exit with 302 status
$m-abort(302);
/%init
%args
$url
/%args
===

Looks like the problem is caused by 'abort'. I did not do much digging yet but looks 
like
abort calls 'croak'. Unrelational to segv we expirienced strange 
Bizzare copy of ARRAY in aassign in Carp/Heavy.pm line 79 messages at random instead 
of display
of nice stack trace.

Could it be some perl5.6.0 bug?

Andrei






Re: module to hit back at default.ida atack ?

2001-08-08 Thread Reuven M. Lerner

 Angel R Rivera writes:

  Angel how about a way to tell it not to report an ip??  i just
  Angel reported on myself. :)

That feature is in the latest version (1.07), thanks to David Young.

  DeWitt So *that's* why Reuven has CodeRed.pm CC him on the warning
  DeWitt emails.

  DeWitt And I thought he was just nuts.  ;)

I am nuts -- but in this particular case, I was just naive and foolish
to think that people would change the $cc_address variable at the top
of the program.  So I've been flooded by a ridiculous number of e-mail
messages from people who didn't change that variable.

Version 1.08, which I hope to put out tonight or tomorrow, will
improve the configuration a bit, and will also improve on the
documentation.

Reuven



Apache::GzipChain Apache::OutputChain

2001-08-08 Thread Riardas epas

Hi!

What does this error messsage mean?
untie attempted while 1 inner references still exist at 
/usr/local/lib/perl5/site_perl/5.6.1/Apache/OutputChain.pm line 28.
Mozilla shows empty screen.  I have in httpd.conf:
Location /scripts
SetHandler perl-script
PerlHandler Apache::OutputChain Apache::GzipChain My::Site
/Location

Summary of my perl5 (revision 5.0 version 6 subversion 1) configuration:
  Platform:
osname=freebsd, osvers=4.3-stable, archname=i386-freebsd
uname='freebsd richard.eu.org 4.3-stable freebsd 4.3-stable #0: sat apr 28 
12:13:21 eet 2001 [EMAIL PROTECTED]:usrsrcsyscompilemykernel i386 '
config_args=''
hint=recommended, useposix=true, d_sigaction=define
usethreads=undef use5005threads=undef useithreads=undef usemultiplicity=undef
useperlio=undef d_sfio=undef uselargefiles=define usesocks=undef
use64bitint=undef use64bitall=undef uselongdouble=undef
  Compiler:
cc='cc', ccflags ='-fno-strict-aliasing -I/usr/local/include',
optimize='-pipe -O2 -march=i686',
cppflags='-fno-strict-aliasing -I/usr/local/include'
ccversion='', gccversion='2.95.3 [FreeBSD] 20010315 (release)', 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, usemymalloc=n, prototype=define
  Linker and Libraries:
ld='cc', ldflags ='-Wl,-E  -L/usr/local/lib'
libpth=/usr/lib /usr/local/lib
libs=-lgdbm -lm -lc -lcrypt -liconv -lutil
perllibs=-lm -lc -lcrypt -liconv -lutil
libc=, so=so, useshrplib=true, libperl=libperl.so
  Dynamic Linking:
dlsrc=dl_dlopen.xs, dlext=so, d_dlsymun=undef, ccdlflags='  
-Wl,-R/usr/lib/perl5/5.6.1/i386-freebsd/CORE'
cccdlflags='-DPIC -fpic', lddlflags='-shared  -L/usr/local/lib'


Characteristics of this binary (from libperl): 
  Compile-time options: USE_LARGE_FILES
  Built under freebsd
  Compiled at May  4 2001 20:25:10
  @INC:
/usr/lib/perl5/5.6.1/i386-freebsd
/usr/lib/perl5/5.6.1
/usr/local/lib/perl5/site_perl/5.6.1/i386-freebsd
/usr/local/lib/perl5/site_perl/5.6.1
/usr/local/lib/perl5/site_perl/5.005/i386-freebsd
/usr/local/lib/perl5/site_perl/5.005
/usr/local/lib/perl5/site_perl
.

-- 
  ☻ Ričardas Čepas ☺
~~
~



RE: Apache::GzipChain Apache::OutputChain

2001-08-08 Thread Geoffrey Young



 -Original Message-
 From: Ricardas Cepas [mailto:[EMAIL PROTECTED]]
 Sent: Wednesday, August 08, 2001 2:08 PM
 To: [EMAIL PROTECTED]
 Subject: Apache::GzipChain  Apache::OutputChain
 
 
 Hi!
 
 What does this error messsage mean?
 untie attempted while 1 inner references still exist at 
 /usr/local/lib/perl5/site_perl/5.6.1/Apache/OutputChain.pm line 28.

it means what it says :)  if OutputChain works like Apache::Filter at all,
then it needs the reference to maintain an accurate handler count, so you
can safely igore the warning.  I haven't looked at the code, though.  

 Mozilla shows empty screen.  I have in httpd.conf:
 Location /scripts
 SetHandler perl-script
 PerlHandler Apache::OutputChain Apache::GzipChain My::Site
 /Location

you would be better off moving to Apache::Filter and Apache::Compress, both
of which are well developed and maintained... 

I think the general opinion is that OutputChain and GzipChain are becoming
more deprecated by the day...

--Geoff



Help with cookies...

2001-08-08 Thread Rasoul Hajikhani

Can some one tell me why I can not set a cookie...
I have a module that is supposed to set a cookie called Cookie_Check:

package MIS_APPS::RHS::Control::Cookie_Check;

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

use Apache::Cookie ();

use strict;

sub handler
{
my $r   = shift;

$res= Apache::Cookie-new( $r,
 -name  
='randh_webuname',
 -value  =
$webuname,
 -domain =
'.rhythm.com',
 -expires=
'+24H',
 -path   =
'/'
 )-bake;
return OK;
}
1;

And after my second handler should kick in and do some other magic. In
my httpd.conf I have:

Location /scan
SetHandler perl-script
PerlHandler MIS_APPS::RHS::Control::Cookie_Check
MIS_APPS::RHS::Control::Scan

AuthName RHS
AuthType Basic
AuthUserFile /etc/passwd
require valid-user
/Location

But I never get to set the cookie... Can someone tell me what I am doing
wrong?
Thanks in advance
-r



Help with cookies

2001-08-08 Thread Rasoul Hajikhani

Can some one tell me why I can not set a cookie...
I have a module that is supposed to set a cookie called Cookie_Check:

package MIS_APPS::RHS::Control::Cookie_Check;

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

use Apache::Cookie ();

use strict;

sub handler
{
my $r   = shift;

$res= Apache::Cookie-new( $r,
 -name  
='randh_webuname',
 -value  =
$webuname,
 -domain =
'.rhythm.com',
 -expires=
'+24H',
 -path   =
'/'
 )-bake;
return OK;
}
1;

And after my second handler should kick in and do some other magic. In
my httpd.conf I have:

Location /scan
SetHandler perl-script
PerlHandler MIS_APPS::RHS::Control::Cookie_Check
MIS_APPS::RHS::Control::Scan

AuthName RHS
AuthType Basic
AuthUserFile /etc/passwd
require valid-user
/Location

But I never get to set the cookie... Can someone tell me what I am doing
wrong?
Thanks in advance
-r



Re: Help with cookies

2001-08-08 Thread Robert Landrum

At 3:50 PM -0400 8/8/01, Perrin Harkins wrote:

It depends on what's happening in that second module.  If you don't send an
actual response to the client, headers (including cookies) will not be sent
out.

Umm... Is

   return OK;

the correct thing to return when using multiple handlers?  I thought 
DECLINED was the correct status code.  Then the last module (in this 
case MIS_APPS::RHS::Control::Scan) would return OK.

Robert Landrum

--
A good magician never reveals his secret; the unbelievable trick
becomes simple and obvious once it is explained. So too with UNIX. 



Re: knowledge base - was Re: RFC: mod_perl 2.0 documentation project

2001-08-08 Thread Jim Smith

On Wed, Aug 08, 2001 at 10:45:43AM +0800, Stas Bekman wrote:
 On Tue, 7 Aug 2001, Jim Smith wrote:
 
  On Tue, Aug 07, 2001 at 10:16:26PM +0800, Stas Bekman wrote:
Just some pseudo-random ideation boiling down to let's use mod_perl
to buils a knowledge base both to demonstrate it's power and to serve
the community.
  
   I like the idea!!!
 
  If we can come up with a proposal for a generic knowledge base product that
  would be useful in an IT environment, I can probably devote some of my work
  to it -- this is something I've been wanting to put together at work for
  customers and our help desk people but haven't had time yet to get it all
  together.  I'll have more time in September after the students return.
 
 go ahead and be the first to propose Jim :)

Ok... here are some of my initial thoughts.

We need to be able to enter arbitrary documents, so I suggest DocBook as
the standard format.  This handles articles, books, reference pages, etc.,
in a well-defined manner.  It also allows us to transform to other formats
without much of a problem.  We can even consider AxKit for at least part of
the web interface.

We would want to have different sections for documents that are not
related.  For example, we (here at TAMU) could use a section on Unix,
another on Mac, and yet another on Windows systems.  Or we could divide it
up by services.  The different sections would not expect overlap in keyword
- content mapping, so we could have an AI::Catagorize object for each
section that could provide a default set of keywords.  As we entered
documents, those objects could learn which keywords were appropriate.

We would want to have documents in multiple catagories.  This might require
the person entering the document enter multiple sets of keywords, one per
section.

We would need to index on keyword so people could quickly find the
documents.  Perhaps even a catelogue-style interface for browsing that
would be based on keyword categories.  This would require some work.
(Broad categories are indicated by the presence of certain keywords, or by
a weighted average so a document having all but a couple of the appropriate
keywords won't be dropped from that category.)

Documents shouldn't have to be entered via the web interface, though they
could be.  We could provide a set of web-page templates for each of the
DocBook formats (well, the small ones anyway - don't want to write a book
via a web interface).  Might want to even integrate with WebDAV and a
repository.

We probably want to set up a SourceForge project if this is a go.  Any
ideas on names?

Now to see if I can get my boss to support me spending time on such a
project :)

--jim



Re: Help with cookies

2001-08-08 Thread Perrin Harkins

 Long time no hear... I heard you moved to NY...

This is true.  I'm exploring new territory.

 I think I do send a response back to Apache! I
 mean I return OK status. Or do you mean something else? Like
 $r-header_out(...)?

You need to send the headers (with $r-send_http_header or something
similar), and print something to the client.  Otherwise, your Set-Cookie
header will never get sent out.

Glad to see you're still mod_perl-ing.

- Perrin




Re: Help with cookies

2001-08-08 Thread Perrin Harkins

 Umm... Is

return OK;

 the correct thing to return when using multiple handlers?

Yes, according the mod_perl docs.  It only stops if you return something
other than OK or DECLINED.

- Perrin




Re: Help with cookies

2001-08-08 Thread Alastair

On Wed, Aug 08, 2001 at 12:21:07PM -0700, Rasoul Hajikhani wrote:
 But I never get to set the cookie... Can someone tell me what I am doing
 wrong?

As Perrin, said, is a cookie header being set and sent somewhere else in
the code? In my experience, cookie programming can be extremely
frustrating, given the different browsers in use for instance.
Sometime's it's best to start very simple and work up from there.

I've been using CGI::Cookie with some success recently but I'd expect
Apache::Cookie to work in a similar way.

Good luck!


-- 
Alastair| 
[EMAIL PROTECTED]   |
http://www.calliope.demon.co.uk |PGP Key : A9DE69F8
---



Blank Page Returned by Mod_perl

2001-08-08 Thread Bob Foster

Hi,

I'm using mod_backhand frontend and mod_perl backend (on 127.0.0.1).  Many
complex scripts are working fine but I'm getting behavior I don't
understand with this simple script:

#!/usr/local/bin/perl
print Content-type: text/html\n\n;
print This is a test\n\n;
exit;

1.  If the script is NOT handed off to the backend, the browser shows:
This is a test

2.  If the script is handed off to the backend, the browser shows a blank
page.

3.  If I go directly to the backend, the browser shows:
Content-type: text/html This is a test 

I'd like to get the same output on 2 as occurs on 1.

Why is this happening?  Can anyone help?

Thanks!

Bob Foster




Cookies and Handlers

2001-08-08 Thread Rasoul Hajikhani

Why is setting cookies so complex in mod_perl...
Can any one tell me how I can set a few cookies in one handler and hand
over the operation to another handler to do some more stuff... 
I have tried everything that I know (that's not much) but I still can
not set the cookies...
here is the snippet of my cookie setter handler:
 my $u   = Apache::Cookie-new( $r,
  
-name   = 'randh_webuname',
  
-value  = $webuname,
  
-domain = '.rhythm.com',
  
-expires= '+24H',
  
-path   = '/'
 );
$r-err_headers_out-add('Set-Cookie' = $u) if $u;

some more cookies here

$r-err_headers_out;
return DECLINED; # tried OK with the same result
}
1;

At this point my second handler takes over ...
.
.
.

$r-err_headers_out;
return OK;

Please Help :(
-r



using DBI with apache

2001-08-08 Thread Greg Cobb

I can run this simple script through perl itself, but when I put it in the 
cgi-bin and try to run it using mod_perl Perl pops up in windows with an 
error.  I assume this means I need something like Apache::DBI?...  I 
originally got Apache in binary form with mod_perl installed and did not 
have to compile anything.  I tried to follow the instructions but i dont 
seem to be able to build Apache::DBI
I ran
perl makefile.pl which creates a file called makefile
then the instructions tell you to run
make
make test
make install

make by run by itself says 'No terminator specified for in-line operator' 
and i dont have a test or install file that came with the Apache:DBI 
download.  I have a test.pl but that doesnt seem to be what i need.  I am 
running Win 98se if that helps.  Anyone have any suggestions?

Here is the code I tried to run.
#!\perl\bin\perl
use DBI;
$dbh = DBI-connect('dbi:ODBC:Test1Db');
$sqlstatement=SELECT * FROM ASTAB;
$sth = $dbh-prepare($sqlstatement);
$sth-execute ||
   die Could not execute SQL statement ... maybe invalid?;

#output database results
while (@row=$sth-fetchrow_array)
  { print @row\n }



_
Get your FREE download of MSN Explorer at http://explorer.msn.com/intl.asp




Re: Cookies and Handlers

2001-08-08 Thread Tim Tompkins

Time abbreviations are case sensitive:

=pod

 The following forms are all valid for the -expires field:
+30s  30 seconds from now
+10m  ten minutes from now
+1h   one hour from now
-1d   yesterday (i.e. ASAP!)
now   immediately
+3M   in three months
+10y  in ten years time

=cut

So, change +24H to +24h.

Note that you may also, $u-bake() since you're using Apache::Cookie.  This
will set the outgoing headers for you.


Regards,
Tim Tompkins
--
Programmer
http://www.arttoday.com/
http://www.rebelartist.com/
--


- Original Message -
From: Rasoul Hajikhani [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Wednesday, August 08, 2001 6:11 PM
Subject: Cookies and Handlers


 Why is setting cookies so complex in mod_perl...
 Can any one tell me how I can set a few cookies in one handler and hand
 over the operation to another handler to do some more stuff...
 I have tried everything that I know (that's not much) but I still can
 not set the cookies...
 here is the snippet of my cookie setter handler:
  my $u   = Apache::Cookie-new( $r,

 -name   = 'randh_webuname',

 -value  = $webuname,

 -domain = '.rhythm.com',

 -expires= '+24H',

 -path   = '/'
  );
 $r-err_headers_out-add('Set-Cookie' = $u) if $u;

 some more cookies here

 $r-err_headers_out;
 return DECLINED; # tried OK with the same result
 }
 1;

 At this point my second handler takes over ...
 .
 .
 .

 $r-err_headers_out;
 return OK;

 Please Help :(
 -r





cvs commit: modperl-2.0/pod modperl_dev.pod

2001-08-08 Thread sbekman

sbekman 01/08/08 20:29:32

  Modified:pod  modperl_dev.pod
  Log:
  add a note about using threaded perl
  
  Revision  ChangesPath
  1.32  +3 -0  modperl-2.0/pod/modperl_dev.pod
  
  Index: modperl_dev.pod
  ===
  RCS file: /home/cvs/modperl-2.0/pod/modperl_dev.pod,v
  retrieving revision 1.31
  retrieving revision 1.32
  diff -u -r1.31 -r1.32
  --- modperl_dev.pod   2001/08/02 04:38:11 1.31
  +++ modperl_dev.pod   2001/08/09 03:29:32 1.32
  @@ -41,6 +41,9 @@
% make  make test  make install
% ln -s $HOME/bleedperl/bin/perl5.x.x $HOME/bleedperl/bin/perl
   
  +or otherwise make sure that your perl was built with threads enabled if
  +you want to use the threaded MPM.
  +
   If you are re-building Perl after rsync-ing, make sure to cleanup:
   
 % make distclean
  
  
  



cvs commit: modperl-2.0/todo missing_old_features.txt

2001-08-08 Thread sbekman

sbekman 01/08/08 00:02:41

  Modified:src/modules/perl mod_perl.c modperl_cmd.c modperl_cmd.h
modperl_config.c modperl_config.h modperl_util.c
modperl_util.h
   todo missing_old_features.txt
  Log:
  * implementing PerlModule and PerlRequire configuration
  directives, for the main server and virtual hosts
  
  * adding a todo item: .htaccess support for PerlModule and PerlRequire is
  missing
  
  Revision  ChangesPath
  1.61  +16 -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.60
  retrieving revision 1.61
  diff -u -r1.60 -r1.61
  --- mod_perl.c2001/07/15 22:33:48 1.60
  +++ mod_perl.c2001/08/08 07:02:41 1.61
  @@ -74,6 +74,13 @@
   );
   #endif
   
  +if (!modperl_config_apply_PerlModule(s, scfg, perl, p)){
  +exit(1);
  +}
  +if (!modperl_config_apply_PerlRequire(s, scfg, perl, p)){
  +exit(1);
  +}
  +
   #ifndef USE_ITHREADS
   cdata = modperl_cleanup_data_new(p, (void*)perl);
   apr_pool_cleanup_register(p, cdata,
  @@ -126,6 +133,13 @@
  modperl_server_desc(s, p));
   }
   
  +if (!modperl_config_apply_PerlModule(s, scfg, perl, p)){
  +exit(1);
  +}
  +if (!modperl_config_apply_PerlRequire(s, scfg, perl, p)){
  +exit(1);
  +}
  +
   #ifdef USE_ITHREADS
   
   if (!MpSrvENABLED(scfg)) {
  @@ -355,6 +369,8 @@
   
   static const command_rec modperl_cmds[] = {  
   MP_CMD_SRV_ITERATE(PerlSwitches, switches, Perl Switches),
  +MP_CMD_SRV_ITERATE(PerlModule, modules, PerlModule),
  +MP_CMD_SRV_ITERATE(PerlRequire, requires, PerlRequire),
   MP_CMD_DIR_ITERATE(PerlOptions, options, Perl Options),
   #ifdef MP_TRACE
   MP_CMD_SRV_TAKE1(PerlTrace, trace, Trace level),
  
  
  
  1.5   +19 -0 modperl-2.0/src/modules/perl/modperl_cmd.c
  
  Index: modperl_cmd.c
  ===
  RCS file: /home/cvs/modperl-2.0/src/modules/perl/modperl_cmd.c,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- modperl_cmd.c 2001/04/06 02:18:15 1.4
  +++ modperl_cmd.c 2001/08/08 07:02:41 1.5
  @@ -39,7 +39,26 @@
   MP_CMD_SRV_DECLARE(switches)
   {
   MP_dSCFG(parms-server);
  +MP_TRACE_d(MP_FUNC, arg = %s\n, arg);
   modperl_config_srv_argv_push(arg);
  +return NULL;
  +}
  +
  +MP_CMD_SRV_DECLARE(modules)
  +{
  +MP_dSCFG(parms-server);
  +
  +*(const char **)apr_array_push(scfg-PerlModule) = arg;
  +MP_TRACE_d(MP_FUNC, arg = %s\n, arg);
  +return NULL;
  +}
  +
  +MP_CMD_SRV_DECLARE(requires)
  +{
  +MP_dSCFG(parms-server);
  +
  +*(const char **)apr_array_push(scfg-PerlRequire) = arg;
  +MP_TRACE_d(MP_FUNC, arg = %s\n, arg);
   return NULL;
   }
   
  
  
  
  1.5   +2 -0  modperl-2.0/src/modules/perl/modperl_cmd.h
  
  Index: modperl_cmd.h
  ===
  RCS file: /home/cvs/modperl-2.0/src/modules/perl/modperl_cmd.h,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- modperl_cmd.h 2001/04/06 02:18:15 1.4
  +++ modperl_cmd.h 2001/08/08 07:02:41 1.5
  @@ -10,6 +10,8 @@
  void *dummy, const char *arg)
   MP_CMD_SRV_DECLARE(trace);
   MP_CMD_SRV_DECLARE(switches);
  +MP_CMD_SRV_DECLARE(modules);
  +MP_CMD_SRV_DECLARE(requires);
   MP_CMD_SRV_DECLARE(options);
   
   #ifdef USE_ITHREADS
  
  
  
  1.33  +51 -0 modperl-2.0/src/modules/perl/modperl_config.c
  
  Index: modperl_config.c
  ===
  RCS file: /home/cvs/modperl-2.0/src/modules/perl/modperl_config.c,v
  retrieving revision 1.32
  retrieving revision 1.33
  diff -u -r1.32 -r1.33
  --- modperl_config.c  2001/05/08 21:08:26 1.32
  +++ modperl_config.c  2001/08/08 07:02:41 1.33
  @@ -71,6 +71,9 @@
   MpSrvENABLED_On(scfg); /* mod_perl enabled by default */
   MpSrvHOOKS_ALL_On(scfg); /* all hooks enabled by default */
   
  +scfg-PerlModule  = apr_array_make(p, 2, sizeof(char *));
  +scfg-PerlRequire = apr_array_make(p, 2, sizeof(char *));
  +
   scfg-argv = apr_array_make(p, 2, sizeof(char *));
   
   modperl_config_srv_argv_push((char *)ap_server_argv0);
  @@ -152,6 +155,9 @@
   MP_TRACE_d(MP_FUNC, basev==0x%lx, addv==0x%lx\n, 
  (unsigned long)basev, (unsigned long)addv);
   
  +merge_item(PerlModule);
  +merge_item(PerlRequire);
  +
   merge_item(threaded_mpm);
   
   #ifdef USE_ITHREADS
  @@ -183,3 +189,48 @@
   return mrg;
   }
   
  +int modperl_config_apply_PerlModule(server_rec *s, 

cvs commit: modperl-2.0/todo possible_new_features.txt

2001-08-08 Thread sbekman

sbekman 01/08/08 00:13:04

  Modified:todo possible_new_features.txt
  Log:
  log the PerlOptions +Inherit idea
  
  Revision  ChangesPath
  1.7   +9 -0  modperl-2.0/todo/possible_new_features.txt
  
  Index: possible_new_features.txt
  ===
  RCS file: /home/cvs/modperl-2.0/todo/possible_new_features.txt,v
  retrieving revision 1.6
  retrieving revision 1.7
  diff -u -r1.6 -r1.7
  --- possible_new_features.txt 2001/08/05 03:20:31 1.6
  +++ possible_new_features.txt 2001/08/08 07:13:04 1.7
  @@ -15,6 +15,15 @@
 PerlSwitches -Mlib=/home/dev1/lib/perl, to set different @INC for
 different virtual hosts.
   
  +- a possible implementation of PerlOptions +Inherit, similar to
  +  +Parent but which allows virtual hosts to inherit everything that
  +  was loaded by the main server, at the point of their definition in
  +  the config file. This can make it easier to write configuration
  +  files where there is a common base of modules to be loaded in all
  +  servers. Of course this can be done by putting all these common
  +  modules and code into foo.pl and running it from the base server and
  +  all virtual hosts.
  +
   perl language features:
   --