Re: Apache::Reload and INC path partialy working

2003-08-14 Thread Geoffrey Young

Here's my perl.conf (sourced by httpd.conf)
start
LoadModule perl_module modules/mod_perl.so

PerlSetEnv PERL5LIB /home/bruce/public_html/ffball/myff
on second thought, try

PerlSwitches -I/home/bruce/public_html/ffball/myff

or

PerlSwitches -Mlib=/home/bruce/public_html/ffball/myff

instead of PERL5LIB

--Geoff




Re: Apache::Reload and INC path partialy working

2003-08-14 Thread Ron Savage
Hi Folks

Fascinating to see this on a non-Windows box.

Reloading modules after they have been editied, eg httpd like so:

PerlModule Apache::Reload
PerlInitHandler Apache::Reload
PerlSetVar ReloadAll Off
PerlSetVar ReloadModules "CGI CGI::Application ... Sweep::*"

works about 99% of the time under Win2K and XP. I've been assuming
it's a Windows thing. Perhaps the problem lies deeper?

Server Version: Apache/2.0.46 (Win32) mod_perl/1.99_10-dev
Perl/v5.8.0
--
Ron Savage, [EMAIL PROTECTED] on 14/08/2003. Room EF 312
Deakin University, 221 Burwood Highway, Burwood, VIC 3125, Australia
Phone: +61-3-9251 7067, Fax: +61-3-9251 7604
http://www.deakin.edu.au/~rons




Re: Apache::Reload and INC path partialy working

2003-08-14 Thread Geoffrey Young


Bruce Tennant wrote:
I'm trying to do some development work with mod_perl and find
restarting the server a pain.  So I setup Apache::Reload, but it
doesn't seem to want to see my local devel directory all the time.
Here's my settings
Apache/2.0.40
mod_perl-1.99_7
please upgrade to the latest CVS version and try again - 1.99_07 is very old.


Linux 2.4.20-8 (RedHat9 I think)

Here's my perl.conf (sourced by httpd.conf)
start
LoadModule perl_module modules/mod_perl.so

PerlSetEnv PERL5LIB /home/bruce/public_html/ffball/myff

Here's the problem.  It seems that the reload module is finding the
local modules okay as it shows up in the error_log as checking the
mtime.  But when they do change, it dies when it tries to reload
them and says they aren't in the @INC path.
ok.  can you show us @INC before and after the reload attempt?  I'm curious 
as to whether PERL5LIB is being properly added to @INC for the request time 
interpreters.

also, does it fail if you reload modules that are not in @INC?  for 
instance, try touching CGI.pm or something in your site_lib and watch the 
debug messages.

So it's like it is half working.

Has anyone ! else seen this problem and have a possible fix?
we'll find a fix if we can isolate and reproduce the problem, don't worry :)

--Geoff



Fwd: Re: Apache::Reload and INC path partialy working

2003-08-14 Thread Bruce Tennant
Forwarding message as I didn't realize I was missing the list.
Geoffrey Young <[EMAIL PROTECTED]> wrote:

Date: Tue, 12 Aug 2003 14:18:37 -0400From: Geoffrey Young <[EMAIL PROTECTED]>To: Bruce Tennant <[EMAIL PROTECTED]>Subject: Re: Apache::Reload and INC path partialy workingok, I'll take a look at this.please repost to the list, though, so others can help and your results are recorded.and no, there is no rpm package for the latest CVS version that I know about - you'll need to compile it yourself (which is easy, don't worry :)--GeoffBruce Tennant wrote:> The INC is correct (it has the new path in it).> > But if I touch a file in the added directory, it detects the file as > being changed (uses proper INC), but seems to not find it when it is > trying to reload it (sees base INC).> > I tried another thing, use a startup.pl file, it seems to work 90% of > the time.
 Sometimes when a file is changed or reloaded, one of the sub > httpd process will say it knows nothing about the reloaded module. But > I can work w/this as a hitting reload on the browser fixes this.> > Here's the INC when no module is changed:> /home/bruce/public_html/ffball/myff > /usr/lib/perl5/vendor_perl/5.8.0/i386-linux-thread-multi/Apache2 > /usr/lib/perl5/5.8.0/i386-linux-thread-multi /usr/lib/perl5/5.8.0 > /usr/lib/perl5/site_perl/5.8.0/i386-linux-thread-multi > /usr/lib/perl5/site_perl/5.8.0 /usr/lib/perl5/site_perl > /usr/lib/perl5/vendor_perl/5.8.0/i386-linux-thread-multi > /usr/lib/perl5/vendor_perl/5.8.0 /usr/lib/perl5/vendor_perl .> > Here's the INC after I touched Apache/DBI.pm in site_perl and it was > reloaded (seen in log)> > /usr/lib/perl5/vendor_perl/5.8.0/i386-linux-thread-multi/Apache2 > /usr/lib/perl5/5.8.0/i386-linux-thread-multi
 /usr/lib/perl5/5.8.0 > /usr/lib/perl5/site_perl/5.8.0/i386-linux-thread-multi > /usr/lib/perl5/site_perl/5.8.0 /usr/lib/perl5/site_perl > /usr/lib/perl5/vendor_perl/5.8.0/i386-linux-thread-multi > /usr/lib/perl5/vendor_perl/5.8.0 /usr/lib/perl5/vendor_perl > /usr/lib/perl5/5.8.0/i386-linux-thread-multi /usr/lib/perl5/5.8.0 .> > It would seem it dropped the perl5lib line.> > Oh also, if I remove the "use lib" line in my top file, none of my local > modules will load. I though the PERL5LIB was suppose to add to the base > INC and make it so you didn't need to use "use lib". Maybe this is the > root of the problem.> > But as I mentioned, if using a startup script w/PerlRequire, the reloads > seem to work.> > Do you know if there's a new rpm package for mod-perl (RH9)?> > */Geoffrey Young <[EMAIL PROTECTED]>/* wrote:> > >
 > Bruce Tennant wrote:> > I'm trying to do some development work with mod_perl and find> > restarting the server a pain. So I setup Apache::Reload, but it> > doesn't seem to want to see my local devel directory all the time.> >> > Here's my settings> > Apache/2.0.40> > mod_perl-1.99_7> > please upgrade to the latest CVS version and try again - 1.99_07 is> very old.> > > > Linux 2.4.20-8 (RedHat9 I think)> >> >> > Here's my perl.conf (sourced by httpd.conf)> > start> >> > LoadModule perl_module modules/mod_perl.so> >> > PerlSetEnv PERL5LIB /home/bruce/public_html/ffball/myff> > >> > Here's the problem. It seems that the reload module is finding the> > local modules okay as it shows up in the error_log as checking the> >
 mtime. But when th! ey do change, it dies when it tries to reload> > them and says they aren't in the @INC path.> > ok. can you show us @INC before and after the reload attempt? I'm> curious> as to whether PERL5LIB is being properly added to @INC for the> request time> interpreters.> > also, does it fail if you reload modules that are not in @INC? for> instance, try touching CGI.pm or something in your site_lib and> watch the> debug messages.> > >> > So it's like it is half working.> >> > Has anyone ! else seen this problem and have a possible fix?> > we'll find a fix if we can isolate and reproduce the problem, don't> worry :)> > --Geoff> > > > www.bluewolverine.com> > > Do you Yahoo!?>
 Yahoo! SiteBuilder > - Free, > easy-to-use web site design softwarewww.bluewolverine.com
Do you Yahoo!?
Yahoo! SiteBuilder - Free, easy-to-use web site design software

Apache::Reload and INC path partialy working

2003-08-14 Thread Bruce Tennant

I'm trying to do some development work with mod_perl and find restarting the server a pain.  So I setup Apache::Reload, but it doesn't seem to want to see my local devel directory all the time.Here's my settingsApache/2.0.40mod_perl-1.99_7Linux 2.4.20-8 (RedHat9 I think)Here's my perl.conf (sourced by httpd.conf)startLoadModule perl_module modules/mod_perl.soPerlSetEnv PERL5LIB /home/bruce/public_html/ffball/myffPerlSetVar INC /home/bruce/public_html/ffball/myffPerlModule Apache2PerlModule Apache::ReloadPerlInitHandler Apache::ReloadPerlSetVar ReloadDebug On# PerlSetVar ReloadModules "FFMgr::*"# This will allow execution of mod_perl to compile your scripts to# subroutines which it will execute directly, avoiding the costly# compile process for most requests.#Alias /perl /var/www/perl    SetHandler perl-script    PerlHandler ModPerl::Registry::handler    PerlOptions +ParseHeaders    Options +ExecCGI      SetHandler perl-script    PerlHandler ModPerl::Registry::handler    PerlOptions +ParseHeaders    Options +ExecCGI  end---The PerlSetVar INC line was a futile test.Here's the problem.  It seems that the reload module is finding the local modules okay as it shows up in the error_log as checking the mtime.  But when they do change, it dies when it tries to reload them and says they aren't in the @INC path.So it's like it is half working.Has anyone else seen
 this problem and have a possible fix?Thanks-Brucewww.bluewolverine.com
Do you Yahoo!?
Yahoo! SiteBuilder - Free, easy-to-use web site design software

Re: Apache::Reload and INC path partialy working

2003-08-14 Thread Bruce Tennant
Ugh!  Not use to lists that reply to author.
 
Okay to resay what I sent to Geoffrey.
 
using the -I switch in the config file works, unlike the PerlSetEnv PERL5LIBGeoffrey Young <[EMAIL PROTECTED]> wrote:

>> Here's my perl.conf (sourced by httpd.conf)>> start LoadModule perl_module modules/mod_perl.so PerlSetEnv PERL5LIB /home/bruce/public_html/ffball/myffon second thought, tryPerlSwitches -I/home/bruce/public_html/ffball/myfforPerlSwitches -Mlib=/home/bruce/public_html/ffball/myffinstead of PERL5LIB--Geoffwww.bluewolverine.com
Do you Yahoo!?
Yahoo! SiteBuilder - Free, easy-to-use web site design software

Re: Apache::Reload and @INC

2002-11-28 Thread Stas Bekman
Igor Vylusko wrote:

in doc
http://perl.apache.org/docs/2.0/api/mod_perl-2.0/Apache/Reload.html
declared that when using Apache::Reload I may define additional lib
in httpd.conf: PerlSetEnv PERL5LIB /home/httpd/perl/extra
But when I enable PerlInitHandler Apache::Reload in config all libs defined in
PERL5LIB are gone away from @INC.
I have Apache 1.3.27, mod_perl 1.27, Apache::Reload 0.07, perl 5.8.0
on RH7.2 and try PerlSetEnv PERL5LIB in main config section as well as
in VirtualHost sections.
I have bulk of VirtualHosts and would like make @INC different for each
one(i.e. not use lib ... in startup.pl).




SB> It's not easy with mod_perl 1.0. The manpage is talking about changing 
SB> @INC globally for the whole server. I usually do that with 'use lib' in 
SB> startup.pl.

I define PerlSetEnv PERL5LIB globaly for the whole server but PERL5LIB
was stripped out from @INC anyway on enabling PerlInitHandler Apache::Reload
in _any_ vhost.
I am using PerlSetEnv PERL5LIB per vhost basis and it works fine for me
without Apache::Reload.

I can't reproduce what you see with Apache::Reload and I don't see 
anything in the code that mangles @INC.

Though what I do see, is that if you define PERL5LIB outside a 
VirtualHost, it overrides any PERL5LIB defined inside all VirtualHosts, 
no matter if you use Apache::Reload or not. I don't remember if that's 
how it should be or whether it's a bug. Those who use vhosts can 
probably help rectify the issue here.

__
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[2]: Apache::Reload and @INC

2002-11-27 Thread Igor Vylusko
>> in doc
>> http://perl.apache.org/docs/2.0/api/mod_perl-2.0/Apache/Reload.html
>> declared that when using Apache::Reload I may define additional lib
>> in httpd.conf: PerlSetEnv PERL5LIB /home/httpd/perl/extra
>> But when I enable PerlInitHandler Apache::Reload in config all libs defined in
>> PERL5LIB are gone away from @INC.
>> I have Apache 1.3.27, mod_perl 1.27, Apache::Reload 0.07, perl 5.8.0
>> on RH7.2 and try PerlSetEnv PERL5LIB in main config section as well as
>> in VirtualHost sections.
>> I have bulk of VirtualHosts and would like make @INC different for each
>> one(i.e. not use lib ... in startup.pl).

SB> It's not easy with mod_perl 1.0. The manpage is talking about changing 
SB> @INC globally for the whole server. I usually do that with 'use lib' in 
SB> startup.pl.

I define PerlSetEnv PERL5LIB globaly for the whole server but PERL5LIB
was stripped out from @INC anyway on enabling PerlInitHandler Apache::Reload
in _any_ vhost.
I am using PerlSetEnv PERL5LIB per vhost basis and it works fine for me
without Apache::Reload.

>> Has anybody run across this problem?
>> If sowhat is my solution?

SB> There are several solutions, none of which is very helpful in 
SB> production, since they either slow things down or may cause collisions 
SB> when modules with the same names are loaded, see:
SB> 
http://perl.apache.org/docs/1.0/guide/config.html#Is_There_a_Way_to_Modify__INC_on_a_Per_Virtual_Host_or_Per_Location_Basis_

I would like just set PerlInitHandler Apache::Reload on several vhosts
only for developing purposes and preserve everything else at that.

Thanks for advice,
Igor.




Re: Apache::Reload and @INC

2002-11-27 Thread Stas Bekman
Igor Vylusko wrote:

Hi All,

in doc
http://perl.apache.org/docs/2.0/api/mod_perl-2.0/Apache/Reload.html
declared that when using Apache::Reload I may define additional lib
in httpd.conf: PerlSetEnv PERL5LIB /home/httpd/perl/extra
But when I enable PerlInitHandler Apache::Reload in config all libs defined in
PERL5LIB are gone away from @INC.
I have Apache 1.3.27, mod_perl 1.27, Apache::Reload 0.07, perl 5.8.0
on RH7.2 and try PerlSetEnv PERL5LIB in main config section as well as
in VirtualHost sections.
I have bulk of VirtualHosts and would like make @INC different for each
one(i.e. not use lib ... in startup.pl).


It's not easy with mod_perl 1.0. The manpage is talking about changing 
@INC globally for the whole server. I usually do that with 'use lib' in 
startup.pl.

Has anybody run across this problem?
If sowhat is my solution?


There are several solutions, none of which is very helpful in 
production, since they either slow things down or may cause collisions 
when modules with the same names are loaded, see:
http://perl.apache.org/docs/1.0/guide/config.html#Is_There_a_Way_to_Modify__INC_on_a_Per_Virtual_Host_or_Per_Location_Basis_
_
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/




Apache::Reload and @INC

2002-11-27 Thread Igor Vylusko
Hi All,

in doc
http://perl.apache.org/docs/2.0/api/mod_perl-2.0/Apache/Reload.html
declared that when using Apache::Reload I may define additional lib
in httpd.conf: PerlSetEnv PERL5LIB /home/httpd/perl/extra
But when I enable PerlInitHandler Apache::Reload in config all libs defined in
PERL5LIB are gone away from @INC.
I have Apache 1.3.27, mod_perl 1.27, Apache::Reload 0.07, perl 5.8.0
on RH7.2 and try PerlSetEnv PERL5LIB in main config section as well as
in VirtualHost sections.
I have bulk of VirtualHosts and would like make @INC different for each
one(i.e. not use lib ... in startup.pl).

Has anybody run across this problem?
If sowhat is my solution?

Thanks a lot,
Igor.