[OT] [ANNOUNCE] PPerl 0.04

2002-04-16 Thread Matt Sergeant

-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

This is a wee bit off topic, but may still be of interest.

PPerl 0.04 has been released to CPAN.

What's PPerl you may ask? Well it's a persistent perl interpreter. It's quite 
similar in many ways to SpeedyCGI, except it doesn't require any 
modifications to your CGI script or Apache setup except perhaps for the #! 
line to specifiy pperl rather than perl. The code is simpler than SpeedyCGI 
(the daemon stuff just uses Perl, rather than C, although the client end is 
C), so I'm hoping perhaps more people will want to get involved with 
improving the project (plus SpeedyCGI seems dead).

The biggest reason for writing this was actually not for web stuff, but for 
our anti-virus and anti-spam code at MessageLabs (www.messagelabs.com). 
Basically perl compile time takes up most of our time to process an email, so 
we had to do something about it. PPerl is what came out of that, and I was 
allowed to release it open source. So it may be useful to anyone who has, for 
example, a cron job, or a mail processing script, or basically anything 
rather large that they need to speed up.

Anyway, do play with it, and let me know what you think, and if you find bugs 
or anything like that.

Cheers, Matt.

- -- 
:-get a SMart net/:-
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.0.6 (GNU/Linux)
Comment: For info see http://www.gnupg.org

iEYEARECAAYFAjy71NMACgkQVBc71ct6OywLngCglzRm6f7/JqsXW8Km6+3retTh
qxoAoON1dfm9snjZTFjaVMWSaQiiswzQ
=I322
-END PGP SIGNATURE-



Help required

2002-04-16 Thread Murugan K

Hi
  I am new to mod_perl and  i am  developing some samples using
mod_perl . 
While  developing sample , i do not want to restart the server 
frequently with respect to my changes.

So i used the$r-header_out(Pragma, no-cache);   statement  not
to cache the results. i seems to be not working for me . 

Any suggestions and how to include the directives in the server side 
not to cache  the results.

Thanks in advance 

With Regards
K.Murugan



Re: Found a sprintf() bug inPerl 5.6.1 (and mod_perl)

2002-04-16 Thread Franck PORCHER

I think that if there is a bug, which i'm not convinced of (see below),
it's likely to be int(), which may *first* be called by sprintf to cast
the floating-point number into an integral format (%03d).

Indeed if you run :

perl -e '$a=0.57; print int($a * 100)'

you get 0.56 .


Now, there must be an explanation for such an interesting behavior!
It may even have to do with the binary representation of floating-point numbers(FPN)
using the IEEE format, where 32bits FPN are represented
using  23 bits of mantissa.

The following script shows that 0.57 (as an example), an many others,
cannot be represented using 23 bits mantissa :

# this find the negative powers of 2 that should be added together
# to reach the goal (eg 0.57)
perl -e '   $goal = $ARGV[0];
$negpw= 1;
l  = ();
$s  = 0;
foreach (1..23) {
$a = $a/2;
if ( ($s + $a) = $goal){
$s += $a;
push l, $_;
print(sprintf(%0.30f  -  %03d\n, $s, 
$s * 100 ))
}
};
print l
' 0.57

0.50  -  050
0.562500  -  056
0.5664062500  -  056
0.5683593750  -  056
0.5693359375  -  056
0.56982421875000  -  056
0.56994628906250  -  056
0.569976806640625000  -  056
0.569992065429687500  -  056
0.56694824218750  -  056
0.569332427978515625  -  056
1 4 8 9 10 11 13 15 16 17 22

i.e 0.1 + 0.0001 + 0.0001 + 0.1
+ ...

You see in the result that 0.57 *cannot be* represented
as an  exact sum of negative powers of 2 within
23 bits.

From there, I guess any thing that happens is OK.

The problem of floating point representation,
and all the dillies that go with iti, is in fact
as old as computer science itself!

To solve your problem, use :

print(sprintf(%2.0f\n, $a * 100 ))

Hope this helps.

Franck


On Mon, 15 Apr 2002, Dominique Blas wrote:

 Sorry,

 I've found the following bug in mod_perl 1.25 and Perl 5.6.1.
 Maybe was it already released  but in case not here it is :

 perl -e '
 $a=0.57;
 print sprintf(%03d, $a * 100)'

 prints 056 instead of 057

 Same behaviour with $a=0,58 that prints 057.

 Of course it works for other values and also if you write

 $a=0,57*100;
 print sprintf(%03d, $a);


 Bug in sprintf() ?


 Sincerely,

 db


-- 

Bonne réception,

Franck


Essential Software - Ingénierie Informatique
Solutions Linux  Open Source en Polynésie française

http://www.esoft.pf/
Tél: (689) 56 23 95





Re: Help required

2002-04-16 Thread Per Einar Ellefsen

At 10:41 16.04.2002, Murugan K wrote:
Hi
   I am new to mod_perl and  i am  developing some samples using
mod_perl .
While  developing sample , i do not want to restart the server
frequently with respect to my changes.

So i used the$r-header_out(Pragma, no-cache);   statement  not
to cache the results. i seems to be not working for me .

Any suggestions and how to include the directives in the server side
not to cache  the results.

Your problem isn't that the browser caches the results, but that mod_perl 
caches your code. I suppose you are using Apache handlers, so you should 
look into some module reloading mechanism such as Apache::StatINC. See the 
Guide ( http://perl.apache.org/guide/ ): 
http://thingy.kcilink.com/modperlguide/porting/Using_Apache_StatINC_for_the_De.html



-- 
Per Einar Ellefsen
[EMAIL PROTECTED]





Re: Help required

2002-04-16 Thread Issac Goldstand

Murugan K wrote:

Hi
  I am new to mod_perl and  i am  developing some samples using
mod_perl . 
While  developing sample , i do not want to restart the server 
frequently with respect to my changes.

So i used the$r-header_out(Pragma, no-cache);   statement  not
to cache the results. i seems to be not working for me . 

Any suggestions and how to include the directives in the server side 
not to cache  the results.

Thanks in advance 

With Regards
K.Murugan

$r-no_cache(1);
  Issac






Re: Help required

2002-04-16 Thread Issac Goldstand

Issac Goldstand wrote:

 Murugan K wrote:

 Hi I am new to mod_perl and  i am  developing some samples using
 mod_perl . While  developing sample , i do not want to restart the 
 server frequently with respect to my changes.

 So i used the$r-header_out(Pragma, no-cache);   statement  not
 to cache the results. i seems to be not working for me .
 Any suggestions and how to include the directives in the server side 
 not to cache  the results.

 Thanks in advance
 With Regards
 K.Murugan

 $r-no_cache(1);
  Issac


Actually, Per is correct.  I just saw you trying to tell the browser not 
to caache and assumed you wanted to know how to do that.  See Per's 
answer above.  Sorry.

  Issac





Re:Help required

2002-04-16 Thread [EMAIL PROTECTED]

 Hi
   I am new to mod_perl and  i am  developing some samples
using
 mod_perl .
 While  developing sample , i do not want to restart the
server
 frequently with respect to my changes.

 So i used the$r-header_out(Pragma, no-cache);
statement  not
 to cache the results. i seems to be not working for me .

 Any suggestions and how to include the directives in the
server side
 not to cache  the results.

 Thanks in advance

 With Regards
 K.Murugan


Hi

$r-header_out is related to the generated response not to the
modules used by mod_perl to generate a response

you should read the paragraph of the modperl guide related to
re -reading configuration files without restarting the server

http://thingy.kcilink.com/modperlguide/porting/Reloading_Config
uration_Files.html

and the whole chapter cgi to mod-perl porting guidelines

http://thingy.kcilink.com/modperlguide/porting/index.html


pascal







Accédez au courrier électronique de La Poste : www.laposte.net ; 3615 LAPOSTENET (0,13 
€/mn) ; tél : 08 92 68 13 50 (0,34€/mn)






compiling modperl2 debug pb

2002-04-16 Thread [EMAIL PROTECTED]

hi

winnt/perl 561

about the compiling error of mod_perl-1.99_01 in debug mode,

the specific error is

unresolved external _MP_debug_level when linking filter.dll

this symbol is found in every .lo files of the
src/modules/perl directory after the build process but in no
source file

isn't this a typo maybe it should be MP_debug_level external
to look for ?

the symbol MP_debug_level (without leading _) is found in
1- modperl_log.c modperl_trace.h in src/modules/perl
2- coded.pm in lib/modperl

so maybe the makefile generate something incorrect somewhere
but i cannot figure out where it is

thanks

pascal


Accédez au courrier électronique de La Poste : www.laposte.net ; 3615 LAPOSTENET (0,13 
€/mn) ; tél : 08 92 68 13 50 (0,34€/mn)






Re: Enforcing user logged in from only 1 browser?

2002-04-16 Thread Fran Fabrizio

Peter Bi wrote:
 If you touch SessionDBI for every request, why don't go directly to the
 Basic Authentication ? 

1.  You can't use a custom log in page
2.  You can't log out unless you close your browser
3.  It's for use by our employees only.  They are told to enable cookies. =)

-Fran






Re: compiling modperl2 debug pb

2002-04-16 Thread Stas Bekman

[EMAIL PROTECTED] wrote:
 hi
 
 winnt/perl 561
  
 about the compiling error of mod_perl-1.99_01 in debug mode,
 
 the specific error is 
 
 unresolved external _MP_debug_level when linking filter.dll
 
 this symbol is found in every .lo files of the 
 src/modules/perl directory after the build process but in no 
 source file
 
 isn't this a typo maybe it should be MP_debug_level external 
 to look for ?
 
 the symbol MP_debug_level (without leading _) is found in 
 1- modperl_log.c modperl_trace.h in src/modules/perl 
 2- coded.pm in lib/modperl
 
 so maybe the makefile generate something incorrect somewhere 
 but i cannot figure out where it is
 
 thanks
 
 pascal
 
 
 Accédez au courrier électronique de La Poste : www.laposte.net ; 3615 LAPOSTENET 
(0,13 ?/mn) ; tél : 08 92 68 13 50 (0,34?/mn)
 
 

as Doug posted on the dev list in reply to a similar inquery, the debug 
mode is not really working yet on winfu. I didn't know that.



-- 


__
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




PerlRequire

2002-04-16 Thread Florence Dardenne

Hi,

I've been search all the guides and never found the answer to next
question : I have mod_perl 1.26 correctly installed with Apache 1.3.22.
When I include in the httpd.conf file this kind of line Include
/home/me/auto-apache.conf which has a PerlRequire command like
PerlRequire /home/me/bin/startup.pl, I have an error saying :

Invalid command 'PerlRequire', perhaps mis-spelled or defined by a
module not included in the server configuration

Does mod_perl 1.26 includes the 'PerlRequire' functionality or do I need
higher version ?

Thanks a lot for helping,

Florence Dardenne.




Re: PerlRequire

2002-04-16 Thread Perrin Harkins

Florence Dardenne wrote:
 Does mod_perl 1.26 includes the 'PerlRequire' functionality or do I need
 higher version ?

All versions of mod_perl have that feature.  You must not have mod_perl 
compiled into that server.  See this entry in the guide:
http://perl.apache.org/guide/install.html#How_can_I_tell_whether_mod_perl_

- Perrin





PerlRequire -mod_perl-2 - Apache 2.0.35

2002-04-16 Thread RRArul

Hello Friends,

I am a newbie and had developed a proof-of-concept application on Apache 
1.3.23/Mod_Perl-1.26-dev. We are researching into moving away from ASP/IIS 
Webapplications to Apache/Mod_Perl. I am stuck with the latest Apache 2.0.35 with the 
following problems.

Today I installed Apache 2.0.35 with Mod_Perl-2. However, I am not able to use 
PerlRequire Statement in the httpd.conf.

Whenever I am trying to restart my Windows Services, it is always giving me an error 
message which does not allow me to start my Windows Services.

While I am able to execute my CGI Scripts in Apache 1.3.23/mod_perl-1.26, I am always 
getting these errors in 2.0.35/mod_perl-2

[Tue Apr 16 13:48:37 2002] [error] failed to resolve handler `Apache::Registry'
[Tue Apr 16 13:51:44 2002] [error] failed to resolve handler `Apache::Registry'
[Tue Apr 16 13:51:46 2002] [error] failed to resolve handler `Apache::Registry'

Whenever I try to use a PerlRequire Statement in httpd.conf, it just does not allow 
Apache2 to start.

I am running ActivePerl 631 on Windows 2000 with Apache 1.3.23/mod_perl-1.26_01-dev as 
well as Apache 2.0.35/mod_perl-1.99_02-dev

Any help and insights would be deeply appreciated.

Thanks,
Rex


__
Your favorite stores, helpful shopping tools and great gift ideas. Experience the 
convenience of buying online with Shop@Netscape! http://shopnow.netscape.com/

Get your own FREE, personal Netscape Mail account today at http://webmail.netscape.com/




Re: PerlRequire

2002-04-16 Thread Per Einar Ellefsen

At 16:41 16.04.2002, Florence Dardenne wrote:
Hi,

I've been search all the guides and never found the answer to next
question : I have mod_perl 1.26 correctly installed with Apache 1.3.22.
When I include in the httpd.conf file this kind of line Include
/home/me/auto-apache.conf which has a PerlRequire command like
PerlRequire /home/me/bin/startup.pl, I have an error saying :

Invalid command 'PerlRequire', perhaps mis-spelled or defined by a
module not included in the server configuration

Does mod_perl 1.26 includes the 'PerlRequire' functionality or do I need
higher version ?

As Perrin stated, mod_perl 1.26 does have this directive. The issue is 
probably that mod_perl isn't correctly installed. See 
http://thingy.kcilink.com/modperlguide/install/How_can_I_tell_whether_mod_perl_.html 
to find out if it is(the answer is most probably now), then read the 
Guide's installation section.
Guide: http://perl.apache.org/guide/
Installation: http://perl.apache.org/guide/install.html
You probably forgot some part of the process. You should re-do it step by 
step or see if you forgot something obvious.


-- 
Per Einar Ellefsen
[EMAIL PROTECTED]





Re: PerlRequire -mod_perl-2 - Apache 2.0.35

2002-04-16 Thread Perrin Harkins

[EMAIL PROTECTED] wrote:
 I am a newbie and had developed a proof-of-concept application on Apache 
1.3.23/Mod_Perl-1.26-dev. We are researching into moving away from ASP/IIS 
Webapplications to Apache/Mod_Perl. I am stuck with the latest Apache 2.0.35 with the 
following problems.

Do you really need to use Apache 2 and mod_perl 2?  Why not use the 
proven 1.x series?  It's still pretty early to be using the new stuff.

- Perrin




Re: PerlRequire -mod_perl-2 - Apache 2.0.35

2002-04-16 Thread Dave Rolsky

On Tue, 16 Apr 2002, Perrin Harkins wrote:

 [EMAIL PROTECTED] wrote:
  I am a newbie and had developed a proof-of-concept application on Apache 
1.3.23/Mod_Perl-1.26-dev. We are researching into moving away from ASP/IIS 
Webapplications to Apache/Mod_Perl. I am stuck with the latest Apache 2.0.35 with the 
following problems.

 Do you really need to use Apache 2 and mod_perl 2?  Why not use the
 proven 1.x series?  It's still pretty early to be using the new stuff.

If he's on Windows, he'd probably want to use Apache 2 for performance
reasons.


-dave

/*==
www.urth.org
we await the New Sun
==*/




RE: Re: PerlRequire -mod_perl-2 - Apache 2.0.35

2002-04-16 Thread RRArul

Both the suppositions are right! To have the proof-of-concept working in Apache, I do 
have it working 100% under Apache 1.3.23/mod_perl-1.26. I had performed benchmark 
studies under IIS/ASP, Tomcat/JSP and Apache/MOD_PERL and have seen the best 
performance under Apache 1.3.23/Mod_Perl!

However to convince my bosses, it would be lot nicer to impress upon them with Apache 
2.0.35/mod_perl-2 as it seems Apache 2.0.35 is supposed to be the best in terms of 
performance. That greediness is what is pushing me to make it work under 
Apache2/mod_perl-2.

Well, if things are in nascent phase I guess I should be content with what I have in 
Apache 1.3.23.

Am wondering how AP-631/PPM/Apache2 users have not got into problems as I am seeing on 
W2K.

Hoping for a possible fix soon!

Thanks,
Rex

Dave Rolsky [EMAIL PROTECTED] wrote:

On Tue, 16 Apr 2002, Perrin Harkins wrote:

 [EMAIL PROTECTED] wrote:
  I am a newbie and had developed a proof-of-concept application on Apache 
1.3.23/Mod_Perl-1.26-dev. We are researching into moving away from ASP/IIS 
Webapplications to Apache/Mod_Perl. I am stuck with the latest Apache 2.0.35 with the 
following problems.

 Do you really need to use Apache 2 and mod_perl 2?  Why not use the
 proven 1.x series?  It's still pretty early to be using the new stuff.

If he's on Windows, he'd probably want to use Apache 2 for performance
reasons.


-dave

/*==
www.urth.org
we await the New Sun
==*/




__
Your favorite stores, helpful shopping tools and great gift ideas. Experience the 
convenience of buying online with Shop@Netscape! http://shopnow.netscape.com/

Get your own FREE, personal Netscape Mail account today at http://webmail.netscape.com/




Looking for more information...

2002-04-16 Thread Marc Slagle



In the next few weeks our radio show might be 
tackling mod_perl as a topic. I've read everything on the perl.apache.org 
site (and followed the links from there to take23.org, etc.) 
I'vereadthe mod_perl articles on perl.comas well. My 
question is, are there any other less-obvious places to look for information 
that I'm missing? We've usedmod_perl for our development for years, 
and are very familiar withit.Links to anyplace that 
might have good articles, etc. would be great.

Thanks,
Marc SlagleThe Fulkert Consulting 
Group, Inc.559 Liberty Hill, Suite 2 WestCincinnati, Ohio 
45210513.665.4931http://www.fulkertconsulting.com


Help Needed - RegistryCooker.pm -mod_perl-2 - Apache 2.0.35 -(ActivePerl 631)

2002-04-16 Thread Arul, Rex

I am not sure, if I should post it here:

OS: Windows 2000; Perl:ActivePerl 631; Apache:2.0.35; Mod_Perl:1.99_01 downloaded via 
PPM under theorynx website.

In the httpd.conf, I am making the Apache::Registry pointer to be 
Apache2::ModPerl::Registry.

However, when my CGI script is run, I get this error:

Server error!
Error message: 
Can't locate ModPerl/RegistryCooker.pm in INC (INC contains: C:/Perl/lib 
C:/Perl/site/lib .) at C:/Perl/site/lib/Apache2/ModPerl/Registry.pm line 11. BEGIN 
failed--compilation aborted at C:/Perl/site/lib/Apache2/ModPerl/Registry.pm line 11. 
Compilation failed in require at (eval 1) line 3. 

However, on verifying the directory, I am able to see RegistryCooker.pm file under the 
INC path specified. It is lying right there next to Registry.pm!!!


-- Rex


__
Your favorite stores, helpful shopping tools and great gift ideas. Experience the 
convenience of buying online with Shop@Netscape! http://shopnow.netscape.com/

Get your own FREE, personal Netscape Mail account today at http://webmail.netscape.com/




Apache::DProf seg faulting

2002-04-16 Thread Sam Tregar

Hello all.  I'm trying to use Apache::DProf but all I get is seg faults.
I put these lines in my httpd.conf:

  PerlModule Apache::DB
  PerlModule Apache::DProf

Then I start the server, and it looks ok:

  [Tue Apr 16 17:22:12 2002] [notice] Apache/1.3.20 (Unix) mod_perl/1.25
  mod_ssl/2.8.4 OpenSSL/0.9.6a configured -- resuming normal operations
  [Tue Apr 16 17:22:12 2002] [info] Server built: Aug 17 2001 13:29:44
  [notice] Apache::DB initialized in child 2234
  [notice] Apache::DB initialized in child 2235

I hit the server and I get:

  [Tue Apr 16 17:22:17 2002] [notice] child pid 2235 exit signal
  Segmentation fault (11)
  [notice] Apache::DB initialized in child 2237

Looking in logs/dprof I see a bunch of numeric directories with tmon.out
files in them.  All the around same size (400 bytes).

Any suggestions on how to proceed?

-sam






Re: Problem with Perl sections in httpd.conf, mod_perl 1.26

2002-04-16 Thread Michael Schout

On 16 Apr 2002, PinkFreud wrote:

 I have a rather odd problem, one which I can only assume is a bug
 somewhere, due to how bizarre it is.

 I am attmempting to generate virtual host configs via mod_perl, using
 Perl sections in httpd.conf.  Not all hosts will be using a /perl
 Alias, though, so I'm reading in an external config, which looks like
 the following:

This sounds like hte problem that I suffered with for about a year, until
someone posted this patch recently to the mod_perl list that fixes the problem
for me.  For me, the symptom was that *sometimes*, certain entries in Perl
sections would not configure, no matter what was placed in them.  The patch
below fixes it for me.  Try the patch below and see if the problem goes away.
I'm not sure if this patch has made it into CVS yet or not.

Regards,
Mike

--
diff -ur mod_perl-1.26.orig/src/modules/perl/perl_config.c 
mod_perl-1.26/src/modules/perl/perl_config.c
--- mod_perl-1.26.orig/src/modules/perl/perl_config.c   Tue Jul 10 21:47:15 2001
+++ mod_perl-1.26/src/modules/perl/perl_config.cWed Feb 20 14:59:00 2002
 -1166,6 +1166,7 
 char *tmpkey;
 I32 tmpklen;
 SV *tmpval;
+void *old_info = cmd-info;
 (void)hv_iterinit(hv);
 while ((tmpval = hv_iternextsv(hv, tmpkey, tmpklen))) {
char line[MAX_STRING_LEN];
 -1195,6 +1196,7 
if(errmsg)
log_printf(cmd-server, Perl: %s, errmsg);
 }
+cmd-info = old_info;
 /* Emulate the handling of end token for the section */
 perl_set_config_vectors(cmd, cfg, core_module);
 }
 -1511,9 +1513,7 
 void *dummy = perl_set_config_vectors(cmd, config, core_module);
 void *old_info = cmd-info;

-if (strstr(key, Match)) {
-   cmd-info = (void*)key;
-}
+cmd-info = (void*)strstr(key,Match);

 if(strnEQ(key, Location, 8))
perl_urlsection(cmd, dummy, hv);
--





Re: Enforcing user logged in from only 1 browser?

2002-04-16 Thread Peter Bi

Fran:

1) agreed. If a custom login page is needed, one has to look for other
solutions such as cookie access control.

2) that depends. First, for some reasons, Internet is designed without
Logout. Many seldom logout from those services such as Yahoo mail, and me
too. For the specific question you posted (one login only for an account),
while it can be in principle designed and implemented,  in practice, it may
not work that smoothly, because many users still don't run Logout. Trust
me :-). So BA or cookie doesn't matter.  Second, you can make a link to
close the window using javascript, just like a Logout button.

3) will be very interesting to hear about your successful implementation!

(BTW, if only the existence status of an account is needed to double
check, please consider a lock file (e.g. -e) under Apache::File that may be
much faster than to call SessionDBI)


Peter


- Original Message -
From: Fran Fabrizio [EMAIL PROTECTED]
To: Peter Bi [EMAIL PROTECTED]
Cc: Jeff [EMAIL PROTECTED]; [EMAIL PROTECTED]
Sent: Tuesday, April 16, 2002 6:33 AM
Subject: Re: Enforcing user logged in from only 1 browser?


 Peter Bi wrote:
  If you touch SessionDBI for every request, why don't go directly to the
  Basic Authentication ?

 1.  You can't use a custom log in page
 2.  You can't log out unless you close your browser
 3.  It's for use by our employees only.  They are told to enable cookies.
=)

 -Fran








Re: Apache::DProf seg faulting

2002-04-16 Thread Sam Tregar

On 16 Apr 2002, Garth Winter Webb wrote:

 Sam, try getting rid of the 'PerlModule Apache::DB' line.  I've used
 Apache::DProf w/o any problems by including only the one PerlModule
 line.  Since they both want to use perl debugging hooks, I'm guessing
 that Apache::DProf is getting crashed up when it tries to use hooks
 already grabbed by Apache::DB...

Same result.  Thanks though!

-sam




Re: Apache::DProf seg faulting

2002-04-16 Thread Sam Tregar

On Tue, 16 Apr 2002, Sam Tregar wrote:

 On 16 Apr 2002, Garth Winter Webb wrote:

  Sam, try getting rid of the 'PerlModule Apache::DB' line.  I've used
  Apache::DProf w/o any problems by including only the one PerlModule
  line.  Since they both want to use perl debugging hooks, I'm guessing
  that Apache::DProf is getting crashed up when it tries to use hooks
  already grabbed by Apache::DB...

 Same result.  Thanks though!

Aw nuts, that was the problem!  I thought I'd tried that already, but I
guess not.  I actually got those PerlModule lines from the mod_perl
Developers Cookbook - guess this is an errata!

Thanks!
-sam






Re: Apache::DProf seg faulting

2002-04-16 Thread Perrin Harkins

Sam Tregar wrote:
 On Tue, 16 Apr 2002, Sam Tregar wrote:
 
 
On 16 Apr 2002, Garth Winter Webb wrote:


Sam, try getting rid of the 'PerlModule Apache::DB' line.  I've used
Apache::DProf w/o any problems by including only the one PerlModule
line.  Since they both want to use perl debugging hooks, I'm guessing
that Apache::DProf is getting crashed up when it tries to use hooks
already grabbed by Apache::DB...

Same result.  Thanks though!
 
 
 Aw nuts, that was the problem!  I thought I'd tried that already, but I
 guess not.  I actually got those PerlModule lines from the mod_perl
 Developers Cookbook - guess this is an errata!

Strange, that works for me.  I do it like this:
Perl
 use Apache::DProf;
 use Apache::DB;
 Apache::DB-init;
/Perl

Or at least I did last time.  Maybe this has changed in more recent 
versions.  At the time (June 2000), I discovered I needed to call 
Apache::DB-init or else the debugging symbols would not get put in for 
modules that I used in my startup.pl, and they would not get profiled.

- Perrin




Re: PerlRequire -mod_perl-2 - Apache 2.0.35

2002-04-16 Thread Randy Kobes

On Tue, 16 Apr 2002 [EMAIL PROTECTED] wrote:

 Hello Friends,

 I am a newbie and had developed a proof-of-concept
 application on Apache 1.3.23/Mod_Perl-1.26-dev. We are
 researching into moving away from ASP/IIS Webapplications to
 Apache/Mod_Perl. I am stuck with the latest Apache 2.0.35
 with the following problems.

 Today I installed Apache 2.0.35 with Mod_Perl-2. However, I
 am not able to use PerlRequire Statement in the httpd.conf.

 Whenever I am trying to restart my Windows Services, it is
 always giving me an error message which does not allow me to
 start my Windows Services.

A few things to perhaps look at ...

- does the error message give some more specific hint of what
may be wrong?

- does the service start OK, with mod_perl-2 enabled, if the
PerlRequire statement isn't there?

- with the PerlRequire statement, does Apache2 start OK
from the console?

- if it does start OK from the console, does mod_perl
work with your application?

- if it doesn't start from the console, does moving the
effects of the PerlRequire statement to your application
work?

best regards,
randy kobes




Re: Enforcing user logged in from only 1 browser?

2002-04-16 Thread Fran Fabrizio


Peter,

 2) that depends. First, for some reasons, Internet is designed without
 Logout. Many seldom logout from those services such as Yahoo mail, and me
 too. For the specific question you posted (one login only for an account),
 while it can be in principle designed and implemented,  in practice, it may
 not work that smoothly, because many users still don't run Logout. Trust
 me :-). So BA or cookie doesn't matter.  Second, you can make a link to
 close the window using javascript, just like a Logout button.

Well that's kind of why I'm here in the first place...looking for a real 
solution to users who don't log out. I'd rather force logout their old 
sessions rather than just resign to the fact that user's habits make 
logouts unpredictable.  It's not acceptable for our application's 
purposes to just leave active sessions open if it's at all possible to 
avoid.

 3) will be very interesting to hear about your successful implementation!

I would have been done yesterday had I not made a bonehead mistake and 
deleted a very important database table.  I'm still recovering from that 
mistake. :-(  Hopefully, I'll be able to tell you all about the 
successful implementation early next week.

 (BTW, if only the existence status of an account is needed to double
 check, please consider a lock file (e.g. -e) under Apache::File that may be
 much faster than to call SessionDBI)

I'm not too worried about performance...only about 100 users will ever 
have an account on this system, a fraction of them actively using the 
app at any one time.  But I'm not using the DBI for this part anyhow. 
I'm using Apache::Session::File, more or less (really using Flex but 
only overridding the Generate method).  The only time I hit the database 
is to check that the user/password are valid and get user preferences 
when they submit the login form.  The lock file actually isn't a 
workable solution, now that I think about it.  Just knowing a user has 
logged in and not logged out does me no good, I need to know if they 
have other valid session keys still in existence so I can expire them. 
A lock file could lead to false positives - if the key expired but they 
haven't visited again or explicitly logged out since, it'll be there but 
the user really doesn't have any active sessions.

I still think Jeff's post yesterday suggesting I store the AuthCookie 
key in the Apache::Session data is the answer.

Thanks for the dialog, I'll post the final results.

-Fran




Re: DSO on Solaris - child dies with seg fault

2002-04-16 Thread Doug MacEachern

you might actually be hitting a problem i just found on solaris with 2.0 
and perl 5.6.1.  a problem that is fixed in 5.8.0-tobe, where 
certain DynaLoader and XSLoader combo prevents modperl from closing all of 
the dlhandles.  try adding this to your startup.pl before use-ing any 
other modules:

use DynaLoader ();






Re: Help Needed - RegistryCooker.pm -mod_perl-2 - Apache 2.0.35-(ActivePerl 631)

2002-04-16 Thread Randy Kobes

On Tue, 16 Apr 2002, Arul, Rex wrote:

 I am not sure, if I should post it here:

 OS: Windows 2000; Perl:ActivePerl 631; Apache:2.0.35;
 Mod_Perl:1.99_01 downloaded via PPM under theorynx website.

 In the httpd.conf, I am making the Apache::Registry pointer
 to be Apache2::ModPerl::Registry.

 However, when my CGI script is run, I get this error:

 Server error! Error message:  Can't locate
 ModPerl/RegistryCooker.pm in INC (INC contains: C:/Perl/lib
 C:/Perl/site/lib .) at
 C:/Perl/site/lib/Apache2/ModPerl/Registry.pm line 11. BEGIN
 failed--compilation aborted at
 C:/Perl/site/lib/Apache2/ModPerl/Registry.pm line 11.
 Compilation failed in require at (eval 1) line 3.

 However, on verifying the directory, I am able to see
 RegistryCooker.pm file under the INC path specified. It is
 lying right there next to Registry.pm!!!

It looks like the Apache2/ subdirectory isn't being added
to INC. Do you 'use Apache2' in your set-up? Does adding
that to your script help?

best regards,
randy kobes





RE: Re: PerlRequire -mod_perl-2 - Apache 2.0.35

2002-04-16 Thread Arul, Rex

Randy:

Thanks for your response. Here are my responses:
A few things to perhaps look at ...

- does the error message give some more specific hint of what
may be wrong?

Not at all. THE REQUESTED OPERATION HAS FAILED -- This is the message that I get 
from Apache Monitor Services application. 


- does the service start OK, with mod_perl-2 enabled, if the
PerlRequire statement isn't there?

Yes! Apache2 server starts fine under the 'Apache Monitor Services' Application tool, 
when I remove PerlRequire Statement. And on that Application, it clearly shows the 
server as : Apache/2.0.35(Win32)mod_perl/1.99_02-dev Perl/v5.6.1

In order for this to work, I had to resort to:

LoadModule perl_module modules/mod_perl.so

If I give the command as you had mentioned somewhere as:

PerlModule Apache2

or in the startup script as:

use Apache2 ();

IT NEVER Works! The problem then basically comes back to Apache2 services not being 
able to started up with no meaningful error messages. So at least to get the server up 
and running, I had to put LoadModule command rather than PerlModule or the startup 
script approach!



- with the PerlRequire statement, does Apache2 start OK
from the console?

For this test. I comment the LoadModule statement and am following your advisory in to 
to.i.e, All that I have in httpd.conf is 

PerlModule Apache2

Now I am trying from command-line. Here is the error message that I am getting.

C:\Apache\Apache2\binapache
Syntax error on line 973 of C:/Apache/Apache2/conf/httpd.conf:
Invalid command 'PerlModule', perhaps mis-spelled or defined by a module not inc
luded in the server configuration


- if it does start OK from the console, does mod_perl
work with your application?

Not Applicable.


- if it doesn't start from the console, does moving the
effects of the PerlRequire statement to your application
work?

No.

Randy, any help will be greatly appreciated.

Thanks in advance,
Rex


__
Your favorite stores, helpful shopping tools and great gift ideas. Experience the 
convenience of buying online with Shop@Netscape! http://shopnow.netscape.com/

Get your own FREE, personal Netscape Mail account today at http://webmail.netscape.com/




Re: Apache::DProf seg faulting

2002-04-16 Thread Sam Tregar

On Tue, 16 Apr 2002, Perrin Harkins wrote:

 Strange, that works for me.  I do it like this:
 Perl
  use Apache::DProf;
  use Apache::DB;
  Apache::DB-init;
 /Perl

That works, but this doesn't:

  Perl
   use Apache::DB;
   use Apache::DProf;
   Apache::DB-init;
  /Perl

It looks like the poison pill is loading Apache::DB before Apache::DProf.
Odd, eh?

-sam




RE: Re: Help Needed - RegistryCooker.pm -mod_perl-2 - Apache 2.0.35-(ActivePerl 631)

2002-04-16 Thread Arul, Rex

Randy Kobes [EMAIL PROTECTED] wrote:

On Tue, 16 Apr 2002, Arul, Rex wrote:

 I am not sure, if I should post it here:

 OS: Windows 2000; Perl:ActivePerl 631; Apache:2.0.35;
 Mod_Perl:1.99_01 downloaded via PPM under theorynx website.

 In the httpd.conf, I am making the Apache::Registry pointer
 to be Apache2::ModPerl::Registry.

 However, when my CGI script is run, I get this error:

 Server error! Error message:  Can't locate
 ModPerl/RegistryCooker.pm in @INC (@INC contains: C:/Perl/lib
 C:/Perl/site/lib .) at
 C:/Perl/site/lib/Apache2/ModPerl/Registry.pm line 11. BEGIN
 failed--compilation aborted at
 C:/Perl/site/lib/Apache2/ModPerl/Registry.pm line 11.
 Compilation failed in require at (eval 1) line 3.

 However, on verifying the directory, I am able to see
 RegistryCooker.pm file under the @INC path specified. It is
 lying right there next to Registry.pm!!!

It looks like the Apache2/ subdirectory isn't being added
to @INC. Do you 'use Apache2' in your set-up? Does adding
that to your script help?

It just bombs if I try to use the statement,

use Apache2;
or
use Apache2 ();

in the startup script. Well! If you think about it, I am in Catch-22. For startup 
script to work, PerlRequire should work. That is not working in my case.

So I put

PerlModule Apache2

expecting that to work!

Well, that is not working either. Services Panel correctly recognizes that 
Mod_Perl_1.99 has been associated with Apache 2.0.35 installation. The Files are in 
the right directories posited by @INC.

Thanks,
Rex


__
Your favorite stores, helpful shopping tools and great gift ideas. Experience the 
convenience of buying online with Shop@Netscape! http://shopnow.netscape.com/

Get your own FREE, personal Netscape Mail account today at http://webmail.netscape.com/




RE: Re: PerlRequire -mod_perl-2 - Apache 2.0.35

2002-04-16 Thread Randy Kobes

On Tue, 16 Apr 2002, Arul, Rex wrote:

 Randy:

 Thanks for your response. Here are my responses:
 A few things to perhaps look at ...
 
 - does the service start OK, with mod_perl-2 enabled, if the
 PerlRequire statement isn't there?

 Yes! Apache2 server starts fine under the 'Apache Monitor
 Services' Application tool, when I remove PerlRequire
 Statement. And on that Application, it clearly shows the
 server as : Apache/2.0.35(Win32)mod_perl/1.99_02-dev
 Perl/v5.6.1

 
 - with the PerlRequire statement, does Apache2 start OK
 from the console?

 For this test. I comment the LoadModule statement and am
 following your advisory in to to.i.e, All that I have in
 httpd.conf is

 PerlModule Apache2

 Now I am trying from command-line. Here is the error message
 that I am getting.

 C:\Apache\Apache2\binapache Syntax error on line 973 of
 C:/Apache/Apache2/conf/httpd.conf: Invalid command
 'PerlModule', perhaps mis-spelled or defined by a module not
 inc luded in the server configuration

That's because the LoadModule directive is needed to load
mod_perl.so; reenable it to get rid of this error ...

Do you have mod_perl-1 installed in the same Perl tree?
If so, it may be that things are getting confused with
trying to find the mod_perl-2 stuff under
\Perl\Site\lib\Apache2
Perhaps try temporarily rename
\Perl\site\lib\Apache.pm
\Perl\site\lib\Apache
to something else, and then also having a
use Apache2;
in your start-up routine.

best regards,
randy




Re: Problem with Perl sections in httpd.conf, mod_perl 1.26

2002-04-16 Thread PinkFreud

Thanks for the patch, Michael.  Unfortunately, this doesn't seem to fix
my problem.  :(

[Tue Apr 16 19:11:47 2002] [error] [client x.x.x.x] File does not exist: 
/home/vhosts/linuxhelp.mirkwood.net/htdocs/perl/

It's still ignoring the Alias directive, when require'd from another
file.

On Tue, Apr 16, 2002 at 02:53:35PM -0500, Michael Schout babbled thus:
 Date: Tue, 16 Apr 2002 14:53:35 -0500 (CDT)
 From: Michael Schout [EMAIL PROTECTED]
 To: PinkFreud [EMAIL PROTECTED]
 Cc: [EMAIL PROTECTED]
 Subject: Re: Problem with Perl sections in httpd.conf, mod_perl 1.26
 
 On 16 Apr 2002, PinkFreud wrote:
 
  I have a rather odd problem, one which I can only assume is a bug
  somewhere, due to how bizarre it is.
 
  I am attmempting to generate virtual host configs via mod_perl, using
  Perl sections in httpd.conf.  Not all hosts will be using a /perl
  Alias, though, so I'm reading in an external config, which looks like
  the following:
 
 This sounds like hte problem that I suffered with for about a year, until
 someone posted this patch recently to the mod_perl list that fixes the problem
 for me.  For me, the symptom was that *sometimes*, certain entries in Perl
 sections would not configure, no matter what was placed in them.  The patch
 below fixes it for me.  Try the patch below and see if the problem goes away.
 I'm not sure if this patch has made it into CVS yet or not.
 
 Regards,
 Mike
 
 --
 diff -ur mod_perl-1.26.orig/src/modules/perl/perl_config.c 
mod_perl-1.26/src/modules/perl/perl_config.c
 --- mod_perl-1.26.orig/src/modules/perl/perl_config.c   Tue Jul 10 21:47:15 2001
 +++ mod_perl-1.26/src/modules/perl/perl_config.cWed Feb 20 14:59:00 2002
 @@ -1166,6 +1166,7 @@
  char *tmpkey;
  I32 tmpklen;
  SV *tmpval;
 +void *old_info = cmd-info;
  (void)hv_iterinit(hv);
  while ((tmpval = hv_iternextsv(hv, tmpkey, tmpklen))) {
 char line[MAX_STRING_LEN];
 @@ -1195,6 +1196,7 @@
 if(errmsg)
 log_printf(cmd-server, Perl: %s, errmsg);
  }
 +cmd-info = old_info;
  /* Emulate the handling of end token for the section */
  perl_set_config_vectors(cmd, cfg, core_module);
  }
 @@ -1511,9 +1513,7 @@
  void *dummy = perl_set_config_vectors(cmd, config, core_module);
  void *old_info = cmd-info;
 
 -if (strstr(key, Match)) {
 -   cmd-info = (void*)key;
 -}
 +cmd-info = (void*)strstr(key,Match);
 
  if(strnEQ(key, Location, 8))
 perl_urlsection(cmd, dummy, hv);
 --
 
 

-- 

Mike Edwards

Brainbench certified Master Linux Administrator
http://www.brainbench.com/transcript.jsp?pid=158188
---
Unsolicited advertisments to this address are not welcome.



RE: RE: Re: PerlRequire -mod_perl-2 - Apache 2.0.35

2002-04-16 Thread Arul, Rex

Randy:

In order to keep my Apache 1.3.23/Mod_Perl-1.26 safe, I tried installing Apache 
2.0.35/mod_perl-2 on a different NT 4.0 Server with ActivePerl 628.

LoadModule perl_module modules/mod_perl.so
PerlModule Apache2

WORKS!!!

However, when I write a simple Perl CGI page, it bombs at the notorious 
RegistryCooker!!

Here is the error message for your perusal:

Server error!
Error message: 
Attempt to free unreferenced scalar at 
E:/Perl/site/lib/Apache2/ModPerl/RegistryCooker.pm line 45. BEGIN failed--compilation 
aborted at E:/Perl/site/lib/Apache2/ModPerl/RegistryCooker.pm line 48. Compilation 
failed in require at E:/Perl/site/lib/Apache2/ModPerl/Registry.pm line 11. BEGIN 
failed--compilation aborted at E:/Perl/site/lib/Apache2/ModPerl/Registry.pm line 11. 
Compilation failed in require at (eval 2) line 3. 
If you think this is a server error, please contact the webmaster 
Error 500
retail_office 
04/16/02 08:55:25 PM 
Apache/2.0.35 (Win32) mod_perl/1.99_02-dev Perl/v5.6.1 

Kindly help.

Thanks,
Rex


Randy Kobes [EMAIL PROTECTED] wrote:


That's because the LoadModule directive is needed to load
mod_perl.so; reenable it to get rid of this error ...

Do you have mod_perl-1 installed in the same Perl tree?
If so, it may be that things are getting confused with
trying to find the mod_perl-2 stuff under
    \Perl\Site\lib\Apache2
Perhaps try temporarily rename
    \Perl\site\lib\Apache.pm
    \Perl\site\lib\Apache
to something else, and then also having a
    use Apache2;
in your start-up routine.

best regards,
randy




__
Your favorite stores, helpful shopping tools and great gift ideas. Experience the 
convenience of buying online with Shop@Netscape! http://shopnow.netscape.com/

Get your own FREE, personal Netscape Mail account today at http://webmail.netscape.com/




Re: PerlRequire -mod_perl-2 - Apache 2.0.35

2002-04-16 Thread RStar

Randy, 

For what it's worth, I can verify Rex's experience with the exception
that I used a win2k platform instead of Nt 4. I do have use Apache2 in
my startup.pl.

Rich

Arul, Rex wrote:
 
 Randy:
 
 In order to keep my Apache 1.3.23/Mod_Perl-1.26 safe, I tried installing Apache 
2.0.35/mod_perl-2 on a different NT 4.0 Server with ActivePerl 628.
 
 LoadModule perl_module modules/mod_perl.so
 PerlModule Apache2
 
 WORKS!!!
 
 However, when I write a simple Perl CGI page, it bombs at the notorious 
RegistryCooker!!
 
 Here is the error message for your perusal:
 
 Server error!
 Error message:
 Attempt to free unreferenced scalar at 
E:/Perl/site/lib/Apache2/ModPerl/RegistryCooker.pm line 45. BEGIN failed--compilation 
aborted at E:/Perl/site/lib/Apache2/ModPerl/RegistryCooker.pm line 48. Compilation 
failed in require at E:/Perl/site/lib/Apache2/ModPerl/Registry.pm line 11. BEGIN 
failed--compilation aborted at E:/Perl/site/lib/Apache2/ModPerl/Registry.pm line 11. 
Compilation failed in require at (eval 2) line 3.
 If you think this is a server error, please contact the webmaster
 Error 500
 retail_office
 04/16/02 08:55:25 PM
 Apache/2.0.35 (Win32) mod_perl/1.99_02-dev Perl/v5.6.1
 
 Kindly help.
 
 Thanks,
 Rex
 
 Randy Kobes [EMAIL PROTECTED] wrote:
 
 
 That's because the LoadModule directive is needed to load
 mod_perl.so; reenable it to get rid of this error ...
 
 Do you have mod_perl-1 installed in the same Perl tree?
 If so, it may be that things are getting confused with
 trying to find the mod_perl-2 stuff under
 \Perl\Site\lib\Apache2
 Perhaps try temporarily rename
 \Perl\site\lib\Apache.pm
 \Perl\site\lib\Apache
 to something else, and then also having a
 use Apache2;
 in your start-up routine.
 
 best regards,
 randy
 
 
 
 __
 Your favorite stores, helpful shopping tools and great gift ideas. Experience the 
convenience of buying online with Shop@Netscape! http://shopnow.netscape.com/
 
 Get your own FREE, personal Netscape Mail account today at 
http://webmail.netscape.com/

-- 
-
   He who will trade freedom for security will get, nor deserve,
neither
   --
   On the net, you either lead the pack or play with the puppies.
-



Apache::Reload

2002-04-16 Thread Luke Pascoe

After much fluffing around I managed to get Apache::Reload to work for .pm
files with:
httpd.conf
  Location /
PerlRequire /the/path/to/the/perl/startup.pl
PerlInitHandler Apache::Reload
SetHandler perl-script
PerlHandler Apache::Registry
Options +ExecCGI
  /Location
/httpd.conf

BUT

Is it possible to get simple library files (ie. No package def.) to be
reloaded too?

For example:
index.cgi
#! /usr/bin/perl -w

use strict;
require test.pl;

go();
/index.cgi

test.pl
sub go
{
  print Hello Worldbr;
}

1;
/test.pl

Changes to sub go in test.pl DO NOT get reloaded, but I'd like them to. Yes,
I could just make this a package but I'd rather not.


Luke Pascoe
Developer
IT Support  Development Limited
http://www.itsd.co.nz
Mobile: (021) 303019
Email: [EMAIL PROTECTED]





Re: Looking for more information...

2002-04-16 Thread Stas Bekman

Marc Slagle wrote:
 In the next few weeks our radio show might be tackling mod_perl as a 
 topic.  I've read everything on the perl.apache.org site (and followed 
 the links from there to take23.org, etc.)  I've read the mod_perl 
 articles on perl.com as well.  My question is, are there any other 
 less-obvious places to look for information that I'm missing?  We've 
 used mod_perl for our development for years, and are very familiar 
 with it.  Links to any place that might have good articles, etc. would 
 be great.

http://perl.apache.org/guide/ has a lot of good info. It'll keep you 
busy for a long long time if you didn't read it yet.

What else do you need? There are two mod_perl books that you may wish to 
purchase and read, see the links on the site.

__
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




RE: Re: Help Needed - RegistryCooker.pm -mod_perl-2 - Apache 2.0.35-(ActivePerl631)

2002-04-16 Thread Arul, Rex

Stas:

The fix still does not work. Here is the error message (OS: Windows NT 4.0 SP 6a; 
ActivePerl 628; PPM Install of Mod_Perl-1.99 from theoryx.uwinnipeg.ca and Apache 
2.0.35):

Server error!
Error message: 
Attempt to free unreferenced scalar at 
E:/Perl/site/lib/Apache2/ModPerl/RegistryCooker.pm line 53. Compilation failed in 
require at E:/Perl/site/lib/Apache2/ModPerl/Registry.pm line 11. BEGIN 
failed--compilation aborted at E:/Perl/site/lib/Apache2/ModPerl/Registry.pm line 11. 
Compilation failed in require at (eval 2) line 3. 
If you think this is a server error, please contact the webmaster 
Error 500
retail_office 
04/16/02 10:58:18 PM 
Apache/2.0.35 (Win32) mod_perl/1.99_02-dev Perl/v5.6.1 

-- Rex
Stas Bekman [EMAIL PROTECTED] wrote:

Try this patch that doug just committed to cvs:


dougm       02/04/16 10:14:16

   Modified:    ModPerl-Registry/lib/ModPerl RegistryCooker.pm
   Log:
   Apache-server-dir_config crashes on win32; comment it out for the 
moment

   Revision  Changes    Path
   1.6       +5 -4 
modperl-2.0/ModPerl-Registry/lib/ModPerl/RegistryCooker.pm

   Index: RegistryCooker.pm
   ===
   RCS file: 
/home/cvs/modperl-2.0/ModPerl-Registry/lib/ModPerl/RegistryCooker.pm,v
   retrieving revision 1.5
   retrieving revision 1.6
   diff -u -r1.5 -r1.6
   --- RegistryCooker.pm    13 Nov 2001 04:34:31 -  1.5
   +++ RegistryCooker.pm    16 Apr 2002 17:14:16 -  1.6
   @@ -42,10 +42,11 @@
    # httpd.conf with:
    #   PerlSetVar ModPerl::RegistryCooker::DEBUG 4
    use Apache::ServerUtil ();
   -use constant DEBUG =
-    defined Apache-server-dir_config('ModPerl::RegistryCooker::DEBUG')
   -        ? Apache-server-dir_config('ModPerl::RegistryCooker::DEBUG')
   -        : D_NONE;
   +use constant DEBUG = 0;
   +#XXX: below currently crashes the server on win32
   +#    defined 
Apache-server-dir_config('ModPerl::RegistryCooker::DEBUG')
   +#        ? Apache-server-dir_config('ModPerl::RegistryCooker::DEBUG')
   +#        : D_NONE;

 
#
    # object's array index's access constants




__
Stas Bekman            JAm_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




__
Your favorite stores, helpful shopping tools and great gift ideas. Experience the 
convenience of buying online with Shop@Netscape! http://shopnow.netscape.com/

Get your own FREE, personal Netscape Mail account today at http://webmail.netscape.com/




Re: Looking for more information...

2002-04-16 Thread Marc Slagle

 What else do you need? There are two mod_perl books that you may wish to
 purchase and read, see the links on the site.

Got the books too.

I'm almost there, but could still use any nifty statistics, etc.  Most of
the stories I've seen are for defunct sites/companies.  I'm creating a site
to go along with the show, and would like for that episodes page to have
some links for the management types to see, since we usually find that
management is our main block in getting mod_perl in the door.  Thanks
again...




Re: Looking for more information...

2002-04-16 Thread Stas Bekman

Marc Slagle wrote:
What else do you need? There are two mod_perl books that you may wish to
purchase and read, see the links on the site.
 
 
 Got the books too.
 
 I'm almost there, but could still use any nifty statistics, etc.  Most of
 the stories I've seen are for defunct sites/companies.  I'm creating a site
 to go along with the show, and would like for that episodes page to have
 some links for the management types to see, since we usually find that
 management is our main block in getting mod_perl in the door.  Thanks
 again...

ah, well we are working on the new site, with the layout/content being 
much improved and stories updated. Just give us some more time as we 
fledge out some last bits. For now check:
http://perl.apache.org/preview/modperl-docs/dst_html/
We do need help cleaning things up, especially dead stories, so if 
anybody can give a hand please do so.

Stats are here:
http://perl.apache.org/preview/modperl-docs/dst_html/outstanding/stats/index.html

I'm not sure which episode you are working on. But may be we should work 
together and eventually host it on perl.apache.org? Thus it'll be kept 
updated and re-used by many others that badly need to have it? You will 
also get a lot of help this way.

__
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




mod_perl-2 - Apache 2.0.35 - Windows NT/2000 - Preliminary Woes cleared

2002-04-16 Thread Arul, Rex

Thanks a lot to Stas and Randy, I have got the MOD_PERL-1.99 and Apache 2.0.35 to get 
started up and running to serve the first CGIs under MOD_PERL in Windows NT 4.0 SP 6a 
environment. I am sure it should be the same for Windows 2000 too.

Points:

1) I am having problems in my Windows 2000 Workstation, because I am running both 
Apache 1.3.23/Mod_Perl-1.26 as well as Apache 2.0.35/Mod_Perl-1.99. Therefore, there 
are certainly name-clashes as far as Mod_Perl-1.99 is concerned (vide Randy's email 
rejoinder). Therefore, I had installed Apache 2.0.35 with Mod_Perl-1.99 under a 
Windows NT 4.0 with SP 6a and ActivePerl 628, without any previous Apache/Mod_Perl 
installed to it.

2) Please note that when I did not have two different Apache and Mod_Perl versions on 
the Server, the :

PerlModule Apache2

configuration item on httpd.conf did work as per the advisories. Previously this did 
not work for me, because I had two versions of Apache and mod_perl running in it.

3) Even after running a lone Apache 2.0.35/Mod_Perl-1.99 on Windows NT 4.0/SP 6a, I 
was having problems with RegistryCooker.pm (vide, my own emails today on the topic).

4) Stas had posited to a new bug-fix of Doug. I applied it to the RegistryCooker.pm 
file.

5) Now the woes with respect to RegistryCooker.pm cleared. But CGIs would just not 
serve. Reason was because, I had given in the httpd.conf file the configuration as 
thus:

PerlHandler Apache2::ModPerl::Registry

It complained that it could not find that one!!

6) Stas was kind enough to guide me on this. According to his valuable advice, I 
changed the PerlHandler statement in httpd.conf as thus:

PerlHandler ModPerl::Registry

Please note, that at this point, I could also make the startup.pl script (a simple 
startup script that I wrote to preload CGI and other modules) run using:

PerlRequire e:/admin/rarul/apache2/startup.pl 

statement.

Currently, I am able to make Apache 2.0.35 work with MOD_PERL-1.99-dev on Windows NT 
4.0/SP 6a, without any problem. To get to this point itself, it took a lot of 
collective effort and thanks to one and all in this list.

Hopefully this information will be helpful to the Windows Users. 

Thanks,
Rex


__
Your favorite stores, helpful shopping tools and great gift ideas. Experience the 
convenience of buying online with Shop@Netscape! http://shopnow.netscape.com/

Get your own FREE, personal Netscape Mail account today at http://webmail.netscape.com/




Sharing Variable Across Apache Children

2002-04-16 Thread Benjamin Elbirt

Hey,

I've gotten it so that I can define a variable across apache children,
however when I update the variable, it only updates for the active
child.  Is there any way to share a variable across children so no
matter what child is doing the update, the variable is updated for all
children?

Thanks a ton.

B




Re: Sharing Variable Across Apache Children

2002-04-16 Thread Stas Bekman

Benjamin Elbirt wrote:
 Hey,
 
 I've gotten it so that I can define a variable across apache children,
 however when I update the variable, it only updates for the active
 child.  Is there any way to share a variable across children so no
 matter what child is doing the update, the variable is updated for all
 children?


You cannot do that unless you use IPC, which is usually only useful if 
he variable is small. DBM file is another solution if you need share a 
hash variable.

some info is 
here:http://perl.apache.org/preview/modperl-docs/dst_html/docs/1.0/guide/porting.html#Sharing_variables_between_processes

This section needs work. Can anybody help me improve this section? Thanks!

__
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




Re: PerlRequire -mod_perl-2 - Apache 2.0.35

2002-04-16 Thread pascal barbedor


  Hello Friends,
 
  I am a newbie and had developed a proof-of-concept
  application on Apache 1.3.23/Mod_Perl-1.26-dev. We are
  researching into moving away from ASP/IIS Webapplications to
  Apache/Mod_Perl. I am stuck with the latest Apache 2.0.35
  with the following problems.
 
  Today I installed Apache 2.0.35 with Mod_Perl-2. However, I
  am not able to use PerlRequire Statement in the httpd.conf.
 
  Whenever I am trying to restart my Windows Services, it is
  always giving me an error message which does not allow me to
  start my Windows Services.



Hi
 for me on winnt, apache 2.0.35 could be installed but once refused to start
as a service too.
and this was because it was necessary to explicitely specify a drive letter
for serverroot and documentroot (etc. maybe)
in the httpd.conf whereas apache doc say if you do not, it will prepend the
drive letter of the apache.exe


pascal