cvs commit: modperl-2.0/Apache-Test/lib/Apache TestRun.pm

2001-06-21 Thread sbekman

sbekman 01/06/21 00:41:14

  Modified:Apache-Test/lib/Apache TestRun.pm
  Log:
  try out Apache::TestTrace
  
  Revision  ChangesPath
  1.6   +12 -11modperl-2.0/Apache-Test/lib/Apache/TestRun.pm
  
  Index: TestRun.pm
  ===
  RCS file: /home/cvs/modperl-2.0/Apache-Test/lib/Apache/TestRun.pm,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- TestRun.pm2001/06/17 15:26:46 1.5
  +++ TestRun.pm2001/06/21 07:41:13 1.6
  @@ -6,6 +6,7 @@
   use Apache::TestConfig ();
   use Apache::TestRequest ();
   use Apache::TestHarness ();
  +use Apache::TestTrace;
   
   use File::Spec::Functions qw(catfile);
   use Getopt::Long qw(GetOptions);
  @@ -179,10 +180,10 @@
   
   $SIG{INT} = sub {
   if ($caught_sig_int++) {
  -print \ncaught SIGINT\n;
  +warning \ncaught SIGINT\n;
   exit;
   }
  -print \nhalting tests\n;
  +notice \nhalting tests\n;
   $server-stop if $opts-{'start-httpd'};
   exit;
   };
  @@ -232,10 +233,10 @@
   my $test_config = $self-{test_config};
   
   unless ($test_config-{vars}-{httpd}) {
  -print no test server configured, please specify an httpd or ;
  -print $test_config-{MP_APXS} ?
  -  an apxs other than $test_config-{MP_APXS} : apxs;
  -print \nor put either in your PATH\n;
  +error no test server configured, please specify an httpd or ,
  +  ($test_config-{MP_APXS} ?
  +   an apxs other than $test_config-{MP_APXS} : apxs),
  +   or put either in your PATH;
   exit 1;
   }
   
  @@ -243,7 +244,7 @@
   exit 1 unless $self-{server}-start;
   } elsif ($self-{opts}-{'run-tests'} and !$self-{server}-ping) {
   # make sure that the server is up when -run-tests is used
  -print the test server wasn't not running: starting it...\n;
  +warning the test server wasn't not running: starting it...;
   exit 1 unless $self-{server}-start;
   }
   }
  @@ -345,17 +346,17 @@
   
   if ($pid) {
   if ($pid == -1) {
  -print port $test_config-{vars}-{port} is in use, ,
  -  but cannot determine server pid\n;
  +error port $test_config-{vars}-{port} is in use, .
  +  but cannot determine server pid;
   }
   else {
   my $version = $server-{version};
  -print server $name running (pid=$pid, version=$version)\n;
  +notice server $name running (pid=$pid, version=$version)\n;
   }
   return;
   }
   
  -print no server is running on $name\n;
  +warning no server is running on $name\n;
   }
   
   sub opt_debug {
  
  
  



cvs commit: modperl-2.0/Apache-Test/lib/Apache TestTrace.pm

2001-06-21 Thread sbekman

sbekman 01/06/21 00:56:18

  Modified:Apache-Test/lib/Apache TestTrace.pm
  Log:
  advise on localizing globals overriding
  
  Revision  ChangesPath
  1.3   +26 -16modperl-2.0/Apache-Test/lib/Apache/TestTrace.pm
  
  Index: TestTrace.pm
  ===
  RCS file: /home/cvs/modperl-2.0/Apache-Test/lib/Apache/TestTrace.pm,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- TestTrace.pm  2001/06/21 07:52:11 1.2
  +++ TestTrace.pm  2001/06/21 07:56:17 1.3
  @@ -111,22 +111,28 @@
   # demo the trace subs using default setting
   test();
   
  -# override the default trace level with 'crit'
  -$Apache::TestTrace::Level = 'crit';
  -# now only 'crit' and higher levels will do tracing lower level
  -test();
  -
  -# set the trace level to 'debug'
  -$Apache::TestTrace::Level = 'debug';
  -# now only 'debug' and higher levels will do tracing lower level
  -test();
  -
  -open OUT, /tmp/foo or die $!;
  -# override the default Log filehandle
  -$Apache::TestTrace::LogFH = \*OUT;
  -# now the traces will go into a new filehandle
  -test();
  -close OUT;
  +{
  +# override the default trace level with 'crit'
  +local $Apache::TestTrace::Level = 'crit';
  +# now only 'crit' and higher levels will do tracing lower level
  +test();
  +}
  +
  +{
  +# set the trace level to 'debug'
  +local $Apache::TestTrace::Level = 'debug';
  +# now only 'debug' and higher levels will do tracing lower level
  +test();
  +}
  +
  +{
  +open OUT, /tmp/foo or die $!;
  +# override the default Log filehandle
  +local $Apache::TestTrace::LogFH = \*OUT;
  +# now the traces will go into a new filehandle
  +test();
  +close OUT;
  +}
   
   =head1 DESCRIPTION
   
  @@ -162,6 +168,10 @@
   By default all the output generated by these functions goes to
   STDERR. You can override the default filehandler by overriding
   C$Apache::TestTrace::LogFH with a new filehandler.
  +
  +When you override this package's global variables, think about
  +localizing your local settings, so it won't affect other modules using
  +this module in the same run.
   
   =head1 TODO
   
  
  
  



cvs commit: modperl-2.0/Apache-Test/lib/Apache TestRun.pm

2001-06-21 Thread sbekman

sbekman 01/06/21 01:00:09

  Modified:Apache-Test/lib/Apache TestRun.pm
  Log:
  remove newlines, adjust levels, so with the default 'warnings' level the important 
messages will be printed, consider making notice the default level
  
  Revision  ChangesPath
  1.7   +4 -4  modperl-2.0/Apache-Test/lib/Apache/TestRun.pm
  
  Index: TestRun.pm
  ===
  RCS file: /home/cvs/modperl-2.0/Apache-Test/lib/Apache/TestRun.pm,v
  retrieving revision 1.6
  retrieving revision 1.7
  diff -u -r1.6 -r1.7
  --- TestRun.pm2001/06/21 07:41:13 1.6
  +++ TestRun.pm2001/06/21 08:00:07 1.7
  @@ -180,10 +180,10 @@
   
   $SIG{INT} = sub {
   if ($caught_sig_int++) {
  -warning \ncaught SIGINT\n;
  +warning \ncaught SIGINT;
   exit;
   }
  -notice \nhalting tests\n;
  +notice \nhalting tests;
   $server-stop if $opts-{'start-httpd'};
   exit;
   };
  @@ -351,12 +351,12 @@
   }
   else {
   my $version = $server-{version};
  -notice server $name running (pid=$pid, version=$version)\n;
  +warning server $name running (pid=$pid, version=$version);
   }
   return;
   }
   
  -warning no server is running on $name\n;
  +warning no server is running on $name;
   }
   
   sub opt_debug {
  
  
  



cvs commit: modperl-2.0/lib/ModPerl TypeMap.pm

2001-06-21 Thread sbekman

sbekman 01/06/21 21:09:17

  Modified:lib/ModPerl TypeMap.pm
  Log:
  remove a reference to a non-existing file
  
  Revision  ChangesPath
  1.8   +0 -1  modperl-2.0/lib/ModPerl/TypeMap.pm
  
  Index: TypeMap.pm
  ===
  RCS file: /home/cvs/modperl-2.0/lib/ModPerl/TypeMap.pm,v
  retrieving revision 1.7
  retrieving revision 1.8
  diff -u -r1.7 -r1.8
  --- TypeMap.pm2001/05/03 04:35:44 1.7
  +++ TypeMap.pm2001/06/22 04:09:15 1.8
  @@ -357,7 +357,6 @@
   apr_general.h
   apr_signal.h
   util_script.h
  -util_date.h
   };
   
   sub h_wrap {
  
  
  



Can't locate object method module via package Apache

2001-06-21 Thread Surat Singh Bhati

I am getting the following error in my strartup.pl

perl -cx startup.pl
Can't locate object method module via package Apache at
/usr/local/lib/perl5
/site_perl/5.6.0/Apache/DBI.pm line 202.
Compilation failed in require at startup.pl line 11. 

Line 11 of startup.pl 
11   use Apache::DBI();

Line 202 of DBI.pm 
202  ) if ($INC{'Apache.pm'} and Apache-module('Apache::Status'));   

Can you pelase tell me the possible cause of this error.
Apache::DBI is up to date as perl CPAN.

Regards,

-Surat Singh 





AW: InstallProblem mod_perl125 on Win2000 and Apache1.3.20

2001-06-21 Thread Michael Heinen

Thanks Randy for your patch (it works).

perl Makefile.PL APACHE_SRC=C:\Apache INSTALL_DLL=C:\
Apache\modules
Checking if your kit is complete...
Looks good
Writing Makefile for Apache
Writing Makefile for Apache::Connection
Writing Makefile for Apache::Constants
Writing Makefile for Apache::File
Writing Makefile for Apache::Leak
Writing Makefile for Apache::Log
Writing Makefile for Apache::ModuleConfig
Writing Makefile for Apache::PerlRunXS
Writing Makefile for Apache::Server
Writing Makefile for Apache::Symbol
Writing Makefile for Apache::Table
Writing Makefile for Apache::URI
Writing Makefile for Apache::Util
Writing Makefile for mod_perl

But now I have a new problem with nmake.
Here is the translatet error message:

makefile(861) : fatal error U1087: dependent elements of type : and of type
::
are not possible for the same target.

What can I do now ?

Many thanks again,
Michael

-Ursprungliche Nachricht-
Von: Randy Kobes [mailto:[EMAIL PROTECTED]]
Gesendet: Donnerstag, 21. Juni 2001 06:59
An: Michael Heinen
Betreff: Re: InstallProblem mod_perl125 on Win2000 and Apache1.3.20


On Wed, 20 Jun 2001, Michael Heinen wrote:

 Hi,
Actually, upon reflection, the situation you've
 described above should have been handled by Makefile.PL - I've
 submitted a patch that should fix this, and attached it to this
 message if you want to try it out (this is against the cvs modperl
 version). Thanks for pointing this out.

 best regards,
 randy kobes



Re: AW: InstallProblem mod_perl125 on Win2000 and Apache1.3.20

2001-06-21 Thread Randy Kobes

On Thu, 21 Jun 2001, Michael Heinen wrote:

 Thanks Randy for your patch (it works).
[ ... ]

 But now I have a new problem with nmake.
 Here is the translatet error message:

 makefile(861) : fatal error U1087: dependent elements of type : and of type
 ::
 are not possible for the same target.

 What can I do now ?
[ .. ]

This looks like the generated Makefile is somehow not compatible
with 'nmake'. Can you build OK other modules that have an XS
component, like DBI? Does 'perl -V:make' report back 'nmake'?

best regards,
randy






problems running Net::LDAP under mod_perl

2001-06-21 Thread tim fulcher

Hi

Got some odd behaviour with Net::LDAP which I've been using pretty
solidly for some time now.
When I run a simple script from the command line it binds to the LDAP
server and does a search just fine. When I run the same script under
Apache Registry, or the guts of the script inside a perl handler I get
the following error on the LDAP bind()

mesg code: 1
mesg error:  I/O Error Resource temporarily unavailable

And the search runs but only ever resolves to the root object in the
directory. It doesn't matter if I bind anoymously or as the root user.
The LDAP server is running on another machine to the Apache server.

I figure this might have something to do with a different perl
environment running under apache but comparing perl -V on the command
line with a dump of myconfig  @INC running under Apache only gives a
different @INC:

using perl -V:
/usr/local/lib/perl5/5.00503/sun4-solaris
/usr/local/lib/perl5/5.00503
/usr/local/lib/perl5/site_perl/5.005/sun4-solaris
/usr/local/lib/perl5/site_perl/5.005

dump of @INC under Apache
/usr/local/apache/lib/perl
/usr/local/apache/lib/perl
/usr/local/lib/perl5/5.00503/sun4-solaris
/usr/local/lib/perl5/5.00503
/usr/local/lib/perl5/site_perl/5.005/sun4-solaris
/usr/local/lib/perl5/site_perl/5.005
.
/usr/local/apache/
/usr/local/apache/lib/perl

My environment:
Solaris 2.6
Apache 1.3.20
mod_perl 1.25
Perl 5.00503

Any ideas ?


Tim Fulcher







Re: Multiple AddHandler statements

2001-06-21 Thread Peter Reif

Mithun Bhattacharya *EXTERN* wrote:
 
 Is there something in SSI which cant be done in a better way using Perl
 ??

Yes, giving authors a simple tool with which they can't mess around.
Perl is too powerful.

Peter



Re: Apache::AuthDBI

2001-06-21 Thread will trillich

On Tue, Jun 19, 2001 at 10:38:01AM -0700, Alan E. Derhaag wrote:
 Christian Heiss [EMAIL PROTECTED] writes:
 
  Hi,
  
  I'm using Apache::AuthDBI to verifying the users on my web site.

  then I put it in the database with:
  

  my $sql = INSERT INTO table name VALUES($userid, $groupid, $pass, ...);
  of course, before I'm using the quote funktion ($dbh-quote($userid)...)...

maybe do this instead:

@vars = ($alpha,$bravo,$charlie,$delta);
my $sql = insert into sometable values( . (join '.',('?') x @vars) . );
$sth = $dbh-prepare($sql);
$sth-execute(@vars);
$sth-finish();

just a suggestion...

-- 
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!



Solaris mod_perl DSO...

2001-06-21 Thread Sean Chittenden

Has anyone had any luck getting mod_perl to work as a DSO on 
Solaris?  In looking through the sources, it looks like my only option 
is to upgrade to bleed perl.  If that really is the only thing I can 
do, can someone quickly second my thoughts before I go and subject 
myself to a little piece of something other than heaven?  Thanks.  -sc

-- 
Sean Chittenden

 PGP signature


RE: Solaris mod_perl DSO...

2001-06-21 Thread Paul G. Weiss

I've done it with 5.6.1.  There was a fairly detailed thread on it last
week on how it was done.  In order to avoid a memory leak on restart you
need to build with a bleed modperl though.  If you can start and stop your
server you're fine with 1.25.



-Original Message-
From: Sean Chittenden [mailto:[EMAIL PROTECTED]]
Sent: Thursday, June 21, 2001 7:32 PM
To: [EMAIL PROTECTED]
Subject: Solaris mod_perl DSO...


Has anyone had any luck getting mod_perl to work as a DSO on 
Solaris?  In looking through the sources, it looks like my only option 
is to upgrade to bleed perl.  If that really is the only thing I can 
do, can someone quickly second my thoughts before I go and subject 
myself to a little piece of something other than heaven?  Thanks.  -sc

-- 
Sean Chittenden



Re: Requests using If-Modified-Since cause response Set-Cookie tobe discarded

2001-06-21 Thread Doug MacEachern

On Wed, 20 Jun 2001, Nenad Steric wrote:

 Hi,
 
 Thanks for your answer, saved me days of probably fruitless fidling around with 
modperl.
 Your solution solved my problems (see Sending Cookies on Page-Reload)
 the question remains if this violates some RFC's (or breaks some browsers), 
 and if there is some other way - like faking that the file-date has changed.
 (i am not quite confortable with patching every new apache version again, 
 or would it be a good idea to send this to the apache-guys ?)

i passed it along the same day:
http://hypermail.linklord.com/new-httpd/2001/Jun/0507.html

still awaiting response on my interpretation of the rfc, seems perfectly
valid to include the set-cookie header with a 304 response.

you could of course delete the if-modified-since header from headers_in,
but that would put an end to caching of those documents, something i'm
sure nobody wants todo.





Re: Multiple AddHandler statements

2001-06-21 Thread Mithun Bhattacharya

No offense meant but it is my personal opinion that SSI can mess up a
system worse than Perl ever could. Also the person who had initiated
this thread was using SSI to execute a third party application. I am not
sure why a system command would be worse than doing a SSI.


Mithun



Re: Requests using If-Modified-Since cause response Set-Cookie to be discarded

2001-06-21 Thread Randal L. Schwartz

 Doug == Doug MacEachern [EMAIL PROTECTED] writes:

Doug i passed it along the same day:
Doug http://hypermail.linklord.com/new-httpd/2001/Jun/0507.html

Doug still awaiting response on my interpretation of the rfc, seems perfectly
Doug valid to include the set-cookie header with a 304 response.

Uh, it seems a bit fishy to me.  nothing's changed, but by the way,
set this cookie please.  Why change a cookie if nothing else has
changed?

-- 
Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777 0095
[EMAIL PROTECTED] URL:http://www.stonehenge.com/merlyn/
Perl/Unix/security consulting, Technical writing, Comedy, etc. etc.
See PerlTraining.Stonehenge.com for onsite and open-enrollment Perl training!



RE: Solaris mod_perl DSO...

2001-06-21 Thread Doug MacEachern

On Thu, 21 Jun 2001, Paul G. Weiss wrote:

 I've done it with 5.6.1.  There was a fairly detailed thread on it last
 week on how it was done.  In order to avoid a memory leak on restart you
 need to build with a bleed modperl though.  If you can start and stop your
 server you're fine with 1.25.

as you pointed out before, you can configure:
PerlSetEnv PERL_DESTRUCT_LEVEL 2

without installing cvs modperl.





cvs commit: modperl Changes INSTALL.win32 Makefile.PL

2001-06-21 Thread dougm

dougm   01/06/21 09:11:48

  Modified:.Changes INSTALL.win32 Makefile.PL
  Log:
  win32 enhancement: APACHE_SRC can be either the build or install tree
  
  Revision  ChangesPath
  1.601 +3 -0  modperl/Changes
  
  Index: Changes
  ===
  RCS file: /home/cvs/modperl/Changes,v
  retrieving revision 1.600
  retrieving revision 1.601
  diff -u -r1.600 -r1.601
  --- Changes   2001/06/19 02:36:40 1.600
  +++ Changes   2001/06/21 16:11:40 1.601
  @@ -10,6 +10,9 @@
   
   =item 1.25_01-dev
   
  +win32 enhancement: APACHE_SRC can be either the build or install tree
  +[Randy Kobes [EMAIL PROTECTED]]
  +
   perl_destruct_level must always be 2 for DSO builds to prevent
   leaking on restarts, thanks to Paul G. Weiss for the spot
   
  
  
  
  1.7   +4 -2  modperl/INSTALL.win32
  
  Index: INSTALL.win32
  ===
  RCS file: /home/cvs/modperl/INSTALL.win32,v
  retrieving revision 1.6
  retrieving revision 1.7
  diff -u -r1.6 -r1.7
  --- INSTALL.win32 2000/12/31 19:34:16 1.6
  +++ INSTALL.win32 2001/06/21 16:11:42 1.7
  @@ -117,8 +117,10 @@
   
   =item APACHE_SRC
   
  -This gives the path to the Apache sources (eg, ..\apache_1.3.xx). It 
  -is assumed that Apache has already been built in this directory.
  +This can be one of two values: either the path to the Apache build
  +directory (eg, ..\apache_1.3.xx), or to the installed Apache location
  +(eg, \Apache). This is used to set the locations of ApacheCore.lib
  +and the Apache header files.
   
   =item INSTALL_DLL
   
  
  
  
  1.188 +16 -8 modperl/Makefile.PL
  
  Index: Makefile.PL
  ===
  RCS file: /home/cvs/modperl/Makefile.PL,v
  retrieving revision 1.187
  retrieving revision 1.188
  diff -u -r1.187 -r1.188
  --- Makefile.PL   2001/06/19 03:12:41 1.187
  +++ Makefile.PL   2001/06/21 16:11:43 1.188
  @@ -2072,16 +2072,24 @@
 unless ($win32_args{APACHE_SRC} = find_dir(\@dirs, 'apache source'));
 }
 $win32_args{APACHE_SRC} = win32_fix_path($win32_args{APACHE_SRC});
  -  $win32_args{APACHE_SRC} .= '/src' unless $win32_args{APACHE_SRC} =~ /src$/;
  -  $win32_path{APACHE_INC} = $win32_args{APACHE_SRC} .  '/include';
  -  $win32_args{APACHE_VERS} = httpd_version($win32_path{APACHE_INC}, 1);
  -  $win32_path{APACHE_LIB} = ($win32_args{DEBUG} == 1) ? 
  -$win32_args{APACHE_SRC} . 
  -  ($win32_args{APACHE_VERS}  1315 ? '/CoreD' : '/Debug') :
  - $win32_args{APACHE_SRC} . 
  -   ($win32_args{APACHE_VERS}  1315 ? '/CoreR' : '/Release');
  +  if (-d $win32_args{APACHE_SRC}/libexec) {
  +$win32_path{APACHE_LIB} = $win32_args{APACHE_SRC} . '/libexec';
  +$win32_path{APACHE_INC} = $win32_args{APACHE_SRC} . '/include';
  +  }
  +  else {
  +$win32_args{APACHE_SRC} .= '/src' unless $win32_args{APACHE_SRC} =~ /src$/;
  +$win32_path{APACHE_INC} = $win32_args{APACHE_SRC} . '/include';
  +$win32_args{APACHE_VERS} = httpd_version($win32_path{APACHE_INC}, 1);
  +$win32_path{APACHE_LIB} = ($win32_args{DEBUG} == 1) ? 
  +  $win32_args{APACHE_SRC} . 
  + ($win32_args{APACHE_VERS}  1315 ? '/CoreD' : '/Debug') :
  +   $win32_args{APACHE_SRC} . 
  + ($win32_args{APACHE_VERS}  1315 ? '/CoreR' : '/Release');
  +  }
 die Cannot find ApacheCore.lib under $win32_path{APACHE_LIB}\n
   unless -f $win32_path{APACHE_LIB}/ApacheCore.lib;
  +  die Cannot find httpd.h under $win32_path{APACHE_INC}\n
  +unless -f $win32_path{APACHE_INC}/httpd.h;
 
 if ($win32_args{INSTALL_DLL} ) {
   $win32_args{INSTALL_DLL} =