Re: non-LFS Apache 1.3.27 w/ LFS Perl 5.8.0 (using mod_perl)

2003-07-07 Thread Stas Bekman
[EMAIL PROTECTED] wrote:
Thanks for your prompt response!

We did compile Apache with CFLAGS=-D_LARGEFILE_SOURCE
-D_FILE_OFFSET_BITS=64 but we're trying to move away from this now,
because of vendors like IBM and Oracle not willing to re-compile (websphere
mods and mod_ossos) with the same flags. Thus without re-compiling my whole
Perl 5.8.0 build I need to come up with a solution.
Like I said before Doug MacEachern actually allows you to get away with
this in mod_perl 1.27 (with mod_perl 1.24 it would squeal and terminate
during compile time).
Sorry for my ignorance but it does look like it will work (non-LFS Apache)
provided that you don't try to access files larger then 2GB. Is there
another low level consideration I'm not taking into account?
Everything will work OK if all the components are compiled without large file 
support. Of course you won't be able to handle files  2GB.

Last but not least...Perl 5.6.1 and greater compiles with LFS (default) and
Apache has always compiled without it (unless you specifically specify it).
Did you re-compile Apache with CFLAGS=-D_LARGEFILE_SOURCE
-D_FILE_OFFSET_BITS=64?
mod_perl 1.x does it for you (i.e. uses perl's cppflags) if you build static 
(since it builds apache).

perl -V:cppflags
cppflags='-D_REENTRANT -D_GNU_SOURCE -DDEBUGGING -fno-strict-aliasing 
-I/usr/include/gdbm';

I'm not sure what happen if you build DSO.

__
Stas BekmanJAm_pH -- Just Another mod_perl Hacker
http://stason.org/ mod_perl Guide --- http://perl.apache.org
mailto:[EMAIL PROTECTED] http://use.perl.org http://apacheweek.com
http://modperlbook.org http://apache.org   http://ticketmaster.com



FAIL mod_perl-1.28 MSWin32-x86-multi-thread 4.0

2003-07-07 Thread DH
This distribution has been tested as part of the cpan-testers
effort to test as many new uploads to CPAN as possible.  See
http://testers.cpan.org/

Please cc any replies to [EMAIL PROTECTED] to keep other
test volunteers informed and to prevent any duplicate effort.

-- 


E:\new\mod_perl-1.28perl Makefile.PL NO_HTTPD=1 APACHE_SRC=E:\Apache
INSTALL_DLL=E:\Apache\modules
PerlDispatchHandler.enabled
PerlChildInitHandlerenabled
PerlChildExitHandlerenabled
PerlPostReadRequestHandler..enabled
PerlTransHandlerenabled
PerlHeaderParserHandler.enabled
PerlAccessHandler...enabled
PerlAuthenHandler...enabled
PerlAuthzHandlerenabled
PerlTypeHandler.enabled
PerlFixupHandlerenabled
PerlHandler.enabled
PerlLogHandler..enabled
PerlInitHandler.enabled
PerlCleanupHandler..enabled
PerlRestartHandler..enabled
PerlStackedHandlers.enabled
PerlMethodHandlers..enabled
PerlDirectiveHandlers...enabled
PerlTableApienabled
PerlLogApi..enabled
PerlUriApi..enabled
PerlUtilApi.enabled
PerlFileApi.enabled
PerlConnectionApi...enabled
PerlServerApi...enabled
Checking if your kit is complete...
Looks good
'NO_HTTPD' is not a known MakeMaker parameter name.
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

Beginning with version 1.3.15, Apache uses a different convention for
Win32 module names. Correspondingly, the name of the mod_perl module
built here has been changed from ApacheModulePerl.dll to mod_perl.so.
Please see INSTALL.win32 for further details.


E:\new\mod_perl-1.28nmake

Microsoft (R) Program Maintenance Utility   Version 6.00.8168.0
Copyright (C) Microsoft Corp 1988-1998. All rights reserved.

cp lib/Apache/Registry.pm blib\lib\Apache\Registry.pm
cp E:/Apache/include/ap_compat.h blib\arch/auto/Apache/include/include/ap_compat.h
cp E:/Apache/include/os.h blib\arch/auto/Apache/include/include/os.h
cp E:/Apache/include/resource.h blib\arch/auto/Apache/include/include/resource.h
cp lib/Apache/PerlSections.pm blib\lib\Apache\PerlSections.pm
cp lib/Apache/PerlRun.pm blib\lib\Apache\PerlRun.pm
cp lib/Apache/Debug.pm blib\lib\Apache\Debug.pm
cp lib/mod_perl_hooks.pm.PL blib\lib\mod_perl_hooks.pm.PL
cp lib/Apache/MyConfig.pm blib\lib\Apache\MyConfig.pm
cp E:/Apache/include/Win9xConHook.h 
blib\arch/auto/Apache/include/include/Win9xConHook.h
cp E:/Apache/include/readdir.h blib\arch/auto/Apache/include/include/readdir.h
cp E:/Apache/include/ap_alloc.h blib\arch/auto/Apache/include/include/ap_alloc.h
cp E:/Apache/include/http_main.h blib\arch/auto/Apache/include/include/http_main.h
cp E:/new/mod_perl-1.28/src/modules/perl/dirent.h
blib\arch/auto/Apache/include/modules/perl/dirent.h
cp lib/Apache/ExtUtils.pm blib\lib\Apache\ExtUtils.pm
cp E:/Apache/include/service.h blib\arch/auto/Apache/include/include/service.h
cp E:/Apache/include/ap_ctype.h blib\arch/auto/Apache/include/include/ap_ctype.h
cp lib/Apache/src.pm blib\lib\Apache\src.pm
cp lib/mod_perl.pm blib\lib\mod_perl.pm
cp E:/Apache/include/multithread.h blib\arch/auto/Apache/include/include/multithread.h
cp mod_perl_cvs.pod blib\lib\mod_perl_cvs.pod
cp E:/Apache/include/ap.h blib\arch/auto/Apache/include/include/ap.h
cp E:/Apache/include/compat.h blib\arch/auto/Apache/include/include/compat.h
cp E:/Apache/include/http_config.h blib\arch/auto/Apache/include/include/http_config.h
cp E:/Apache/include/xml/xmlrole.h blib\arch/auto/Apache/include/include/xml/xmlrole.h
cp E:/new/mod_perl-1.28/src/modules/perl/mod_perl.h
blib\arch/auto/Apache/include/modules/perl/mod_perl.h
cp E:/Apache/include/xml/nametab.h blib\arch/auto/Apache/include/include/xml/nametab.h
cp apaci/mod_perl.exp blib\arch/auto/Apache/mod_perl.exp
cp E:/Apache/include/http_log.h blib\arch/auto/Apache/include/include/http_log.h
cp lib/Apache/testold.pm blib\lib\Apache\testold.pm
cp lib/Apache/Symdump.pm blib\lib\Apache\Symdump.pm
cp lib/Apache/Status.pm blib\lib\Apache\Status.pm
cp E:/Apache/include/registry.h blib\arch/auto/Apache/include/include/registry.h
cp E:/new/mod_perl-1.28/src/modules/perl/mod_perl_version.h
blib\arch/auto/Apache/include/modules/perl/mod_perl_version.h
cp lib/Apache/RedirectLogFix.pm blib\lib\Apache\RedirectLogFix.pm
cp E:/Apache/include/hsregex.h blib\arch/auto/Apache/include/include/hsregex.h
cp mod_perl_method_handlers.pod blib\lib\mod_perl_method_handlers.pod
cp lib/Apache/Include.pm 

[MP2 BUG] PerlPassEnv issues

2003-07-07 Thread Sreeji K Das
Looks like PerlSetEnv's are not propagated as
expected.
I've pasted my original mail to the list. However,
after going through the code, it looks like
scfg-PassEnv is not synced with Perl's %ENV
structure.

Following is a simpler example:
$ cat /tmp/test.conf
Perl 
;
/Perl

PerlPassEnv MY_TEST_VAR
Perl 
print MY_TEST_VAR is $ENV{MY_TEST_VAR}\n;
system(echo \shell: MY_TEST_VAR = \$MY_TEST_VAR\);
/Perl

Listen 43499

$ httpd -X -f /m/aru/conf/test.conf
MY_TEST_VAR is 
shell: MY_TEST_VAR = Hello there
MY_TEST_VAR is 
shell: MY_TEST_VAR = Hello there

I think either modperl_cmd_pass_env() should sync the
vars. as and when it sees one (but this may not be
efficient). Or, modperl_cmd_perldo() should sync
(by calling modperl_env_table_populate() ?) before
doing the eval(). I tried doing this, but couldn't
figure out how to get a pTHX_ !
(The same problem would be applicable to PerlSetEnv as
well, I guess).

Any temporary hacks to fix this, so that I can
continue my testing ?

thx
Sreeji
---
Hi 

It looks like when I @Include a file from a Perl
section, the Perl 

sections in that file get processed first, though
there are other stuff 

before the Perl sections.
Following is an example (simplified from my real-life
config) :

$ cat /tmp/test.conf
Perl 
@Include = /tmp/testvar.conf;
/Perl
Listen 43499

$ cat /tmp/testvar.conf
PerlPassEnv MY_TEST_VAR
Perl 
print MY_TEST_VAR = $ENV{MY_TEST_VAR}\n;
/Perl

$ httpd -X -f /tmp/test.conf
[Sun Jul 06 06:15:09 2003] [warn] Syntax error at
/tmp/testvar.conf:5 Use 

of uninitialized value in concatenation (.) or string
at (eval 3) line 1.

So when an Include is found, all perlsections in that
file are processed. 

However, as in the above case, these Perl sections
could be depending on 

the directives defined previously in the file.
It works if I move the PerlPassEnv to test.conf, above
the Perl section.

Any thoughts ?

thx
Sreeji
(this is 1.99_10-dev on Linux, with httpd-2.0.45)


Want to chat instantly with your online friends?  Get the FREE Yahoo!
Messenger http://uk.messenger.yahoo.com/


Apache::Session::Lock::File hangs under Windows

2003-07-07 Thread Andrew Alakozow
Hello,

This may be OT, but may be not though Apache::Session is widely used under
mod_perl.

Apache::Session::Lock::File hangs under Windows if you try to remove
session or add data to existing session. This happenes because you cannot
flock($self-{fh},
LOCK_EX) if you already has flock($self-{fh}, LOCK_SH) in Windows.

I wrote to Jeffrey Baker a while ago but has no answer.

Possible patch is:

*** File.old Fri Sep 01 21:21:18 2000
--- File.pm Tue Apr 01 16:40:52 2003
***
*** 65,70 
--- 65,72 
  $self-{opened} = 1;
  }

+ if ($^O eq 'MSWin32'  $self-{read}){flock($self-{fh}, LOCK_UN)}
+
  flock($self-{fh}, LOCK_EX);
  $self-{write} = 1;
  }

aa29



Re: Apache::Session::Lock::File hangs under Windows

2003-07-07 Thread Perrin Harkins
On Mon, 2003-07-07 at 07:29, Andrew Alakozow wrote:
 Apache::Session::Lock::File hangs under Windows if you try to remove
 session or add data to existing session. This happenes because you cannot
 flock($self-{fh},
 LOCK_EX) if you already has flock($self-{fh}, LOCK_SH) in Windows.

Under mod_perl 1, there is no need to use locking on Win32 since
mod_perl runs single-threaded there.  This patch might be useful for
mod_perl 2 on Win32, but LOCK_UN is tricky.  Have you seen this?
http://perl.plover.com/yak/flock/samples/slide004.html

- Perrin




Apache::Registry - String Compaction == Less RAM?

2003-07-07 Thread Nigel Hamilton
Hi,
Apache::Registry slurps in your Perl modules as strings and 
then evals them.

I thought I could save some RAM by stripping out comments and
whitespace before the eval step - so I quickly wrote a Registry-like
handler that strips comments.

Alas, the experiment failed - I saw no difference in RAM usage at 
all! 

I suspect that mod_perl is stripping them for me. But isn't a
large string allocated in RAM prior to the eval?

Are there any merits in a comment stripping pre-processing step 
in a Registry-like handler? 


NIge

-- 
Nigel Hamilton
Turbo10 Metasearch Engine

email:  [EMAIL PROTECTED]
tel:+44 (0) 207 987 5460
fax:+44 (0) 207 987 5468

http://turbo10.com  Search Deeper. Browse Faster.



ProxyPass not getting type of dynamic images?

2003-07-07 Thread Kirk Bowe

Hi, I'm doing a naive one size fits all ProxyPass thing wherein I've got
one server simply sitting between the end users and the real machine.  So
my only lines are:

ProxyPass / http://other.server.with.specified.port.com:8082/
ProxyPassReverse / http://other.server.with.specified.port.com:8082/
ProxyReceiveBufferSize 16384

Most of it works fine but I appear to be losing content types.  The
backend server generates pretty much everything in mod_perl and Template
Toolkit.  However I generate PNGs on the fly too, with and without a .png
extension in some cases.  In particular, the PNGs aren't getting through
with a mime type.  Guess I need to set it somewhere -- any ideas?  It all
works fine without the proxy in the middle.

Cheers


Kirk.




Newbie question about mod_perl capabilities

2003-07-07 Thread Walter H. van Holst
Hi,

 I am new to mod_perl and am trying to figure out whether it suits my
needs or not. Can I use it to intercept any http CONNECT requests Apache
receives and answer those?

Regards,

 Walter
-- 
Like almost everyone, I receive a lot of spam every day, much of it
offering to help me get out of debt or get rich quick. It's ridiculous.
(Bill Gates)



Re: Combining authen-handler with mod_auth

2003-07-07 Thread Geoffrey Young

Thanks!

I guess that may be possible, but somewhat problematic since I like to
stay with the distros apache-version. Btw, I remember seeing something
about APR_HOOK_(LAST|FIRST|...) in the docs on perl.apache.org. Not
implemented yet?
I'm not sure what docs you're thinking about, but that change should 
be ok.  I know that I'm using those constants in some XS and all is ok.

I think a lot of interesting password policies could be implemented if
it was possible to run perl-code before and after existing
authentication modules. Is it feasible to add this to the current
mod_perl as a runtime option?
runtime is not likely to be possible.  I'm considering a patch that 
would make the hook behavior configurable as a compile-time option, 
however - modperl_hooks.c is autogenerated during the config process, 
so it should be trivial to change the hook order without folks like 
you needing to patch the code yourself.

--Geoff



Re: require'ing data files under mod_perl

2003-07-07 Thread Peter Ensch
On Thu, Jul 03, 2003 at 05:15:31PM -0400, Perrin Harkins wrote:
 On Thu, 2003-07-03 at 16:59, Peter Ensch wrote:
  OK. Thanks. Well, yes it is being reloaded whenever the form
  is submitted and w/out restarting the server. Here's some of 
  the output (error_log):
  
  [Thu Jul  3 15:52:00 2003] users.dat: users.dat loaded by process 18294 at 
  /opt/a...
 
 

 Just a guess, but maybe this is because you're passing a variable to the
 require function.  Try hard-coding it and see if it changes.
 

This sounded like a good explanation but it wasn't. Hard-coding the 
require'd file didn't make any difference; nor did the assignment to
a variable. In each case the require'd file was reloaded each time
the script was invoked.

It's a mystery!

P

-- 

^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^
Peter Ensch,
[EMAIL PROTECTED]   A-1140   (214) 480 2333
^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^


Re: Apache::Registry - String Compaction == Less RAM?

2003-07-07 Thread Perrin Harkins
On Mon, 2003-07-07 at 11:50, Nigel Hamilton wrote:
   I thought I could save some RAM by stripping out comments and
 whitespace before the eval step - so I quickly wrote a Registry-like
 handler that strips comments.

Those don't take up any space in the actual compiled opcodes.  The only
space you could save is in the string that the file is initially loaded
into and the $eval string that gets built up to pass to eval().

It's probably not worth pursuing, since the savings would be small and
there is a risk of breaking code (parsing perl is hard).  If you want to
see how much it could possibly save, try just stripping a single file
before feeding it to Registry and see how much of a difference that
makes.

   I suspect that mod_perl is stripping them for me.

Nope, it doesn't do anything like that.

  But isn't a
 large string allocated in RAM prior to the eval?

Yes, the $eval string is as large as the full contents of the file.

- Perrin


Re: Newbie question about mod_perl capabilities

2003-07-07 Thread Ged Haywood
Hi there,

On 7 Jul 2003, Walter H. van Holst wrote:

  I am new to mod_perl and am trying to figure out whether it suits my
 needs or not. Can I use it to intercept any http CONNECT requests Apache
 receives and answer those?

The concept of a connection is at the transport level, way below HTTP.
The HTTP protocol simply assumes a reliable transport (you don't even
need an Internet:) and deals with exchanges of messages.  See RFC1945.

Read the Eagle Book (*), for more information about where mod_perl
fits into the scheme of things.  Chapter 3 has a good explanation of
the Apache request cycle.

73,
Ged.

(*) Writing Apache Modules with Perl and C, ISBN 1-56592-567-X



mod_perl-1.99_0.9 on Mac OS X 10.2.6

2003-07-07 Thread Sebastian Riedel
Hi,

I heared a lot of people complaining that they can't get 
mod_perl-1.99_09 running
on Mac OS X. Here is a little scenario that worked for me.

These are the steps:

Sources: Grab the sources from your closest mirrors and untar them.
 If this is the first time you upgrade to 5.8.0, note 
that Apple
 ships 5.6.0 with Mac OS X and both are binary 
incompatible
 to each other, so you might have to rebuild some of 
your modules.

perl-5.8.0.tar.gz
httpd-2.0.45.tar.gz
mod_perl-1.99_09.tar.gz
Perl: Compile Perl with iThreads.

% cd perl-5.8.0
% sh Configure -de -Dusethreads
% make
% make test
% sudo make install
Apache: Compile Apache with MPM worker style

% cd httpd-2.0.45
% ./configure --with-mpm=worker
% make
% sudo make install
mod_perl: Last but not least.

% cd mod_perl-1.99_09
% perl Makefile.PL MP_AP_PREFIX=/usr/local/apache2 
MP_INST_APACHE2=1
 MP_USE_DSO=1 MP_COMPAT_1X=0
% make
% sudo make install

Note: Dont forget to append LoadModule perl_module 
modules/mod_perl.so and
   PerlModule Apache2 to your httpd.conf!!!

Thats it!

Not guaranteed to work for you, here it works fine, at least until now.
There are still lots of tests that fail.
Cheers,
Sebastian Riedel