Re: pod files

2003-08-21 Thread Philippe M. Chiasson
On Fri, 2003-08-08 at 09:48, Stas Bekman wrote:
 ColinB wrote:
  A relatively trivial point, but I notice that the pod files
  
  cgi_to_mod_perl.pod
  mod_perl.pod
  mod_perl_tuning.pod
 
 these files are a history and they don't really exist any longer, other than 
 in the distibution (should probably be removed, Philippe?).

Last modified on : 2000/11/25 by stas himself ;-)

If you say they should be forcibly deprecated, no problem.

A quick grep showed that those documents are still refered to:

cgi_to_mod_perl.pod:
 INSTALL.win32
 SUPPORT

mod_perl.pod:
 faq/mod_perl_cgi.pod
 faq/mod_perl_faq.pod


But if this info has all moved to perl.apache.org, I don't see why I
can't remove those, and update the documentation referring to.

If nobody objects, I'll be changing it tomorrow.

Gozer out.

  which were supplied with mod_perl 1 are missing from mod_perl 2
  (perhaps because they need re-writing?)
 
 They were integrated into the docs at perl.apache.org about 3-4 years ago.
 
  Is it indended to include these in the final mod_perl 2 release?
 
 mod_perl 2.0 comes with its own docs in the docs/ dir.
 
 __
 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
 
 


signature.asc
Description: This is a digitally signed message part


Re: [mp2 Patch] BUG with mod_deflate and $|=1 (20014:Error string not specified)

2003-07-04 Thread Philippe M. Chiasson
On Thu, 2003-07-03 at 01:24, Bill Marrs wrote:
 This fixed the bug for me.

Great! Will commit it in the near future. (Can't seem to access the cvs
server right now, crappy internet cafe)

One thing that could help is if someone could take the time to write a
test for this bug.

Gozer out.

 At 10:48 AM 7/2/2003, you wrote:
   #define mpxs_output_flush(r, rcfg) \
   /* if ($|) */ \
 -if (IoFLUSH(PL_defoutgv)) { \
 +if (bytes  0  IoFLUSH(PL_defoutgv)) { \
   MP_FAILURE_CROAK(modperl_wbucket_flush(rcfg-wbucket, TRUE)); \
   }
 
 


signature.asc
Description: This is a digitally signed message part


Re: [ANNOUNCE] mod_perl-1.28

2003-07-04 Thread Philippe M. Chiasson
On Thu, 2003-07-03 at 15:46, Steve Hay wrote:
 Hi Philippe,
 
 Philippe M. Chiasson wrote:
 
 The URL
 
 http://perl.apache.org/dist/mod_perl-1.28.tar.gz
 
 has entered CPAN
 
 I still get the same test failures that I reported before when RC2 was 
 announced:
 
 modules/request...FAILED tests 3-8
 Failed 6/10 tests, 40.00% okay
 
 Setup: Windows XP, Perl 5.8.0, Apache 1.3.27, Apache-Test 1.03, 
 libapreq-1.2 (built/installed *after* mod_perl 1.28).
 
 I used to have All tests successful under mp-1.27.
 
 (I note that Apache::Reload didn't make it in either; I thought the plan 
 was to put a backport of the version from mp2 into it?)

After discussing this at length with Stas, we decided it would be
simpler to release 1.28 as-is (since it's been almost a year since the
last release) and quicken the release milestone of 1.29 to include
Apache::Reltoad and a whole bunch of other 'controversial' unresolved
issues.

So, Apache::Reload did not make it, but:

1. it is on CPAN
2. Apache::StatINC is still in 
3. mod_perl-1.29 will have Apache::Reload
4. mod_perl-1.29 will be released soon

So, that's what it'll be for now folks !

 Steve
 
 


signature.asc
Description: This is a digitally signed message part


[ANNOUNCE] mod_perl-1.28

2003-07-03 Thread Philippe M. Chiasson
The URL

http://perl.apache.org/dist/mod_perl-1.28.tar.gz

has entered CPAN as

  file: $CPAN/authors/id/G/GO/GOZER/mod_perl-1.28.tar.gz
  size: 375986 bytes
   md5: 889ad726a6d7c2fe03b2b1b93662f515

Changes since 1.27:

Apache::FakeRequest now isa Apache so code that is carefull about
$r and checks that $r-isa('Apache') will not fail [David Wheeler
[EMAIL PROTECTED]

Add Mac OS X support to Apache::SizeLimit [David Wheeler
[EMAIL PROTECTED]]

Add Win32 support to Apache::SizeLimit [Matt Phillips
[EMAIL PROTECTED] and Mohamed Hendawi [EMAIL PROTECTED]]

Change Apache::SizeLimit to not push a cleanup handler if already in
the cleanup handler phase, and adjust docs to show that cleanup
handler is the preferred phase to use [Perrin Harkins
[EMAIL PROTECTED]]

Rename Apache::test to Apache::testold because Apache::test on 
case-insensitive systems will collide with Apache::Test which 
supercedes Apache::test. So if you want to keep on using Apache::test,
either bundle it with your project (putting it under inc/ or t/ so it
won't be installed) or require mod_perl 1.28 and use Apache::testold
instead. Of course the best route is to port your test suite to use
a much better Apache::Test which work with mod_perl 1.0 and 2.0.
[Philippe M. Chiasson, Stas Bekman]

Tweak mod_perl.h to defined _INCLUDE_APACHE_FIRST only after apache
headers were included [Stas Bekman]

avoid various warnings under src/modules/perl/:
- declare bufsiz to be STRLEN in Apache.xs, and add
  STRLEN to Apache/typemap
- add I32 typecast in Constants.xs
- avoid use of unregistered local variables for Win32
  in mod_perl.c and perl_config.c
- s/I32/U8/ in mod_perl.h, perl_config.c, and perl_util.c
- declare i and http_code to be STRLEN in perl_util.c
[Stas Bekman, Randy Kobes]

don't use $r variable in Apache::PerlRun::compile(), so the script
won't use use inherited $r by mistake [Stas Bekman]

define PERL_DIRECTIVE_HANDLERS so that ModuleConfig.c gets
generated when building on Win32 within Visual Studio
[John Petrakis [EMAIL PROTECTED]]

enable PERL_SECTIONS for Win32 [Dirk Maetens [EMAIL PROTECTED]]

use touch() from ExtUtils::Command, rather than a system touch(),
for the benefit of platforms without touch(). [Randy Kobes
[EMAIL PROTECTED]]

can't let the default typemap rule to convert sv into char* in
unescape_url, since it doesn't handle correctly undefs (returns an
unallocated  string, which then causes a segfault in
ap_unescape_url. use SvPV_force, instead, which does the right
thing. [Stas Bekman]

Make sure to start perl, if it's not running, before processing Perl*
directives, with threaded perl and PERL_STACKED_HANDLERS=0 [Stas
Bekman]

Add Apache::Module to Bundle::Apache [Stas Bekman]

use $Config{'installstyle'} instead of hardcoded 'lib', to handle
Makefile.PL's PREFIX option correctly [Philippe M. Chiasson
[EMAIL PROTECTED]]

prevent segfaults in mod_perl_mark_where() when a sub can't get
resolved [Gerald Richter [EMAIL PROTECTED]]

Apache::Status: Need to load B::Terse/TerseSize if it wasn't loaded
yet in that child before using it.  [Dan Sully
[EMAIL PROTECTED]]

document the server_root_relative() method [Stas Bekman
[EMAIL PROTECTED]]

eliminate warnings when flushing functions with empty () prototypes in
Apache::PerlRun::flush_namespace [Yair Lenga [EMAIL PROTECTED]]

fix Apache::Status to not use :: in filenames, which is not allowed on
certain OSs [DH [EMAIL PROTECTED]]

various cygwin fixes [Per Einar Ellefsen [EMAIL PROTECTED]]

fix to compile with 5.8.0 on win32 [Randy Kobes
[EMAIL PROTECTED]]

Document the possible misuses of the Apache::Constant constants
[Per Einar Ellefsen [EMAIL PROTECTED]]

Patches since 1.27 can be reviewed here:

http://www.apache.org/~gozer/mp1/1.27-dev/
-- 
--
Philippe M. Chiasson /gozer\@(cpan|ectoplasm)\.org/ 88C3A5A5 (122FF51B/C634E37B)
http://gozer.ectoplasm.org/F9BF E0C2 480E 7680 1AE5 3631 CB32 A107 88C3 A5A5
Q: It is impossible to make anything foolproof because fools are so ingenious.
perl -e'$$=\${gozer};{$_=unpack(P7,pack(L,$$));/^JAm_pH\n$/print||$$++redo}'


signature.asc
Description: This is a digitally signed message part


Re: Installation Problem

2003-07-02 Thread Philippe M. Chiasson
On Wed, 2003-06-18 at 06:26, Ankur Jain wrote:
 Hi,
   I have RHL 8.0 and Apache2.0 running and perl
 5.8.0. I am trying to install the modperl2.0 It's
 going fine till the make procedure but when I run the
 make test it prompts that no test server configured
 please specify a httpd or apxs or put either in your
 path. Eg: t/TEST -httpd /path/to/bin/httpd
 
 I tried that and it ended with an error server
 server_name:8529 error running tests please examine
 t/logs/error_log.
 
 The error_log file contains the following error:
 
 failed to resolve handler 'TestHooks::trans' and
 several others.

This is often a symptom of building and running tests as root.

 Please tell me what could be the issue??
 
 Thank you.
 
 
 __
 Do you Yahoo!?
 SBC Yahoo! DSL - Now only $29.95 per month!
 http://sbc.yahoo.com
 



Re: mod_perl-1.99_09 for Redhat 9

2003-07-02 Thread Philippe M. Chiasson
On Thu, 2003-06-26 at 06:53, Bill Marrs wrote:
 I'm looking for a Redhat 9 compatible mod_perl-1.99_09 rpm.
 
 If anyone has one or knows where I can get one, let me know.

I've just finished building RPMs for mod_perl 1.99_09 on RH9/i386

Grab them at:

http://www.apache.org/~gozer/mp2/

 Thanks,
 
 -bill
 
 p.s.  I did find a Rawhide (bleeding edge Red Hat release, I think) 
 mod_perl-1.99_09, but it doesn't seem to be compatible (I got an error from 
 Apache).
 
 


signature.asc
Description: This is a digitally signed message part


[mp2 Patch] BUG with mod_deflate and $|=1 (20014:Error string not specified)

2003-07-02 Thread Philippe M. Chiasson
Seems to be a problem with calling IoFLUSH() on an already flushed
handle.

This patch seems to fix it for me.

Index: xs/Apache/RequestIO/Apache__RequestIO.h
===
RCS file: /home/cvs/modperl-2.0/xs/Apache/RequestIO/Apache__RequestIO.h,v
retrieving revision 1.37
diff -u -I$Id -r1.37 Apache__RequestIO.h
--- xs/Apache/RequestIO/Apache__RequestIO.h 14 Mar 2003 05:33:19 -  1.37
+++ xs/Apache/RequestIO/Apache__RequestIO.h 2 Jul 2003 14:46:37 -
@@ -22,7 +22,7 @@
 
 #define mpxs_output_flush(r, rcfg) \
 /* if ($|) */ \
-if (IoFLUSH(PL_defoutgv)) { \
+if (bytes  0  IoFLUSH(PL_defoutgv)) { \
 MP_FAILURE_CROAK(modperl_wbucket_flush(rcfg-wbucket, TRUE)); \
 }
 



On Wed, 2003-07-02 at 22:18, Bill Marrs wrote:
 When I use Apache 2.0.46, mod_deflate with mod_perl-1.99_09 (or the latest 
 mod_perl-2.0 CVS), perl buffering is off ($|=1), and my perl script prints 
 nothing (e.g. 'print ;'), I get the following error:
 
 [Wed Jul 02 10:10:00 2003] [error] 19513: ModPerl::RegistryBB: 20014:Error 
 string not specified yet at /var/www/perl/test.pl line 6.
 
 If I switch to running the script under mod_cgi or if I remove the $|=1; 
 line, I do not get an error.
 
 Here is my script:
 
 #!/usr/bin/perl
 $|=1;
 print Content-Type: text/html\n\n;
 print hello worldP;
 # This line causes the error
 print ;
 
 httpd.conf snipit:
 
 Alias /perl/ /var/www/perl/
 Location /perl
AddOutputFilterByType DEFLATE text/*
SetOutputFilter DEFLATE
AllowOverride  None
SetHandler perl-script
PerlHandlerModPerl::RegistryBB
PerlSendHeader On
Options+ExecCGI
 /Location
 
 I've worked-around this problem by changing my print  to print  .  It's 
 not a major issue for me, I'm just letting you know.  Let me know if you 
 need any more info.
 
 -bill
 
 


signature.asc
Description: This is a digitally signed message part


RE: Apache::Request for CGI? (was: Re: A::Registry vs. mod_perlhandler philosophy)

2003-07-02 Thread Philippe M. Chiasson
On Wed, 2003-07-02 at 22:36, Jesse Erlbaum wrote:
 Hi Joe --
 
  +1.  Scripting _inside_ the server opens up possibilities that
  are unimaginable to folks who are content confining themselves 
  to the lowest common denominator (CGI).
 
 Perhaps you could bullet-point a few of these possibilities for those of
 us who are confined by our lack of imagination?

Check out the guide:

http://perl.apache.org/guide/

Check out the books:

http://perl.apache.org/docs/offsite/books.html

Check out the success stories:

http://perl.apache.org/outstanding/success_stories/index.html

 
 TTYL,
 
 -Jesse-
 
 
 --
 
   Jesse Erlbaum
   The Erlbaum Group
   [EMAIL PROTECTED]
   Phone: 212-684-6161
   Fax: 212-684-6226
 
 
 
 


signature.asc
Description: This is a digitally signed message part


Re: [mp1] 1.28 release candidate #2

2003-06-26 Thread Philippe M. Chiasson
On Wed, 2003-06-25 at 16:32, Steve Hay wrote:
 Hi Philippe,
 
 Philippe M. Chiasson wrote:
 
 On Wed, 2003-06-25 at 00:12, Steve Hay wrote:
   
 
 Philippe M. Chiasson wrote:
 [...]
 
 
 If you feel like submitting a back-port of Apache::Reload (with or
 without my new namespace deletion code), that has a few decents tests
 for it and works with perl 5.5.3 up to bleadperl, I would be happy to
 slip it into mp 1.28 with a version of 1.0_0 or similar to make sure
 CPAN won't be fooled into installing it for now. Just noticed there is
 Apache::Reload 0.07 on CPAN, so it would be safe.
 
   
 
 The last patch that I submitted 
 (http://marc.theaimsgroup.com/?l=apache-modperl-devm=105595499417788w=2) 
 almost fits the bill -- just remove the if (MOD_PERL2) stuff at the 
 top for a mp1-only version.
 
 However, that uses the B module, which is only available from 5.005_03 
 up.  That's all that you're asking for above, but when I previously 
 pointed out that the current mp1 Makefile.PL specifies 5.003_97 up (in 
 general, different on Win32/cygwin), you said that you didn't want to 
 have to up the minimum requirement to 5.005_03.
 
 I also currently have no idea how to write tests for Apache modules and 
 I'm unlikely to learn in the next couple of days, so unless you're happy 
 with a 5.005_03 requirement for Apache::Reload and either don't mind 
 having no tests or else can write some yourself then it looks like I'll 
 have to wait until 1.29.
 
 
 
 Here is what I think I am going to do in light of all this and a high
 level of cafeeine...
 
 Take Apache::Reload from mp2 as-is (it's 0.9), and mod_perl1-ify it.
 
 Dump it in mod_perl 1
 
 Change it's version number to 0.8_1 so CPAN won't pick it up.
 
 Release 1.28 (eventually...)
 
 Then work on the added functionnality for Apache::Reload and solve all
 other issues of dependencies on B, ModPerl::Util::symbol_undef_code,
 etc.
 
 Good idea!  We've had so many ideas flying around about how to implement 
 the new UndefOnReload feature and where to put the code that I'd 
 completely forgotten that there is an existing module that already works 
 (without that feature)!  Getting that into mp1 as a first step is an 
 excellent move.

So I'll do exactly that !

 
 I don't want this issue to slow down the long-awaited release of 1.28.
 But at the same time , StatINC is quite old and users of mp1 should be
 'motivated' to upgrade to Apache::Reload, so it makes sense to go in mp1
 as well.
 
 Maybe for 1.29 we could even talk about deprecating/removing
 Apache::StatINC alltogether, for example.
 
 I expect there would be some objections to removing Apache::StatINC 
 altogether (at least for while yet).  Deprecating it is certainly a good 
 idea once the UndefOnReload option is added to Apache::Reload; until 
 then, some may actually prefer Apache::StatINC.

I am aware of that. I was pointing a possibility I would consider if I
were to be RM for 1.29 ;-)

 Steve
-- 

Philippe M. Chiasson /gozer\@(cpan|ectoplasm)\.org/ 88C3A5A5 (122FF51B/C634E37B)
http://gozer.ectoplasm.org/F9BF E0C2 480E 7680 1AE5 3631 CB32 A107 88C3 A5A5
Q: It is impossible to make anything foolproof because fools are so ingenious.
perl -e'$$=\${gozer};{$_=unpack(P7,pack(L,$$));/^JAm_pH\n$/print||$$++redo}'



signature.asc
Description: This is a digitally signed message part


Re: [mp1] 1.28 release candidate #2

2003-06-25 Thread Philippe M. Chiasson
On Wed, 2003-06-25 at 00:12, Steve Hay wrote:
 Philippe M. Chiasson wrote:
 [...]
 If you feel like submitting a back-port of Apache::Reload (with or
 without my new namespace deletion code), that has a few decents tests
 for it and works with perl 5.5.3 up to bleadperl, I would be happy to
 slip it into mp 1.28 with a version of 1.0_0 or similar to make sure
 CPAN won't be fooled into installing it for now. Just noticed there is
 Apache::Reload 0.07 on CPAN, so it would be safe.
 
 The last patch that I submitted 
 (http://marc.theaimsgroup.com/?l=apache-modperl-devm=105595499417788w=2) 
 almost fits the bill -- just remove the if (MOD_PERL2) stuff at the 
 top for a mp1-only version.
 
 However, that uses the B module, which is only available from 5.005_03 
 up.  That's all that you're asking for above, but when I previously 
 pointed out that the current mp1 Makefile.PL specifies 5.003_97 up (in 
 general, different on Win32/cygwin), you said that you didn't want to 
 have to up the minimum requirement to 5.005_03.
 
 I also currently have no idea how to write tests for Apache modules and 
 I'm unlikely to learn in the next couple of days, so unless you're happy 
 with a 5.005_03 requirement for Apache::Reload and either don't mind 
 having no tests or else can write some yourself then it looks like I'll 
 have to wait until 1.29.

Here is what I think I am going to do in light of all this and a high
level of cafeeine...

Take Apache::Reload from mp2 as-is (it's 0.9), and mod_perl1-ify it.

Dump it in mod_perl 1

Change it's version number to 0.8_1 so CPAN won't pick it up.

Release 1.28 (eventually...)

Then work on the added functionnality for Apache::Reload and solve all
other issues of dependencies on B, ModPerl::Util::symbol_undef_code,
etc.

I don't want this issue to slow down the long-awaited release of 1.28.
But at the same time , StatINC is quite old and users of mp1 should be
'motivated' to upgrade to Apache::Reload, so it makes sense to go in mp1
as well.

Maybe for 1.29 we could even talk about deprecating/removing
Apache::StatINC alltogether, for example.


 Steve
 
 
 I guess for now the simplest thing would be to _strictly_ backwards port
 Apache::Reload with no mp2 specific code in there, just so it can be
 shipped in 1.28, then in the 1.29-dev cycle, I can worry about getting
 it either on CPAN or synced between both mp1 and mp2, as per the ongoign
 discussion with you and Stas on the matter.
 
 So, if you feel you can whip up a complete patch within the next few
 days, go for it. Otherwise, I'll delay this for inclusion in 1.29 (and
 remember, I would target that one quite soon after 1.28)
 
 Gozer out.
 
 
   
 
 Steve
 
 
-- 

Philippe M. Chiasson /gozer\@(cpan|ectoplasm)\.org/ 88C3A5A5 (122FF51B/C634E37B)
http://gozer.ectoplasm.org/F9BF E0C2 480E 7680 1AE5 3631 CB32 A107 88C3 A5A5
Q: It is impossible to make anything foolproof because fools are so ingenious.
perl -e'$$=\${gozer};{$_=unpack(P7,pack(L,$$));/^JAm_pH\n$/print||$$++redo}'



signature.asc
Description: This is a digitally signed message part


[mp1] 1.28 release candidate #2

2003-06-24 Thread Philippe M. Chiasson
Now bringing you the second mod_perl 1.28 release candidate. It can be
downloaded here:

http://www.apache.org/~gozer/mp1/mod_perl-1.27_01-dev-rc2.tar.gz

MD5  : 90e339d8d8131df518e7ecb66a45693d
SHA1 : eeafa156777623326edc056aad6940abf698e785

What has changed since RC #1 :

+ Add Mac OS X support to Apache::SizeLimit
+ Apache::FakeRequest now isa Apache so code that is careful about
$r and checks that $r-isa('Apache') will not fail

What has changed since 1.27 can be reviewed here:

http://marc.theaimsgroup.com/?l=apache-modperl-devm=105513561720441w=2

A more detailed review of each patch included in this release candidate
can be found here:

http://www.apache.org/~gozer/mp1/1.27-dev/

Please give this release a spin and report back any problems or failed tests to:
[EMAIL PROTECTED] as soon as possible. The more platforms  configurations, the
merrier!

RC1 has received a relatively low volume of tests, but all of them were positive,
So unless an important bug is reported soon, this will most likely be mod_perl 1.28.

Thank you, and tests away!


Philippe M. Chiasson /gozer\@(cpan|ectoplasm)\.org/ 88C3A5A5 (122FF51B/C634E37B)
http://gozer.ectoplasm.org/F9BF E0C2 480E 7680 1AE5 3631 CB32 A107 88C3 A5A5
Q: It is impossible to make anything foolproof because fools are so ingenious.
perl -e'$$=\${gozer};{$_=unpack(P7,pack(L,$$));/^JAm_pH\n$/print||$$++redo}'

-BEGIN PGP SIGNATURE-
Version: GnuPG v1.2.1 (GNU/Linux)

iD8DBQA++FtzyzKhB4jDpaURAkdrAJ0W3IhOQG6bsYOJAOp+HnwxCN6GRACfdass
J3nVYrAiY5ElPf9DCrk6/Wk=
=sDbB
-END PGP SIGNATURE-


signature.asc
Description: This is a digitally signed message part


Re: [mp1] 1.28 release candidate #2

2003-06-24 Thread Philippe M. Chiasson
On Tue, 2003-06-24 at 23:00, Steve Hay wrote:
 Philippe M. Chiasson wrote:
 
 Now bringing you the second mod_perl 1.28 release candidate.
 [snip]
 Please give this release a spin and report back any problems or failed tests to:
 [EMAIL PROTECTED] as soon as possible. The more platforms  configurations, the
 merrier!
 
 Windows XP, Apache 1.3.27, Perl 5.8.0:
 
 Failed Test   Stat Wstat Total Fail  Failed  List of Failed
 ---
 modules/request.t   106  60.00%  3-8

Is it possible that you have an older version of Apache::Request lying
around that was not recompiled against this new mod_perl ? (hapenned to
me more than once)

What's in the error_log?

 Philippe: Is the Apache::Reload stuff not going to make it into 1.28?  I 
 think it would be well worth waiting a little longer for 1.28 if that 
 could make it in.

Well, maybe, maybe not. In any case, I am planning to go at a mp 1.29
release fairly soon after 1.28 hits the decks. There are still quite a
few itty-gritty bugs I want to hammer out of mod_perl 1, but that are
yet a bit too touchy to roll up in a release without letting the CVS
user some time to see it work/break for them.

If you feel like submitting a back-port of Apache::Reload (with or
without my new namespace deletion code), that has a few decents tests
for it and works with perl 5.5.3 up to bleadperl, I would be happy to
slip it into mp 1.28 with a version of 1.0_0 or similar to make sure
CPAN won't be fooled into installing it for now. Just noticed there is
Apache::Reload 0.07 on CPAN, so it would be safe.

I guess for now the simplest thing would be to _strictly_ backwards port
Apache::Reload with no mp2 specific code in there, just so it can be
shipped in 1.28, then in the 1.29-dev cycle, I can worry about getting
it either on CPAN or synced between both mp1 and mp2, as per the ongoign
discussion with you and Stas on the matter.

So, if you feel you can whip up a complete patch within the next few
days, go for it. Otherwise, I'll delay this for inclusion in 1.29 (and
remember, I would target that one quite soon after 1.28)

Gozer out.


 Steve
-- 

Philippe M. Chiasson /gozer\@(cpan|ectoplasm)\.org/ 88C3A5A5 (122FF51B/C634E37B)
http://gozer.ectoplasm.org/F9BF E0C2 480E 7680 1AE5 3631 CB32 A107 88C3 A5A5
Q: It is impossible to make anything foolproof because fools are so ingenious.
perl -e'$$=\${gozer};{$_=unpack(P7,pack(L,$$));/^JAm_pH\n$/print||$$++redo}'



signature.asc
Description: This is a digitally signed message part


Re: [SEMI-OT] perl_tie_hash valid reference?

2003-06-23 Thread Philippe M. Chiasson
On Wed, 2003-06-18 at 11:48, dorian wrote:
 greetings all,
 
 i was wondering if anyone could tell me if the function perl_tie_hash
 in perl_util.c in the mod_perl 1.27 source could be considered
 usual reference material for binding a table-like object to a
 hash(ref) in XS? if not, perchance someone could point me at some
 literature (or source) on the subject?

Yes, or even more authoritative example can be found in man perlguts
SV *mytie() {
   HV *hash;
   HV *stash;
   SV *tie;
   hash = newHV();
   tie = newRV_noinc((SV*)newHV());
   stash = gv_stashpv(MyTie, TRUE);
   sv_bless(tie, stash);
   hv_magic(hash, (GV*)tie, PERL_MAGIC_tied);
   newRV_noinc(hash);
   return hash;
}


 thanks in advance,
 
 .dorian
-- 

Philippe M. Chiasson /gozer\@(cpan|ectoplasm)\.org/ 88C3A5A5 (122FF51B/C634E37B)
http://gozer.ectoplasm.org/F9BF E0C2 480E 7680 1AE5 3631 CB32 A107 88C3 A5A5
Q: It is impossible to make anything foolproof because fools are so ingenious.
perl -e'$$=\${gozer};{$_=unpack(P7,pack(L,$$));/^JAm_pH\n$/print||$$++redo}'



signature.asc
Description: This is a digitally signed message part


Re: handler($$) unreliability

2003-06-15 Thread Philippe M. Chiasson
On Sat, 2003-06-14 at 04:35, Matthew Pressly wrote:
 I have handler that looks like this:
 
 sub handler ($$) {
   my ($class, $apache) =3D @_;
   Apache::request($apache);
   $apache-status(200); # Default
 
   #.
 }

This could be related to a recently discovered bug in
mp_preload_module(), see
http://marc.theaimsgroup.com/?t=10553271073r=1w=2
for the original report.

 The vast majority of the time, this works fine.  Every now
 and then, usually after the apache server has been up
 for a while, and usually under substantial load,
 it appears that the handler in one child process starts
 being called as if it did not have the prototype.
 That is, $apache ($r) is in $_[0] instead of $_[1],
 and I get messages like this:
 
 [Fri Jun 13 06:00:06 2003] [error] Can't call method status on an undefin=
 ed
 +value at Project/Control.pm line 116.

Does this happen only once per child, or does the affected child behaves
like that for each and every request to that handler?

 And things quit working because $apache is not set properly.
 
 A server restart clears this up.  This is a perl5.6.0
 DSO build of mod_perl/apache (1.27), but I am fairly certain I
 have also seen this occur on a static mod_perl/apache.
 
 Any ideas on what causes this or a good way to track it down?

One thing that can fix this problem, if it's indeed caused by
mp_preload_module, would be to make sure to preload that module
with a PerlModule My::Class in your httpd.conf

 --
 Matthew Pressly
 
-- 

Philippe M. Chiasson /gozer\@(cpan|ectoplasm)\.org/ 88C3A5A5 (122FF51B/C634E37B)
http://gozer.ectoplasm.org/F9BF E0C2 480E 7680 1AE5 3631 CB32 A107 88C3 A5A5
Q: It is impossible to make anything foolproof because fools are so ingenious.
perl -e'$$=\${gozer};{$_=unpack(P7,pack(L,$$));/^JAm_pH\n$/print||$$++redo}'



signature.asc
Description: This is a digitally signed message part


RE: PerlOptions Clone/Parent in mp2

2003-06-13 Thread Philippe M. Chiasson
On Thu, 2003-06-12 at 02:59, Marc M. Adkins wrote:
   The code to implement blocks (e.g. TIPool.../TIPool) in
  config files is
   pretty gnarly, too.  I know it's already there for Perl, it's
  one of the
   places I looked when I was considering doing one of my own and
  wanted to see
   an example.  The Apache framework is pretty strong for putting in new
   directives, but not so much for adding new blocks.
 
  Actually you can't quite do that in a 3rd party module. Currently
  the pools
  are internal to mod_perl. Making this customizable will require
  adding hooks
  to the internal tipool mechanism. When I wrote the above
  pseudo-config I was
  suggesting an internal support for these.
 
 I was actually not figuring to do it myself. ;)
 
 I was commenting on the code required to implement things like Perl or
 TIPool.  I've since queried the httpd-dev list and the 'official' example
 is in the source for mod_proxy (with a caveat that a three-pass config file
 parser may necessitate further changes at some point).  It appears to be a
 lot simpler than the parsing that mod_perl is doing.  I was wondering...is
 there a specific reason mod_perl implements Perl the way it does or is it
 just code inertia?

With something like a Proxy http://foo/*/Proxy block, mod_proxy does
the right thing ( and the simple ) of using the power of
ap_walk_config() to handler the parsing of the contents of the block.

You might want to do the same thing for something like TiPool,
allowing things like

Server
MaxTiPoolConn 10
TiPoll special
 MaxTiPoolConn 20
/TiPool

And have each directive in the TiPool block be handled like regular
apache directive with all the cool benefits of configuration merging,
etc.

Reason Perl blocks can't do that is becasue we can't let httpd try and
parse perl code and make any sense of it. If you look closely, a Perl
block simply slurps all its contents and feeds it to perl for
processing.

Hope this makes sense.

 mma
-- 

Philippe M. Chiasson /gozer\@(cpan|ectoplasm)\.org/ 88C3A5A5 (122FF51B/C634E37B)
http://gozer.ectoplasm.org/F9BF E0C2 480E 7680 1AE5 3631 CB32 A107 88C3 A5A5
Q: It is impossible to make anything foolproof because fools are so ingenious.
perl -e'$$=\${gozer};{$_=unpack(P7,pack(L,$$));/^JAm_pH\n$/print||$$++redo}'



signature.asc
Description: This is a digitally signed message part


[mp1] 1.28 release candidate #1

2003-06-08 Thread Philippe M. Chiasson
Finally, the first mod_perl 1.28 release candidate #1 has arrived. It
can be downloaded here:

http://www.apache.org/~gozer/mp1/mod_perl-1.27_01-dev-rc1.tar.gz

MD5 : ad64dfdb4f5b056b00d87288ef31bd56
SHA1: 03409c6f44c408acae44a258fe4e59b408c0040f

The summary of what has changed since 1.27 are (from STATUS):

Add Win32 support to Apache::SizeLimit [Matt Phillips
[EMAIL PROTECTED] and Mohamed Hendawi [EMAIL PROTECTED]]

Change Apache::SizeLimit to not push a cleanup handler if already in
the cleanup handler phase, and adjust docs to show that cleanup
handler is the preferred phase to use [Perrin Harkins
[EMAIL PROTECTED]]

Rename Apache::test to Apache::testold because Apache::test on 
case-insensitive systems will collide with Apache::Test which 
supercedes Apache::test. So if you want to keep on using Apache::test,
either bundle it with your project (putting it under inc/ or t/ so it
won't be installed) or require mod_perl 1.28 and use Apache::testold
instead. Of course the best route is to port your test suite to use
a much better Apache::Test which work with mod_perl 1.0 and 2.0.
[Philippe M. Chiasson, Stas Bekman]

Tweak mod_perl.h to defined _INCLUDE_APACHE_FIRST only after apache
headers were included [Stas Bekman]

avoid various warnings under src/modules/perl/:
- declare bufsiz to be STRLEN in Apache.xs, and add
  STRLEN to Apache/typemap
- add I32 typecast in Constants.xs
- avoid use of unregistered local variables for Win32
  in mod_perl.c and perl_config.c
- s/I32/U8/ in mod_perl.h, perl_config.c, and perl_util.c
- declare i and http_code to be STRLEN in perl_util.c
[Stas Bekman, Randy Kobes]

don't use $r variable in Apache::PerlRun::compile(), so the script
won't use use inherited $r by mistake [Stas Bekman]

define PERL_DIRECTIVE_HANDLERS so that ModuleConfig.c gets
generated when building on Win32 within Visual Studio
[John Petrakis [EMAIL PROTECTED]]

enable PERL_SECTIONS for Win32 [Dirk Maetens [EMAIL PROTECTED]]

use touch() from ExtUtils::Command, rather than a system touch(),
for the benefit of platforms without touch(). [Randy Kobes
[EMAIL PROTECTED]]
 
can't let the default typemap rule to convert sv into char* in
unescape_url, since it doesn't handle correctly undefs (returns an
unallocated  string, which then causes a segfault in
ap_unescape_url. use SvPV_force, instead, which does the right
thing. [Stas Bekman]

Make sure to start perl, if it's not running, before processing Perl*
directives, with threaded perl and PERL_STACKED_HANDLERS=0 [Stas
Bekman]

Add Apache::Module to Bundle::Apache [Stas Bekman]

use $Config{'installstyle'} instead of hardcoded 'lib', to handle
Makefile.PL's PREFIX option correctly [Philippe M. Chiasson
[EMAIL PROTECTED]]

prevent segfaults in mod_perl_mark_where() when a sub can't get
resolved [Gerald Richter [EMAIL PROTECTED]]

Apache::Status: Need to load B::Terse/TerseSize if it wasn't loaded
yet in that child before using it.  [Dan Sully [EMAIL PROTECTED]]

document the server_root_relative() method [Stas Bekman [EMAIL PROTECTED]]

eliminate warnings when flushing functions with empty () prototypes in
Apache::PerlRun::flush_namespace [Yair Lenga [EMAIL PROTECTED]]

fix Apache::Status to not use :: in filenames, which is not allowed on
certain OSs [DH [EMAIL PROTECTED]]

various cygwin fixes [Per Einar Ellefsen [EMAIL PROTECTED]]

fix to compile with 5.8.0 on win32 [Randy Kobes [EMAIL PROTECTED]]

Document the possible misuses of the Apache::Constant constants
[Per Einar Ellefsen [EMAIL PROTECTED]]

--

A more detailled review of each patch included in this release candidate can be found 
here:
http://www.apache.org/~gozer/mp1/1.27-dev/

Please give this release a spin and report back any problems or failed tests to:
[EMAIL PROTECTED] as soon as possible. The more platforms  configurations, the
merrier!

Thank you!

-- 
-- -
Philippe M. Chiasson /gozer\@(cpan|ectoplasm)\.org/ 88C3A5A5 (122FF51B/C634E37B)
http://gozer.ectoplasm.org/F9BF E0C2 480E 7680 1AE5 3631 CB32 A107 88C3 A5A5
Q: It is impossible to make anything foolproof because fools are so ingenious.
perl -e'$$=\${gozer};{$_=unpack(P7,pack(L,$$));/^JAm_pH\n$/print||$$++redo}'
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.2.1 (GNU/Linux)

iD8DBQA+5BRtyzKhB4jDpaURAuoOAJ9G1hIWGKHJxdidMrPBvyuRCawTSQCcDnvp
xxhgPZh8Rir59NYKXIQmyJI=
=zZNt
-END PGP SIGNATURE-


signature.asc
Description: This is a digitally signed message part


Re: [mp2] httpd.conf Perl block problems

2003-05-29 Thread Philippe M. Chiasson
On Thu, 2003-05-29 at 05:24, Warren Young wrote:
 Geoffrey Young wrote:
  
  sensitive to the syntax of the Perl tag: they require a space in it, 
  
  this is due to a limitation of apache 2.0.  there _may_ be a way around 
  it, but probably not any time soon.
 
 I can live with that.  It's good enough to know that you (plural) aren't 
 thrilled with it, either, and intend to fix it some day.  :)

Oy! Indeed. I am the guilty person to blame for not having fixed it
quite yet. And yes, we are all very much aware of it ;-( But I am happy
to say : It's httpd's fault!.

  try this patch, which was introduced after 1.99_09
 [snip]
  +use Apache::Const -compile = qw(OK);
 
 Without trying it, I'm sure that line will fix the error I'm seeing. 
 I'd try it, but my RH9 box can't be disturbed at the moment.
 
 Thanks!
-- 
-- -
Philippe M. Chiasson /gozer\@(cpan|ectoplasm)\.org/ 88C3A5A5 (122FF51B/C634E37B)
http://gozer.ectoplasm.org/F9BF E0C2 480E 7680 1AE5 3631 CB32 A107 88C3 A5A5
Q: It is impossible to make anything foolproof because fools are so ingenious.
perl -e'$$=\${gozer};{$_=unpack(P7,pack(L,$$));/^JAm_pH\n$/print||$$++redo}'


signature.asc
Description: This is a digitally signed message part


Re: irc

2001-12-27 Thread Philippe M. Chiasson

On Wed, Dec 26, 2001 at 11:07:46PM -0800, brian moseley wrote:
 On Wed, 26 Dec 2001, Philippe M. Chiasson wrote:
 
  I am usually on rhizomatic, and #mod_perl sounds pretty
  good to me.
 
 there's folks on both #mod_perl and #modperl. let's drop
 #mod_perl, cos the other is easier to type.
 
 who runs rhizomatic? do they have a standard channel
 registration process? can somebody in the know make that all
 happen?

Leon Brocard is taking care of a big part of it, I'll drop
him a note about this, but I am not sure there is really
a process for anything on rhizomatic

 sweet!
 



Philippe M. Chiasson /gozer\@(cpan|ectoplasm)\.org/ 88C3A5A5 (122FF51B/C634E37B)
http://gozer.ectoplasm.org/F9BF E0C2 480E 7680 1AE5 3631 CB32 A107 88C3 A5A5
Q: It is impossible to make anything foolproof because fools are so ingenious.
perl -e'$$=\${gozer};{$_=unpack(P7,pack(L,$$));/^JAm_pH\n$/print||$$++redo}'



msg23836/pgp0.pgp
Description: PGP signature


Re: irc

2001-12-26 Thread Philippe M. Chiasson

On Sat, Dec 22, 2001 at 07:40:06PM +0100, Thomas Eibner wrote:
 On Sat, Dec 22, 2001 at 12:25:51PM -0800, Cure wrote:
  On irc.dal.net, theres a #mod_perl, Nobody goes there anyomore, But we all
  could start joining it.
 
 Please, no more networks =) I think something like #modperl would be
 appropriate on rhizomatic, but it's not up to me.

I am usually on rhizomatic, and #mod_perl sounds pretty good to me.

 -- 
   Thomas Eibner http://thomas.eibner.dk/ DnsZone http://dnszone.org/
   mod_pointer http://stderr.net/mod_pointer 
 



Philippe M. Chiasson /gozer\@(cpan|ectoplasm)\.org/ 88C3A5A5 (122FF51B/C634E37B)
http://gozer.ectoplasm.org/F9BF E0C2 480E 7680 1AE5 3631 CB32 A107 88C3 A5A5
Q: It is impossible to make anything foolproof because fools are so ingenious.
perl -e'$$=\${gozer};{$_=unpack(P7,pack(L,$$));/^JAm_pH\n$/print||$$++redo}'



msg23828/pgp0.pgp
Description: PGP signature


Re: cvs commit: modperl-2.0/ModPerl-Registry/t .cvsignore

2001-10-17 Thread Philippe M. Chiasson

On Thu, Oct 18, 2001 at 12:35:06PM +0800, Stas Bekman wrote:
 [EMAIL PROTECTED] wrote:
 
  stas01/10/17 21:25:12
  
Modified:ModPerl-Registry/t .cvsignore
Added:   ModPerl-Registry .cvsignore
Log:
- cvsignore files
 
 
 Any idea why I don't get the
 
Submitted by:
 
 and other commit headers while doing cvs commit under this dir?
 
 Philippe has submitted this patch, but I had no place to indicate this. 
 Sorry Philippe

Oh, this is not quite terrible, .cvsignore patch isn't very sexy or important
for posterity !

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

-- 
Philippe M. Chiasson  [EMAIL PROTECTED]
  Extropia's Resident System Guru
 http://www.eXtropia.com/

/* Am I fucking pedantic or what? */ 
-- Linux2.2.16
/usr/src/linux/drivers/scsi/qlogicpti.h

perl -e '$$=\${gozer};{$_=unpack(P26,pack(L,$$));/^Just Another Perl 
Hacker!\n$/print||$$++redo}'

 PGP signature


Re: [ANNOUNCE] TicketMaster.com sponsors mod_perl development

2001-09-20 Thread Philippe M . Chiasson

On Fri, Sep 21, 2001 at 01:28:53AM +0800, Stas Bekman wrote:
 If you remember back in the end of April, I've posted to the list an
 unusual job seek request [1], where I was saying that I want some
 company to sponsor me to work full time on mod_perl 2.0 development.
 
 Believe it or not my unusual request has been answered by Craig McLane
 from TicketMaster.com (which owns citysearch.com).
 
 citysearch.com is a heavy user of mod_perl technology and interested in 
 making sure that mod_perl technology get more and more mature and ensure
 their business' success.
 
 So starting from this September I'm working on mod_perl 2.0
 development, a new documentation project (which you are welcome to
 join) and doing mod_perl advocacy through teaching at the conferences
 and other ways.
 
 Currently the contract is for one year. But if everything goes well,
 and mod_perl 2.0 rocks the world even better than 1.x did we will see
 more support and sponsoring from TicketMaster.
 
 This email's purpose:
 
 - is to set a precedent for other business to sponsor mod_perl and
related technologies. There are at least a few excellent developers
that I know will jump on the opportunity of being able to do what
they love full time.
 
 - is to set a precedent for other developers to seek what they really
want and read less stories about hi-tech recession, since good
developers are always in demand. Therefore I hope that this email
will encourage you to do that.

Hip Hip Hurray ! for Stas !
 
 Notes:
 
[1] http://forum.swarthmore.edu/epigone/modperl/runvesay
 
 _
 Stas Bekman  JAm_pH --   Just Another mod_perl Hacker
 http://stason.org/   mod_perl Guide  http://perl.apache.org/guide
 mailto:[EMAIL PROTECTED]   http://apachetoday.com http://eXtropia.com/
 http://singlesheaven.com http://perl.apache.org http://perlmonth.com/
 
 

-- 
++
| Philippe M. Chiasson  [EMAIL PROTECTED] |
++
| F9BF E0C2 480E 7680 1AE5  3631 CB32 A107 88C3 A5A5 |
++
gethostent not implemented : Your C library apparently
doesn't implement gethostent(), probably because if it did,
it'd feel morally obligated to return every hostname on the
Internet. 
-- perldiag(1)

perl -e '$$=\${gozer};{$_=unpack(P26,pack(L,$$));/^Just Another Perl 
Hacker!\n$/print||$$++redo}'

 PGP signature


Re: Can't build (was Re: Apache.pm fails to load...)

2001-09-17 Thread Philippe M . Chiasson

On Mon, Sep 17, 2001 at 08:02:02PM +0800, Stas Bekman wrote:
 U n d e r a c h i e v e r wrote:
 
  --- Stas Bekman [EMAIL PROTECTED] wrote:
  
 mod_perl guide is your friend:
 
 
 
  http://perl.apache.org/guide/install.html#mod_perl_and_mod_ssl_openssl
  
  thanks for the tip, but that doesn't work for me. following the
  instructions on the page, i find i get the following errors after the
  'make' in 'mod_perl'. here's the error:-
  
  ld.so.1: ./gen_test_char: fatal: libssl.so.0: open failed: No such file
  or dire
  *** Error code 137
  make: Fatal error: Command failed for target Test_char.h'
  Current working directory /export/home/gary/apache_1.3.20/src/main
  *** Error code 1
  make: Fatal error: Command failed for target Subdirs'
  Current working directory /export/home/gary/apache_1.3.20/src
  *** Error code 1
  make: Fatal error: Command failed for target Build-std'
  Current working directory /export/home/gary/apache_1.3.20
  *** Error code 1
  make: Fatal error: Command failed for target Build'
  Current working directory /export/home/gary/apache_1.3.20
  *** Error code 1
  make: Fatal error: Command failed for target Apaci_httpd'
  
  here's the instructions executed:-
  
  export
  PATH=/bin:/sbin:/usr/sbin:/usr/bin:/usr/local/bin:/usr/local/sbin:/export
  cd openssl-0.9.6b/
  ./config
  make  make test  make install
  cd ..
  cd mod_ssl-2.8.4-1.3.20/
  ./configure --with-apache=../apache_1.3.20/
  cd ..
  cd mod_perl-1.26/
  perl Makefile.PL USE_APACI=1 EVERYTHING=1 DO_HTTPD=1 \
   SSL_BASE=/usr/local/ssl \
   APACHE_PREFIX=/usr/local/apachessl  \
   APACHE_SRC=../apache_1.3.20/src \
   APACI_ARGS='--enable-module=ssl
  --enable-module=rewrite'
  make
  
  a search for libssl reveals:
  
  find / -name libssl.so.0
  /usr/local/ssl/lib/libssl.so.0
  
  can anyone help out at this stage? thanks very
 
 what do you see when you do:
 
 ls -l /usr/local/ssl/lib/libssl.so.0
 
 For example on my machine I get:
 
 /home/stas ls -l /usr/lib/libssl.so.0
 
 lrwxrwxrwx1 root root   15 Sep 14 23:36 /usr/lib/libssl.so.0 - 
libssl.so.0.9.6
 
 Does the symlink point correctly to the real libssl.so?

or your /etc/ld.so.conf doesn't have /usr/local/ssl/lib.  

In wich case, add it to ld.so.conf and run ldconfig as root

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

-- 
Philippe M. Chiasson  [EMAIL PROTECTED]
  Extropia's Resident System Guru
 http://www.eXtropia.com/

Just because something is obviously happening doesn't mean
something obvious is happening. 
-- Larry Wall

perl -e '$$=\${gozer};{$_=unpack(P26,pack(L,$$));/^Just Another Perl 
Hacker!\n$/print||$$++redo}'

 PGP signature


Re: cvs commit: modperl-2.0/xs/APR/Table APR__Table.h

2001-09-17 Thread Philippe M . Chiasson

Thanks, I'll remember that one... aTHX ;-)

On Sat, Sep 15, 2001 at 06:21:48PM -, [EMAIL PROTECTED] wrote:
 dougm   01/09/15 11:21:48
 
   Modified:xs/APR/Table APR__Table.h
   Log:
   avoid dTHX; in APR::Table-do
   
   Revision  ChangesPath
   1.2   +7 -3  modperl-2.0/xs/APR/Table/APR__Table.h
   
   Index: APR__Table.h
   ===
   RCS file: /home/cvs/modperl-2.0/xs/APR/Table/APR__Table.h,v
   retrieving revision 1.1
   retrieving revision 1.2
   diff -u -r1.1 -r1.2
   --- APR__Table.h2001/09/15 18:17:31 1.1
   +++ APR__Table.h2001/09/15 18:21:48 1.2
   @@ -1,6 +1,7 @@
typedef struct {
SV *cv;
apr_table_t *filter; /*XXX: or maybe a mgv ? */
   +PerlInterpreter *perl;
} mpxs_table_do_cb_data_t;

typedef int (*mpxs_apr_table_do_cb_t)(void *, const char *, const char *);
   @@ -8,10 +9,10 @@
static int mpxs_apr_table_do_cb(void *data,
const char *key, const char *val)
{
   -dTHX; /*XXX*/
   +mpxs_table_do_cb_data_t *tdata = (mpxs_table_do_cb_data_t *)data;
   +dTHXa(tdata-perl);
dSP;
int rv = 0;
   -mpxs_table_do_cb_data_t *tdata = (mpxs_table_do_cb_data_t *)data;

/* Skip completely if something is wrong */
if (!(tdata  tdata-cv  key  val)) {
   @@ -56,7 +57,10 @@
 
tdata.cv = sub;
tdata.filter = NULL;
   -
   +#ifdef USE_ITHREADS
   +tdata.perl = aTHX;
   +#endif
   +
if (items  2) {
STRLEN len;
tdata.filter = apr_table_make(table-a.pool, items-2);
   
   
   
 

-- 
Philippe M. Chiasson  [EMAIL PROTECTED]
  Extropia's Resident System Guru
 http://www.eXtropia.com/

Perl is such a great deal because a lot of people have
worked a great deal on it. 
-- Larry Wall

perl -e '$$=\${gozer};{$_=unpack(P26,pack(L,$$));/^Just Another Perl 
Hacker!\n$/print||$$++redo}'

 PGP signature


Re: [Patch] Apache-dso_module()

2001-06-18 Thread Philippe M . Chiasson

On Wed, Jun 13, 2001 at 09:52:39PM -0700, Doug MacEachern wrote:
 On Fri, 25 May 2001, Philippe M . Chiasson wrote:
 
  I know I posted this patch a while ago, but I am looking thru a few patches
  I have and I thought I might re-post this one along with the rest
  
  This module allows one to do
  
  Apache-dso_module('module_name.c') and it will be true only of the
  module in question is present and has been loaded as DSO.
  
  Used to be usefull to me when attempting to work around Perl directives
  and mod_perl as DSO/not-DSO (now fixed).
  
  But I figured it could be usefull to others.
 
 any examples you can think of? 

In my case, I used it to work around the strange mod_perl behaviour under DSO (fixed 
in CVS)
 in any case, it would be better to have
 Apache-module('mod_foo.so') provide this functionality rather than add a
 new method.

Sure, only question, is the .so extension generic enough ? How about on Win platforms ?

Let me know and I'll re-patch

 

-- 
+---+
| Philippe M. Chiasson  [EMAIL PROTECTED]|
| SmartWorker http://www.smartworker.org|
| IM : gozerhbe  ICQ : gozer/99685021   |
|   64.8% computer corrupt according to |
| http://www.freespeech.org/ljk/purity.html |
+---+
That's about as funny as muppet Norwegian. 
-- Larry Wall

perl -e '$$=\${gozer};{$_=unpack(P26,pack(L,$$));/^Just Another Perl 
Hacker!\n$/print||$$++redo}'




Re: Apache::AutoIndex SuppressHTMLPreamble directive

2001-06-08 Thread Philippe M . Chiasson

On Fri, Jun 08, 2001 at 05:21:31PM +0100, tim fulcher wrote:
 
 Has anybody else noticed a bug with Apache::AutoIndex  the IndexOptions
 SuppressHTMLPreamble directive ? First time I tried using this I got a
 warning:
 
 IndexOptions unknown/unsupported directive suppresshtmlpreamble
 
 Then I noticed that  line 37 of AutoIndex.pm has a typo -
 
 suppresshtmlperamble = SUPPRESS_PREAMBLE


Typo noted.

 I edited that  tried again - it worked of sorts, in that Apache didn't
 barf, but the resultant HTML contains 2 head sections:-

I see, well, as Apache::AutoIndex re-implements mod_autoindex in perl,
I probably left that part out.  A simple if() should address this.

Thanks, will try to get a patched version on CPAN this week-end.

P.S. Patch welcome ;-)

 !DOCTYPE HTML PUBLIC -//W3C//DTD HTML 4.0 Transitional//EN
 http://www.w3.org/TR/REC-html40/loose.dtd;
 HTMLHEAD
 TITLEDirectory index of
 /tools//TITLE/HEADBODYH2Directory index of
 /tools//H2
 PREHTML
 HEAD
 titlefooo/title
 link rel=stylesheet href=/css/ebtheme.css
 /HEAD
 BODYh3can u see this header name directive?/h3
 /PRE
 
 
 I'm using v 0.08 of Apache::AutoIndex - couldn't see a later version on
 CPAN.
 
 
 Tim
 
 

-- 
+---+
| Philippe M. Chiasson  [EMAIL PROTECTED]|
| SmartWorker http://www.smartworker.org|
| IM : gozerhbe  ICQ : gozer/18279998   |
|   64.8% computer corrupt according to |
| http://www.freespeech.org/ljk/purity.html |
+---+
I'm always amazed at how many people expect to be both
elitist and populist simultaneously. 
-- Larry Wall

perl -e '$$=\${gozer};{$_=unpack(P26,pack(L,$$));/^Just Another Perl 
Hacker!\n$/print||$$++redo}'




[Patch] Apache-dso_module()

2001-05-25 Thread Philippe M . Chiasson

I know I posted this patch a while ago, but I am looking thru a few patches
I have and I thought I might re-post this one along with the rest

This module allows one to do

Apache-dso_module('module_name.c') and it will be true only of the
module in question is present and has been loaded as DSO.

Used to be usefull to me when attempting to work around Perl directives
and mod_perl as DSO/not-DSO (now fixed).

But I figured it could be usefull to others.

-- 
+---+
| Philippe M. Chiasson  [EMAIL PROTECTED]|
| SmartWorker http://www.smartworker.org|
| IM : gozerhbe  ICQ : gozer/18279998   |
|   64.8% computer corrupt according to |
| http://www.freespeech.org/ljk/purity.html |
+---+
You're much more likely to be knocked down by a snowball
than by an equivalent number of snowflakes. 
-- Larry Wall

perl -e '$$=\${gozer};{$_=unpack(P26,pack(L,$$));/^Just Another Perl 
Hacker!\n$/print||$$++redo}'


Index: src/modules/perl/Apache.xs
===
RCS file: /home/cvs/modperl-1/src/modules/perl/Apache.xs,v
retrieving revision 1.121
diff -u -U10 -b -B -I'$Id' -I'$Revision' -r1.121 Apache.xs
--- src/modules/perl/Apache.xs  2001/05/01 17:28:37 1.121
+++ src/modules/perl/Apache.xs  2001/05/02 16:15:58
@@ -476,20 +476,40 @@
 
 CODE:
 if((*(SvEND(name) - 2) == '.')  (*(SvEND(name) - 1) == 'c'))
 RETVAL = find_linked_module(SvPVX(name)) ? 1 : 0;
 else
 RETVAL = (sv  perl_module_is_loaded(SvPVX(name)));
 
 OUTPUT:
 RETVAL
 
+I32
+dso_module(sv,name)
+SV *sv
+SV *name
+
+PREINIT:
+module *mod;
+
+CODE:
+mod = find_linked_module(SvPVX(name));
+if(name  mod) {
+RETVAL = (mod-dynamic_load_handle) ? 1 : 0;
+}
+else {
+ XSRETURN_UNDEF;
+}
+
+OUTPUT:
+RETVAL
+
 char *
 mod_perl_set_opmask(r, sv)
 Apache r
 SV *sv
 
 void
 untaint(...)
 
 PREINIT:
 int i;



[Patch] apxs location forgotten in MyConfig.pm

2001-05-25 Thread Philippe M . Chiasson

When building mod_perl with apxs as a DSO, MyConfig.pm looses track of the
location of apxs.  Therefore, when using 3rd parties perl modules that
require some access to Apache information, like Apache::src-new-inc, it
will most likely fail, unless apxs happens to be in a 'standard' location
or in your PATH.


-- 
+---+
| Philippe M. Chiasson  [EMAIL PROTECTED]|
| SmartWorker http://www.smartworker.org|
| IM : gozerhbe  ICQ : gozer/18279998   |
|   64.8% computer corrupt according to |
| http://www.freespeech.org/ljk/purity.html |
+---+
You're much more likely to be knocked down by a snowball
than by an equivalent number of snowflakes. 
-- Larry Wall

perl -e '$$=\${gozer};{$_=unpack(P26,pack(L,$$));/^Just Another Perl 
Hacker!\n$/print||$$++redo}'


Index: Makefile.PL
===
RCS file: /home/cvs/modperl-1/Makefile.PL,v
retrieving revision 1.184
diff -u -U10 -b -B -I'$Id' -I'$Revision' -r1.184 Makefile.PL
--- Makefile.PL 2001/05/01 17:08:25 1.184
+++ Makefile.PL 2001/05/25 17:15:18
@@ -1980,33 +1980,34 @@
 
 sub write_my_config {
 my $src = shift;
 
 # preparing and writing Configuration to Apache::MyConfig
 my %my_config = %callback_hooks;
 my @other_hooks = qw(APACHE_SRC SSL_BASE APXS PERL_USELARGEFILES
  PERL_TRACE PERL_DEBUG APACI_ARGS
  APACHE_PREFIX DO_HTTPD NO_HTTPD PREP_HTTPD
  USE_APACI APACHE_HEADER_INSTALL
- PERL_STATIC_EXTS PERL_SSI PERL_SECTIONS);
+ PERL_STATIC_EXTS PERL_SSI PERL_SECTIONS USE_APXS WITH_APXS);
 {
 no strict 'refs';
 $my_config{$_} = ${$_} for @other_hooks;
 }
 if ($win32_auto) {
 for (qw(APACHE_INC APACHE_LIB MODPERL_INC MODPERL_LIB)) {
 $my_config{$_} = $win32_path{$_};
 }
 }
 
 #need this alias for Apache::src backwards compat
 $my_config{'Apache_Src'} = $my_config{'APACHE_SRC'};
+$my_config{'APXS'} = delete $my_config{'WITH_APXS'};
 
 my $my_config_dump = join ,\n,
 map { qq{'$_' = } .
   ($my_config{$_} =~ /^\d+$/ ? $my_config{$_} : qq{'$my_config{$_}'})
 } sort keys %my_config;
 
 local *FH;
 open FH, 'lib/Apache/MyConfig.pm'  ||
die Can't open lib/Apache/MyConfig.pm: $!;
 print FH EOT;



[Patch] perl Makefile.PL PREFIX=/foo/bar breakage

2001-05-25 Thread Philippe M . Chiasson

When passing a PREFIX=/foo/bar to Makefile.PL, all the perl .pm will get installed
under /foo/bar/lib/site_perl/perl-version/perl-arch but mod_perl.so isn't aware of
that.  So, mod_perl will refuse to start, failing to locate Apache.pm.  My first
way around this was to PerlRequire a file before anything else and push 
/foo/bar/lib/site_perl/perl-version/perl-arch
on the @INC path, but it's not very elegant.

This patches automatically makes sure the PREFIX path, if specified, is placed first 
in the @INC
path.

-- 
+---+
| Philippe M. Chiasson  [EMAIL PROTECTED]|
| SmartWorker http://www.smartworker.org|
| IM : gozerhbe  ICQ : gozer/18279998   |
|   64.8% computer corrupt according to |
| http://www.freespeech.org/ljk/purity.html |
+---+
You're much more likely to be knocked down by a snowball
than by an equivalent number of snowflakes. 
-- Larry Wall

perl -e '$$=\${gozer};{$_=unpack(P26,pack(L,$$));/^Just Another Perl 
Hacker!\n$/print||$$++redo}'


Index: src/modules/perl/mod_perl.c
===
RCS file: /home/cvs/modperl-1/src/modules/perl/mod_perl.c,v
retrieving revision 1.136
diff -u -U10 -b -B -I'$Id' -I'$Revision' -r1.136 mod_perl.c
--- src/modules/perl/mod_perl.c 2001/04/17 22:01:18 1.136
+++ src/modules/perl/mod_perl.c 2001/05/25 17:23:49
@@ -758,20 +758,25 @@
value would cause perl to try to free() something from the original env.
This crashed free(). */
 my_setenv(MODPERL_ENV_FIXUP, 0);
 my_setenv(MODPERL_ENV_FIXUP, NULL);
 
 {
dTHR;
TAINT_NOT; /* At this time all is safe */
 }
 
+#ifdef MOD_PERL_PREFIX
+   av_unshift(GvAV(incgv),1);
+   av_store(GvAV(incgv), 0, newSVpv(MOD_PERL_PREFIX,0));
+#endif
+   
 #ifdef APACHE_PERL5LIB
 perl_incpush(APACHE_PERL5LIB);
 #else
 av_push(GvAV(incgv), newSVpv(server_root_relative(p,),0));
 av_push(GvAV(incgv), newSVpv(server_root_relative(p,lib/perl),0));
 #endif
 
 /* *CORE::GLOBAL::exit = \Apache::exit */
 if(gv_stashpv(CORE::GLOBAL, FALSE)) {
GV *exitgp = gv_fetchpv(CORE::GLOBAL::exit, TRUE, SVt_PVCV);
Index: apaci/mod_perl.config.sh
===
RCS file: /home/cvs/modperl-1/apaci/mod_perl.config.sh,v
retrieving revision 1.23
diff -u -U10 -b -B -I'$Id' -I'$Revision' -r1.23 mod_perl.config.sh
--- apaci/mod_perl.config.sh2001/01/29 18:11:41 1.23
+++ apaci/mod_perl.config.sh2001/05/25 17:20:11
@@ -175,20 +175,25 @@
 perl_static_srcs=$param_PERL_STATIC_SRCS
 perl_static_objs=`echo $param_PERL_STATIC_SRCS | sed -e 's:\.c:.o:g'`
 perl_static_objs_pic=`echo $param_PERL_STATIC_SRCS | sed -e 's:\.c:.lo:g'`
 
 #
 #   determine defines
 #
 perl_defs=''
 perl_defs=$perl_defs -DMOD_PERL_VERSION=\\\$param_MOD_PERL_VERSION\\\
 perl_defs=$perl_defs 
-DMOD_PERL_STRING_VERSION=\\\mod_perl/$param_MOD_PERL_VERSION\\\
+
+if [ .$param_MOD_PERL_PREFIX != . ]; then
+   perl_defs=$perl_defs -DMOD_PERL_PREFIX=\\\$param_MOD_PERL_PREFIX\\\
+fi
+
 perl_defs=$perl_defs
 OIFS=$IFS IFS=$DIFS
 for hook in \
 DISPATCH CHILD_INIT CHILD_EXIT POST_READ_REQUEST TRANS HEADER_PARSER \
 ACCESS AUTHEN AUTHZ TYPE FIXUP HANDLER LOG INIT CLEANUP STACKED_HANDLERS \
 METHOD_HANDLERS DIRECTIVE_HANDLERS SECTIONS RESTART SSI TRACE THREADS; do
 eval val=\$param_PERL_${hook}
 case $hook in
 TRACE|THREADS ) 
 if [ .$val = .yes ]; then
Index: Makefile.PL
===
RCS file: /home/cvs/modperl-1/Makefile.PL,v
retrieving revision 1.184
diff -u -U10 -b -B -I'$Id' -I'$Revision' -r1.184 Makefile.PL
--- Makefile.PL 2001/05/01 17:08:25 1.184
+++ Makefile.PL 2001/05/25 17:16:20
@@ -221,20 +221,21 @@
 $ADD_MODULE = ;
 $PERL_DIRECTIVE_HANDLERS = 0;
 $PERL_TABLE_API = 0;
 $PERL_LOG_API = 0;
 $PERL_URI_API = 0;
 $PERL_UTIL_API = 0;
 $PERL_FILE_API = 0;
 $PERL_CONNECTION_API = 1; #these two were split out late in the game
 $PERL_SERVER_API = 1; #so they are on by default 
 $PERL_RUN_XS = 0;
+$MOD_PERL_PREFIX;
 
 my %experimental = map { $_,1 } qw{
 PERL_AUTOPRELOAD
 PERL_DSO_UNLOAD
 PERL_STARTUP_DONE_CHECK
 PERL_RUN_XS
 PERL_MARK_WHERE
 DO_INTERNAL_REDIRECT
 PERL_TIE_SCRIPTNAME
 PERL_STASH_POST_DATA
@@ -329,20 +330,27 @@
$win32_args{$k} = ($k eq 'DEBUG' or $k eq 'EAPI') ? 1 : $v;
   }
   else {
push @mm_args, $_;
   }
   next;
 }
 unless (/^(PERL|APACHE)/ or is_mp_arg($k)) {
push @mm_args, $_;
 }
+   
+   if($k eq 'PREFIX')
+   {
+   use File::Spec;
+   $MOD_PERL_PREFIX = 
+File::Spec-catfile($v,'lib','site_perl',$Config{'version'},$Config{'archname'});
+   }
+   
 $v = 1 unless defined $v;
 if($experimental{$k}) {
$experimental{$k

Re: Reading the environment in perl block

2001-05-08 Thread Philippe M \. Chiasson

On Mon, May 07, 2001 at 04:21:29PM -0400, Benoit Caron wrote:
 Hello.
 
 I'm trying to isolate the developper environment from each other so that 
 when someone mess up the server, the others just simply don't know that 
 something happened. So, every developpers will have their own webserver.
 
 Since I want to be able to have potentially different copies of Perl 
 modules (like, say, two developpers are working on things that are in the 
 same modules), I can't simply load different virtual host for each 
 developpers: they have their own copy of Apache+mod_perl.
 
 The way I've setup whole thing is like that : a script name restart is 
 called with some parameters telling him to reload one or all the 
 developpers environment, or the testing copy. This script would have some 
 environments variables called SITE_USER and SITE_USER_PORT that will give 
 me the value (read in a file defining the different users) of the username 
 (and by the same way the files path) and the port where the user should work.
 
 My problem is that my envirnoment variables are not set. If I do a 
 Dumper(\%ENV), I only got values for the variables TZ, GATEWAY_INTERFACE, 
 MOD_PERL and PATH. (I do double-check that my variables where well setup).
 
 I've read in the Eagle book that the environment is cleaned up on server 
 start, but I tought that I could read it in raw form in the perl 
 configuration...
 
 The only way I still see to make it work is having my restart script 
 saving the current user/port in a file and letting the perl section read 
 it's configuration from there. But it look so patchy...
 
 Is there another way to do this?

http://thingy.kcilink.com/modperlguide/config/PerlSetVar_PerlSetEnv_and_PerlP.html

The problem is that mod_perl handles %ENV at request time, and it's not normally 
avaliable
during startup.  So you should make use of the

PerlPassEnv SIDE_USER
PerlPassEnv SITE_USER_PORT

Wich will make sure they are always set for you.  This exists mostly for performances 
reason,
as setting up the 'magic' %ENV is quite expensive.

Hope this helps

 Thanks for any advice
 
 
 Benoit Caron
 Analyste-Programmeur
 Netgraphe - Webfin.com - Le Web Financier
 [EMAIL PROTECTED]
 - - - - - - - - - - - - - - - - - - - - - - - -
 The number of Unix installations has grown to 10,
   with more expected.
 -- The Unix Programmer's Manual, 2nd edition, June '72
 
 

-- 



Re: Perl Sections in Apache Config

2001-05-08 Thread Philippe M \. Chiasson

On Mon, May 07, 2001 at 05:35:57PM -0700, Jonathan Hilgeman wrote:
 Hi,
 I've been trying to do this for some time but can't figure out how.
 Basically I want a setup where anyone at www.UserName.domain.com or
 UserName.domain.com will have their DocumentRoot set to
 /www/httpd/html/UserName. So far I've tried this:
 
 VirtualHost 111.111.111.111
   UseCanonicalName Off
   Perl
 
   if($HTTP_HOST =~ s/(?:www\.)?(.*)\.domain\.com//g)
   {
   $VirtualDocumentRoot = /www/httpd/html/$1;
   }
   else
   {
   $VirtualDocumentRoot = '/www/httpd/html/%-3';
   }
   
   1;
 
   /Perl
 
 /VirtualHost
 
 The second $VirtualDocumentRoot line works fine, but I NEED to be able to
 get the first line to work instead, using Perl if possible.
 
 Any guesses?

Your problem is that this code is evaluated at startup-time, not request-time.
So this means it will be run once globally, the regexp won't match and you just
configure the default.  There are many ways to do it.

First, look at mod_vhost_alias http://httpd.apache.org/docs/mod/mod_vhost_alias.html.
VirtualDocumentRoot /www/httpd/html/%0

Would map requests to www.username.com to /www/httpd/html/www.username.com
And for the username.com, you could simply use a symlink.  

Second, use mod_rewrite http://httpd.apache.org/docs/mod/mod_rewrite.html
Something like :

  RewriteEngine on
  RewriteCond   %{HTTP_HOST} ^(www\.)?[^.]+\.host\.com$
  RewriteRule   ^(.+)%{HTTP_HOST}$1  [C]
  RewriteRule   ^(www\.)?([^.]+)\.host\.com(.*) /www/httpd/html/$2$3

Third, you could do it in mod_perl with a custom handler

Perl
use Apache::Constants qw(:common);
sub My::MassVHosting::handler {
my $r = shift
if($r-header_in('Host') =~ /^(www\.)?([^.]+)\.domain,com/)
{
$r-filename(/home/httpd/html/$2);
$r-stat();
return OK;  
}
return Apache::Constants:;DECLINED;
}
/Perl
PerlTrancHandler My;;MassVHosting

For more information about mod_per magic, consider getting the book or reading the 
guide
http://perl.apache.org/guide/

Hope this helps.

P.S. I am not responsible for tyops ;-)
 Jonathan
 
 

-- 



[Patch] Apache-dso_module() to find if a module is loaded as DSO or not

2001-04-25 Thread Philippe M . Chiasson

A suggested new feature.

Apache-dso_module('mod_example.c') behaves like 
Apache-module('mod_example.c') except it returns 1 if the
module is loaded as DSO, 0 if it's compiled in and undef
if it's not present at all.

I wrote this because of a few problems I had with the 'slight'
differences in behaviour of mod_perl under DSO and compiled in.

In my case, I call an init function from a startup.pl, and because
of the way apache starts then restarts, it gets called twice if mod_perl
is compiled in and only once if it's a DSO.

So I end up with code like this:

sub init {
return if($Apache::Server::Starting  not $Global::MOD_PERL_AS_DSO);
}

I guess it could be usefull for other purposes to, so here is the patch.
-- 
+---+
| Philippe M. Chiasson  [EMAIL PROTECTED]|
| SmartWorker http://www.smartworker.org|
| IM : gozerhbe  ICQ : gozer/18279998   |
|   64.8% computer corrupt according to |
| http://www.freespeech.org/ljk/purity.html |
+---+
C makes it easy to shoot yourself in the foot. C++ makes it
harder, but when you do, it blows away your whole leg.
-- Bjarne Stroustrup

perl -e '$$=\${gozer};{$_=unpack(P26,pack(L,$$));/^Just Another Perl 
Hacker!\n$/print||$$++redo}'


Index: src/modules/perl/Apache.xs
===
RCS file: /home/cvs/modperl-1/src/modules/perl/Apache.xs,v
retrieving revision 1.120
diff -u -U10 -b -B -I'$Id' -I'$Revision' -r1.120 Apache.xs
--- src/modules/perl/Apache.xs  2001/04/17 21:57:20 1.120
+++ src/modules/perl/Apache.xs  2001/04/25 13:57:04
@@ -476,20 +476,40 @@
 
 CODE:
 if((*(SvEND(name) - 2) == '.')  (*(SvEND(name) - 1) == 'c'))
 RETVAL = find_linked_module(SvPVX(name)) ? 1 : 0;
 else
 RETVAL = (sv  perl_module_is_loaded(SvPVX(name)));
 
 OUTPUT:
 RETVAL
 
+I32
+dso_module(sv,name)
+SV *sv
+SV *name
+
+PREINIT:
+module *mod;
+
+CODE:
+mod = find_linked_module(SvPVX(name));
+if(name  mod) {
+RETVAL = (mod-dynamic_load_handle) ? 1 : 0;
+}
+else {
+ XSRETURN_UNDEF;
+}
+
+OUTPUT:
+RETVAL
+
 char *
 mod_perl_set_opmask(r, sv)
 Apache r
 SV *sv
 
 void
 untaint(...)
 
 PREINIT:
 int i;



Re: [Patch] Apache-dso_module() to find if a module is loaded as DSO or not

2001-04-25 Thread Philippe M . Chiasson

On Wed, Apr 25, 2001 at 10:59:51PM +0800, Stas Beckman wrote:
 On Wed, 25 Apr 2001, Philippe M . Chiasson wrote:

  A suggested new feature.
 
  Apache-dso_module('mod_example.c') behaves like
  Apache-module('mod_example.c') except it returns 1 if the
  module is loaded as DSO, 0 if it's compiled in and undef
  if it's not present at all.
 
  I wrote this because of a few problems I had with the 'slight'
  differences in behaviour of mod_perl under DSO and compiled in.
 
  In my case, I call an init function from a startup.pl, and because
  of the way apache starts then restarts, it gets called twice if mod_perl
  is compiled in and only once if it's a DSO.
 
  So I end up with code like this:
 
  sub init {
  return if($Apache::Server::Starting  not $Global::MOD_PERL_AS_DSO);
  }
 

 Back to the old problem... Eric Cholet has implemented
 $Apache::Server::Restarting, but for various reasons it's never went in.

 Currently I think there is a slight bug in the latest mod_perl 1.x,
 where PerlRequire doesn't work as require() in Perl per se on restart. A
 few people have reported this behavior.

 So as a quick workaround do this:

 start.pl:
 -
 require real-startup.pl;

 this require(), won't be called twice.

I know that, but my problem is that I need to call an init() function
in a loaded library that can't be called twice ;-(


  I guess it could be usefull for other purposes to, so here is the patch.

 I'm not underestimating the power of your patch of course :) I think the
 real fix should be in PerlRequire.

Yeah, Matt said he could use it ;-)


 BTW, the same problem happens to PerlModule. I've moved all my preloadings
 into the Perl domain, mod_perl reloads them twice.

I agree, I experienced the strange differences between PerlModule Foo 
Perluse Foo;/Perl ;-(

I guess that problem couold be fixed usign perl_module-dynamic_load_handle.
That way code like PerlModule and such could figure out if they should
skip the first run or not.

I wouldn't mind volunteering to look at this problem and suggest a fix. It's
been annoying for a long time now.

There is also the strange case of mod_perl leaking memory on graceful resta=
rts
when compiled as DSO.  But I don't feel like getting into this one quite ye=
t.

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




--
+---+
| Philippe M. Chiasson  [EMAIL PROTECTED]|
| SmartWorker http://www.smartworker.org|
| IM : gozerhbe  ICQ : gozer/18279998   |
|   64.8% computer corrupt according to |
| http://www.freespeech.org/ljk/purity.html |
+---+
die_if_kernel(Whee... Hello Mr. Penguin,current-tss.kregs);
-- Linux2.2.16
/usr/src/linux/arch/sparc/kernel/traps.c

perl -e '$$=3D\${gozer};{$_=3Dunpack(P26,pack(L,$$));/^Just Another Perl 
Hacker!\n$/print||$$++redo}'




Re: Apache::AutoIndex - problem with special symbols in filenames (patch applied)

2001-04-17 Thread Philippe M . Chiasson

On Tue, Apr 17, 2001 at 09:29:22AM +0100, G.W. Haywood wrote:
 Hi there,
 
 On Tue, 17 Apr 2001, Alexei Barantsev wrote:
 
  I have found that Apache::AutoIndex does not handle correctly filenames with
  special symbols - whitespaces, ,  and so on.
 
 Are you *sure* you want to have those symbols in your filenames??

Well, if it's generating links to actual files, it should make sure the
links are always valid ones, not escaping there characters would possibly
break HTML specs in the output and generate links you can't click on.

So I will apply this patch.

Thanks.

 73,
 Ged.
 
 

-- 
+---+
| Philippe M. Chiasson  [EMAIL PROTECTED]|
| SmartWorker http://www.smartworker.org|
| IM : gozerhbe  ICQ : gozer/18279998   |
|   64.8% computer corrupt according to |
| http://www.freespeech.org/ljk/purity.html |
+---+
Those who learn from history are doomed to have it repeated
to them anyway. 
-- Larry Wall

perl -e '$$=\${gozer};{$_=unpack(P26,pack(L,$$));/^Just Another Perl 
Hacker!\n$/print||$$++redo}'

 PGP signature


Why Does restart/gracefull makes httpd grow ?

2000-10-19 Thread Philippe M. Chiasson

Hi, I recently upgraded our servers to mod_perl 1.24.1 so I decided to
give DSO mod_perl a try.  And it now works perfectly, even with our perl
modules implementing core httpd configuration directives (Wich was broken
under DSO until 24.1)

So, I decided to start playing with restart/graceful too, thinking that DSO might solve
the problems of cleanly restarting a mod_perl server without loss of service...

Here is a bit of top while restarting my server a few times :

#INITIAL STARTUP
  PID USER PRI  NI  SIZE SWAP  RSS SHARE STAT  LIB %CPU %MEM   TIME COMMAND
17940 nobody10   0 275920  26M 27376 S   0  0.0  2.6   0:00 
/usr/local/apache/bin/httpd -Dhttpd_perl
17941 nobody10   0 275920  26M 27376 S   0  0.0  2.6   0:00 
/usr/local/apache/bin/httpd -Dhttpd_perl
17942 nobody10   0 275920  26M 27376 S   0  0.0  2.6   0:00 
/usr/local/apache/bin/httpd -Dhttpd_perl
17943 nobody10   0 275920  26M 27376 S   0  0.0  2.6   0:00 
/usr/local/apache/bin/httpd -Dhttpd_perl
17944 nobody10   0 275920  26M 27380 S   0  0.0  2.6   0:00 
/usr/local/apache/bin/httpd -Dhttpd_perl
17939 root  10   0 275160  26M 27312 S   0  0.0  2.6   0:01 
/usr/local/apache/bin/httpd -Dhttpd_perl

#RESTART #1
17971 nobody 5   0 401160  39M 39888 S   0  0.0  3.8   0:00 
/usr/local/apache/bin/httpd -Dhttpd_perl
17972 nobody 7   0 401160  39M 39888 S   0  0.0  3.8   0:00 
/usr/local/apache/bin/httpd -Dhttpd_perl
17973 nobody 9   0 401160  39M 39888 S   0  0.0  3.8   0:00 
/usr/local/apache/bin/httpd -Dhttpd_perl
17974 nobody10   0 401160  39M 39888 S   0  0.0  3.8   0:00 
/usr/local/apache/bin/httpd -Dhttpd_perl
17975 nobody10   0 401160  39M 39888 S   0  0.0  3.8   0:00 
/usr/local/apache/bin/httpd -Dhttpd_perl
17961 root  10   0 400400  39M 39816 S   0  0.0  3.8   0:03 
/usr/local/apache/bin/httpd -Dhttpd_perl

#RESTART #2
17980 nobody 6   0 526400  51M 52404 S   0  0.6  5.0   0:00 
/usr/local/apache/bin/httpd -Dhttpd_perl
17981 nobody13   0 526400  51M 52404 S   0  0.2  5.0   0:00 
/usr/local/apache/bin/httpd -Dhttpd_perl
17982 nobody16   0 526400  51M 52404 S   0  0.0  5.0   0:00 
/usr/local/apache/bin/httpd -Dhttpd_perl
17983 nobody18   0 526400  51M 52404 S   0  0.0  5.0   0:00 
/usr/local/apache/bin/httpd -Dhttpd_perl
17984 nobody19   0 526400  51M 52404 S   0  0.0  5.0   0:00 
/usr/local/apache/bin/httpd -Dhttpd_perl
17961 root  19   0 525600  51M 52332 S   0 41.1  5.0   0:05 
/usr/local/apache/bin/httpd -Dhttpd_perl

[...]

#RESTART #5
18007 nobody 8   0 902040  88M 89976 S   0  7.1  8.7   0:00 
/usr/local/apache/bin/httpd -Dhttpd_perl
18008 nobody 9   0 902040  88M 89976 S   0  0.0  8.7   0:00 
/usr/local/apache/bin/httpd -Dhttpd_perl
18009 nobody10   0 902040  88M 89976 S   0  2.3  8.7   0:00 
/usr/local/apache/bin/httpd -Dhttpd_perl
18010 nobody11   0 902040  88M 89976 S   0  4.7  8.7   0:00 
/usr/local/apache/bin/httpd -Dhttpd_perl
18011 nobody15   0 902040  88M 89976 S   0  0.0  8.7   0:00 
/usr/local/apache/bin/httpd -Dhttpd_perl
17961 root  15   0 901280  88M 89908 S   0 57.2  8.6   0:11 
/usr/local/apache/bin/httpd -Dhttpd_perl

And everything apparently behaves fine and keeps on working, but my main question is 
where is the 12Mb that adds to
each process on restart comes from ? What is hapenning ?

I know these issues have been brought before in the case of statically compiled-in 
mod_perl, but doesn't restarting the
server freeing libperl.so and re-loading it freshly ?

Any information would be more than welcome ...

## My version info is :
Redhat 6.2 running on a i386 Linux 2.2.17

Server version: Apache/1.3.14 (Unix)
Server built:   Oct 18 2000 14:00:36

perl5 (5.0 patchlevel 5 subversion 3)

mod_perl 1.24.1

/usr/local/apache/bin/httpd  -l
Compiled-in modules:
  http_core.c
  mod_so.c


-- 
+---+
| Philippe M. Chiasson  [EMAIL PROTECTED] |
| SmartWorker http://www.smartworker.org|
| IM : gozerhbe  ICQ : gozer/18279998   |
+---+
/*   * Hash table gook..   */ 
-- Linux2.4.0-test2
/usr/src/linux/fs/buffer.c

perl -e '$$=\${gozer};{$_=unpack(P26,pack(L,$$));/^Just Another Perl 
Hacker!\n$/print||$$++redo}'

 PGP signature