Installing mod_perl on Windows 7

2011-11-29 Thread Desilets, Alain
Hi folks, This is my first post on this list. I am trying to install mod_perl on Windows 7, and am running into some problems. Here's what I did. First, I ran the following commands to get the mod_perl package and install it: ppm rep add http://cpan.uwinnipeg.ca/PPMPackages/12

RE: Installing mod_perl on Windows 7

2011-11-29 Thread Desilets, Alain
: mod_perl list Subject: Re: Installing mod_perl on Windows 7 Desilets, Alain wrote: > Hi folks, > > This is my first post on this list. > > I am trying to install mod_perl on Windows 7, and am running into some > problems. > > Here's what I did. > > First, I ra

RE: Installing mod_perl on Windows 7

2011-11-29 Thread Desilets, Alain
talling mod_perl for windows, and I can't find any additional step beyond the ones I have taken so far. Any suggestions you have will be greatly appreciated. Thx. Alain Désilets -Original Message- From: André Warnier [mailto:a...@ice-sa.com] Sent: Tuesday, November 29, 2011 10:48

RE: Installing mod_perl on Windows 7

2011-11-29 Thread Desilets, Alain
25 PM To: mod_perl list Subject: Re: Installing mod_perl on Windows 7 Desilets, Alain wrote: > OK, so I uninstalled Apache 64 bits, and installed Apache 32 bits instead. > > Now, Apache starts correctly with the following two lines in httpd.conf > > > LoadFi

RE: Installing mod_perl on Windows 7

2011-11-30 Thread Desilets, Alain
> But try this : > At the beginning of your script, add these lines : > > use Apache::RequestRec; > > my $r=shift; > print "Hostname : ",$r->hostname,"\n"; > > if you don't get an error, and you see the line in the output, then for sure > you /are/ > running under mod_perl. I did this and it g

RE: Installing mod_perl on Windows 7

2011-11-30 Thread Desilets, Alain
Oups... pressed the wrong key and sent it before I was done. I guess the documentation on this page is not accurate then: http://perl.apache.org/docs/1.0/guide/install.html#Testing_via_CGI_script because I'm definitely NOT seeing GATEWAY_INTERFACE=CGI-Perl/1.1 (it's CGI/1.1). Thanks a million!

CGI::Utils->getSelfRefUrlWithQuery() not working inside mod_perl?

2011-12-01 Thread Desilets, Alain
Trying to migrate a complex script from a standard CGI context to a mod_perl context, and am having a hell of a time. The latest problem is that I have a call to GCI::Utils->getSelfRefUrlWithQuery() which causes a crash. In an attempt to isolate the problem, I wrote this short script which does

RE: CGI::Utils->getSelfRefUrlWithQuery() not working inside mod_perl?

2011-12-01 Thread Desilets, Alain
request does indeed return a valid request. When I print the returned instance, it says: Apache2::RequestRec=SCALAR(0x485052c) which indicates that it is indeed a scalar that is blessed into the RequestRec class. ____ From: Desilets, Alain Sent: Thursday,

RE: CGI::Utils->getSelfRefUrlWithQuery() not working inside mod_perl?

2011-12-02 Thread Desilets, Alain
not working inside mod_perl? Desilets, Alain wrote: > Trying to migrate a complex script from a standard CGI context to a mod_perl > context, and am having a hell of a time. The latest problem is that I have a > call to GCI::Utils->getSelfRefUrlWithQuery() which causes a crash. >

Is it me or is mod_perl extremely dangerous?

2011-12-05 Thread Desilets, Alain
I'm a complete newbie to mod_perl, and after reading the following documentation: http://perl.apache.org/docs/1.0/guide/porting.html I am scared witless by the fact that many variables don't get reinitialized between calls to the CGI scripts. Particularly scary is the example provided on that

RE: Is it me or is mod_perl extremely dangerous?

2011-12-05 Thread Desilets, Alain
Hum... I'm puzzled. According to this page: http://docstore.mik.ua/orelly/weblinux2/apache/ch17_05.htm One of the ways to avoid these kinds of problems is to: "Put your code into modules as subroutines and call it from the main script - for some reason global variables in the module will be in

RE: Is it me or is mod_perl extremely dangerous?

2011-12-06 Thread Desilets, Alain
> > On Tue, Dec 6, 2011 at 5:35 AM, Desilets, Alain > > wrote: > >> However, even those high quality CPAN modules can fall flat on their face > >> when > they are used in contexts that they weren't designed for. For > >> example, I recently > d

RE: Is it me or is mod_perl extremely dangerous?

2011-12-06 Thread Desilets, Alain
> > But declaring a variable as "my" is not sufficient to prevent it from being > > persistent. You can declare a package variable with "my" and it will > > persist. > > That's true! I assume you mean this: > > my $foo = 7; > > sub print_foo { > print $foo; > } > > That's called a closure.

Perl sections in Apache conf files

2012-01-16 Thread Desilets, Alain
I am trying to use sections in my Apache conf files, in order to automate management of my various installations on various servers. Looking at this page: http://perl.apache.org/docs/2.0/api/Apache2/PerlSections.html#Configuration_Variables I gather that any directive that can be written in an

RE: Perl sections in Apache conf files

2012-01-16 Thread Desilets, Alain
}; --- But Apache does not start. What am I doing wrong here? ________ From: Desilets, Alain [alain.desil...@nrc-cnrc.gc.ca] Sent: Monday, January 16, 2012 4:36 PM To: modperl@perl.apache.org Subject: Perl sections in Apache conf files I am trying

Reloading Apache::Registry modules without restarting Apache

2012-01-20 Thread Desilets, Alain
I'm using mod_perl on Windows 7, and am trying to set things up so that I can reload my script and all the modules it uses, without having to restart Apache. The problem is that my script (called webitext.cgi) updates the @INC variable using statements like these: --- use lib "$ENV{WEBITEXT_HOM

RE: Reloading Apache::Registry modules without restarting Apache

2012-01-20 Thread Desilets, Alain
> In other words, it does not really make sense to expect a different lib path > per virtual > host, since the perl modules and scripts exist on a "one per process" base, > not a "one per > virtual host" base. > Or, you have to really set the lib path dynamically, on a per-request base, > not ju