Re: [cgiapp] changes to Perl modules used by CGI scripts run under Apache::Registry not seen by Apache
David Christensen wrote: cgiapp: Michael Peters wrote: I've seen this before, but it was usually because I made a change to the module that prohibited perl from being able to recompile it. Are you sure that your change wasn't a syntax error? I've caused the error multiple times by changing hello, world! to hello, world! 2, etc.. Have you tried asking on the mod_perl list? That's where the real experts on this stuff hang out :) -- Michael Peters Developer Plus Three, LP - Web Archive: http://www.mail-archive.com/cgiapp@lists.erlbaum.net/ http://marc.theaimsgroup.com/?l=cgiappr=1w=2 To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: [cgiapp] changes to Perl modules used by CGI scripts run under Apache::Registry not seen by Apache
On Mon, 28 Nov 2005 20:39:27 -0800, David Christensen wrote: Hi David [EMAIL PROTECTED]:~$ perl -e 'use Apache::Reload; print $Apache::Reload::VE RSION, \n' 0.07 I'm using V 0.09 under Apache2 under Windows. -- Cheers Ron Savage, [EMAIL PROTECTED] on 29/11/2005 http://savage.net.au/index.html Let the record show: Microsoft is not an Australian company - Web Archive: http://www.mail-archive.com/cgiapp@lists.erlbaum.net/ http://marc.theaimsgroup.com/?l=cgiappr=1w=2 To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [cgiapp] changes to Perl modules used by CGI scripts run under Apache::Registry not seen by Apache
David Christensen wrote: and restart Apache, all appears well. As soon as I make a change to Hdwf.pm and hit refresh: [Mon Nov 28 19:57:54 2005] [error] Can't locate Hdwf.pm in @INC (@INC co ntains: /etc/perl /usr/local/lib/perl/5.8.4 /usr/local/share/perl/5.8.4 /usr/lib/perl5 /usr/share/perl5 /usr/lib/perl/5.8 /usr/share/perl/5.8 /u sr/local/lib/site_perl . /etc/apache-perl/ /etc/apache-perl/lib/perl) at /usr/local/share/perl/5.8.4/Apache/Reload.pm line 132.\n I've seen this before, but it was usually because I made a change to the module that prohibited perl from being able to recompile it. Are you sure that your change wasn't a syntax error? After getting this error did you restart Apache? What happened when you restarted? -- Michael Peters Developer Plus Three, LP - Web Archive: http://www.mail-archive.com/cgiapp@lists.erlbaum.net/ http://marc.theaimsgroup.com/?l=cgiappr=1w=2 To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: [cgiapp] changes to Perl modules used by CGI scripts run under Apache::Registry not seen by Apache
Ron Savage wrote: I'm using V 0.09 under Apache2 under Windows. Hmmm... Looking at: http://www.cpan.org/modules/by-module/Apache/ I only see version 0.07, which is what I installed as root via the CPAN shell. Looking at the version 0.07 readme file: http://www.cpan.org/modules/by-module/Apache/Apache-Reload-0.07.readme following the author's domain name: http://sergeant.org/view/Home to his CPAN page: http://search.cpan.org/~msergeant/ I still only see version 0.07. Where did you get version 0.09? David - Web Archive: http://www.mail-archive.com/cgiapp@lists.erlbaum.net/ http://marc.theaimsgroup.com/?l=cgiappr=1w=2 To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: [cgiapp] changes to Perl modules used by CGI scripts run under Apache::Registry not seen by Apache
cgiapp: Michael Peters wrote: I've seen this before, but it was usually because I made a change to the module that prohibited perl from being able to recompile it. Are you sure that your change wasn't a syntax error? I've caused the error multiple times by changing hello, world! to hello, world! 2, etc.. After getting this error did you restart Apache? Yes. What happened when you restarted? It worked just fine. David - Web Archive: http://www.mail-archive.com/cgiapp@lists.erlbaum.net/ http://marc.theaimsgroup.com/?l=cgiappr=1w=2 To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: [cgiapp] changes to Perl modules used by CGI scripts run under Apache::Registry not seen by Apache
On Tue, 29 Nov 2005 21:14:56 -0800, David Christensen wrote: Hi David Hmmm... Looking at: http://www.cpan.org/modules/by-module/Apache/ I only see version 0.07, which is what I installed as root via the CPAN shell. Where did you get version 0.09? I see the same, but I'm using a pre-compiled Perl + Apache package from Randy Kobes: http://theoryx5.uwinnipeg.ca/pub/other/Perl-5.8-win32-bin.exe My oldish installation instructions: http://savage.net.au/Perl/html/upgrade-perl-apache.html which I supplement with: http://savage.net.au/Perl/html/install-various-tools.html and http://savage.net.au/Perl-modules/html/modules-for-a-new-pc.html -- Ron Savage [EMAIL PROTECTED] http://savage.net.au/index.html - Web Archive: http://www.mail-archive.com/cgiapp@lists.erlbaum.net/ http://marc.theaimsgroup.com/?l=cgiappr=1w=2 To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [cgiapp] changes to Perl modules used by CGI scripts run under Apache::Registry not seen by Apache
Ron Savage wrote: On Sun, 27 Nov 2005 19:54:07 -0800, David Christensen wrote: AllowOverride All PerlModule Apache::Reload PerlInitHandler Apache::Reload PerlSetVar ReloadAll Off This means that only the modules that 'use' Apache::Reload will be reloaded. This is normally what you want, since reloading everything will slow down every hit and almost eliminate the mod_perl speed gain. PerlSetVar ReloadModules Hdwf Hdwf::* I'm not sure where you saw this in the documentation, but I wasn't aware that you could use wildcard characters ('*'). If you are going to use ReloadModules, I think you have to list all of them explicitly. use Apache::Reload; I do not use this in any of my scripts. Well you wouldn't need to is you had ReloadAll 'on' or actually used real module names in ReloadModules. But if you didn't, then you would need use Apache::Reload in all of you modules (not scripts though). -- Michael Peters Developer Plus Three, LP - Web Archive: http://www.mail-archive.com/cgiapp@lists.erlbaum.net/ http://marc.theaimsgroup.com/?l=cgiappr=1w=2 To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [cgiapp] changes to Perl modules used by CGI scripts run under Apache::Registry not seen by Apache
On Mon, 28 Nov 2005 07:29:58 -0500, Michael Peters wrote: Hi Michael use Apache::Reload; I do not use this in any of my scripts. Well you wouldn't need to is you had ReloadAll 'on' or actually used real module names in ReloadModules. But if you didn't, then you would need use Apache::Reload in all of you modules (not scripts though). Now I'm confused. As I said, I /don't/ use 'use Apache::Reload;', ever, I /do/ use wild cards, and my modules /are/ reloaded. That's what I want to happen, and it happens. Perhaps I'm not the only one who's confused :-)). As for the mod_perl speed up, I am not after that, although I helps. Rather, I want modules I am developing to be reloaded after each edit, without restarting the server. -- Cheers Ron Savage, [EMAIL PROTECTED] on 29/11/2005 http://savage.net.au/index.html Let the record show: Microsoft is not an Australian company - Web Archive: http://www.mail-archive.com/cgiapp@lists.erlbaum.net/ http://marc.theaimsgroup.com/?l=cgiappr=1w=2 To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: [cgiapp] changes to Perl modules used by CGI scripts run under Apache::Registry not seen by Apache
cgiapp: Ron Savage wrote: Eeek. I do not put the stuff I posted inside any tags. When I do this: [EMAIL PROTECTED]:~$ cat hdwf/conf/vhost.conf # $Id: vhost.conf,v 1.2 2005/11/29 03:47:31 dpchrist Exp $ # # Apache configuration settings for hdwf.holgerdanske.com. # # Copyright 2005 by David Christensen [EMAIL PROTECTED] VirtualHost 192.168.254.22 ServerName hdwf.holgerdanske.com ServerAdmin [EMAIL PROTECTED] DocumentRoot /home/dpchrist/hdwf/htdocs HostnameLookups off UserDir disabled Alias /images/ /home/dpchrist/hdwf/images/ /VirtualHost Directory /home/dpchrist/hdwf/htdocs AllowOverride All /Directory [EMAIL PROTECTED]:~$ cat hdwf/htdocs/.htaccess # $Id: .htaccess,v 1.7 2005/11/28 03:57:15 dpchrist Exp $ # # Apache configuration settings for hdwf.holgerdanske.com # # Copyright 2005 by David Christensen [EMAIL PROTECTED] DirectoryIndex index.pl SetHandler perl-script PerlHandler Apache::Registry Options +ExecCGI PerlSendHeader On PerlModule Apache::Reload PerlInitHandler Apache::Reload PerlSetVar ReloadAll Off PerlSetVar ReloadModules Hdwf Hdwf::* [EMAIL PROTECTED]:~$ cat hdwf/htdocs/index.pl #! /usr/bin/perl ### # $Id: index.pl,v 1.2 2005/11/28 00:05:17 dpchrist Exp $ # # Perl instance script for hdwf.holgerdanske.com. # # Copyright 2005 by David Christensen [EMAIL PROTECTED] ### use strict; use warnings; use CGI::Carp qw(fatalsToBrowser); use FindBin qw( $Bin ); use lib $Bin/../modules; use Hdwf; my $app = Hdwf-new(); $app-run(); ### [EMAIL PROTECTED]:~$ cat hdwf/modules/Hdwf.pm ### # $Id: Hdwf.pm,v 1.9 2005/11/28 03:57:15 dpchrist Exp $ # # hdwf.holgerdanske.com CGI::Application module. # # Copyright 2005 by David Christensen [EMAIL PROTECTED] ### # uses: #-- use warnings; use strict; use CGI; use CGI::Carp qw(fatalsToBrowser); package Hdwf; use base 'CGI::Application'; ### # overloaded CGI::Application methods: #-- sub setup { my $self = shift; $self-start_mode('home'); $self-mode_param('rm'); $self-run_modes( 'home' = 'home', ); } ### # run modes: #-- sub home { return hello, world!; } ### # end of module: #-- 1; __END__ ### and restart Apache, all appears well. As soon as I make a change to Hdwf.pm and hit refresh: [Mon Nov 28 19:57:54 2005] [error] Can't locate Hdwf.pm in @INC (@INC co ntains: /etc/perl /usr/local/lib/perl/5.8.4 /usr/local/share/perl/5.8.4 /usr/lib/perl5 /usr/share/perl5 /usr/lib/perl/5.8 /usr/share/perl/5.8 /u sr/local/lib/site_perl . /etc/apache-perl/ /etc/apache-perl/lib/perl) at /usr/local/share/perl/5.8.4/Apache/Reload.pm line 132.\n Checking A::R version: [EMAIL PROTECTED]:~$ perl -e 'use Apache::Reload; print $Apache::Reload::VE RSION, \n' 0.07 It looks like Apache::Reload has a bug, or isn't compatible with my system. I am running fairly minimal Debian 3.1r0a (Sarge), with the ntp and apache-perl packages installed (Apache 1.3.33 with Perl 5.8.4 compiled in). CGI::Application, Apache::Reload, etc., were all installed via CPAN as root. What GNU/Linux and/or *BSD distributions are people using successfully with Apache (1), MySQL (4.1), Perl (5.8), and C::A (current)? TIA, David - Web Archive: http://www.mail-archive.com/cgiapp@lists.erlbaum.net/ http://marc.theaimsgroup.com/?l=cgiappr=1w=2 To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [cgiapp] changes to Perl modules used by CGI scripts run under Apache::Registry not seen by Apache
On Sun, 27 Nov 2005 20:25:37 +, RA Jones wrote: Hi Folks One way to do this is to use the Apache::Reload module. I use this Definitely use Apache::Reload. Here's a bit from my httpd.conf: PerlModule Apache::Reload PerlInitHandler Apache::Reload PerlSetVar ReloadAll Off PerlSetVar ReloadModules CGI::Application::Demo CGI::Application::Demo::* Warning: It only works 99.99% of the time under Windows. But that's enough to get some real work done. -- Cheers Ron Savage, [EMAIL PROTECTED] on 28/11/2005 http://savage.net.au/index.html Let the record show: Microsoft is not an Australian company - Web Archive: http://www.mail-archive.com/cgiapp@lists.erlbaum.net/ http://marc.theaimsgroup.com/?l=cgiappr=1w=2 To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: [cgiapp] changes to Perl modules used by CGI scripts run under Apache::Registry not seen by Apache
cgiapp: RA Jones wrote: One way to do this is to use the Apache::Reload module. When I hit the site after a fresh restart, all is well. But when I refresh the page: [Sun Nov 27 14:22:03 2005] [notice] Accept mutex: sysvsem (Default: sysvsem) [Sun Nov 27 14:22:10 2005] [error] Can't locate Apache/ROOThdwf_2eho lgerdanske_2ecom/index_2epl.pm in @INC (@INC contains: /etc/perl /usr/lo cal/lib/perl/5.8.4 /usr/local/share/perl/5.8.4 /usr/lib/perl5 /usr/share /perl5 /usr/lib/perl/5.8 /usr/share/perl/5.8 /usr/local/lib/site_perl . /etc/apache-perl/ /etc/apache-perl/lib/perl) at /usr/local/share/perl/5. 8.4/Apache/Reload.pm line 132.\n David - Web Archive: http://www.mail-archive.com/cgiapp@lists.erlbaum.net/ http://marc.theaimsgroup.com/?l=cgiappr=1w=2 To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: [cgiapp] changes to Perl modules used by CGI scripts run under Apache::Registry not seen by Apache
cgiapp: Looking at: http://perl.apache.org/docs/1.0/api/index.html Under Part III: Development/Debugging help and Apache::StatINC, it states This module's handler iterates over %INC and reloads the file if it has changed on disk. This doesn't seem to work either. David - Web Archive: http://www.mail-archive.com/cgiapp@lists.erlbaum.net/ http://marc.theaimsgroup.com/?l=cgiappr=1w=2 To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: [cgiapp] changes to Perl modules used by CGI scripts run under Apache::Registry not seen by Apache
Ron Savage wrote: Definitely use Apache::Reload. Here's a bit from my httpd.conf: First, here is code that works, but requires me to restart/graceful Apache whenever I make changes to my C::A derived module: CVSENV[EMAIL PROTECTED]:~/hdwf$ cat conf/vhost.conf # $Id: vhost.conf,v 1.1 2005/11/27 07:18:45 dpchrist Exp $ # # Apache configuration settings for hdwf.holgerdanske.com. # # Copyright 2005 by David Christensen [EMAIL PROTECTED] VirtualHost 192.168.254.22 ServerName hdwf.holgerdanske.com ServerAdmin [EMAIL PROTECTED] DocumentRoot /home/dpchrist/hdwf/htdocs HostnameLookups off UserDir disabled Alias /images/ /home/dpchrist/hdwf/images/ /VirtualHost Directory /home/dpchrist/hdwf AllowOverride All /Directory CVSENV[EMAIL PROTECTED]:~/hdwf$ cat htdocs/.htaccess # $Id: .htaccess,v 1.6 2005/11/28 03:15:06 dpchrist Exp $ # # Apache configuration settings for hdwf.holgerdanske.com # # Copyright 2005 by David Christensen [EMAIL PROTECTED] DirectoryIndex index.pl SetHandler perl-script PerlHandler Apache::Registry Options +ExecCGI PerlSendHeader On CVSENV[EMAIL PROTECTED]:~/hdwf$ cat htdocs/index.pl #! /usr/bin/perl ### # $Id: index.pl,v 1.2 2005/11/28 00:05:17 dpchrist Exp $ # # Perl instance script for hdwf.holgerdanske.com. # # Copyright 2005 by David Christensen [EMAIL PROTECTED] ### use strict; use warnings; use CGI::Carp qw(fatalsToBrowser); use FindBin qw( $Bin ); use lib $Bin/../modules; use Hdwf; my $app = Hdwf-new(); $app-run(); ### CVSENV[EMAIL PROTECTED]:~/hdwf$ cat modules/Hdwf.pm ### # $Id: Hdwf.pm,v 1.8 2005/11/28 03:15:06 dpchrist Exp $ # # hdwf.holgerdanske.com CGI::Application module. # # Copyright 2005 by David Christensen [EMAIL PROTECTED] ### # uses: #-- use warnings; use strict; use CGI; use CGI::Carp qw(fatalsToBrowser); package Hdwf; use base 'CGI::Application'; ### # overloaded CGI::Application methods: #-- sub setup { my $self = shift; $self-start_mode('home'); $self-mode_param('rm'); $self-run_modes( 'home' = 'home', ); } ### # run modes: #-- sub home { return hello, world!; } ### # end of module: #-- 1; __END__ ### Adding the Apache::Reload lines to vhosts.conf: CVSENV[EMAIL PROTECTED]:~/hdwf$ cat conf/vhost.conf # $Id: vhost.conf,v 1.1 2005/11/27 07:18:45 dpchrist Exp $ # # Apache configuration settings for hdwf.holgerdanske.com. # # Copyright 2005 by David Christensen [EMAIL PROTECTED] VirtualHost 192.168.254.22 ServerName hdwf.holgerdanske.com ServerAdmin [EMAIL PROTECTED] DocumentRoot /home/dpchrist/hdwf/htdocs HostnameLookups off UserDir disabled Alias /images/ /home/dpchrist/hdwf/images/ /VirtualHost Directory /home/dpchrist/hdwf AllowOverride All PerlModule Apache::Reload PerlInitHandler Apache::Reload PerlSetVar ReloadAll Off PerlSetVar ReloadModules Hdwf Hdwf::* /Directory Doing a graceful restart of Apache and browsing to http://hdwf.holgerdanske.com/, it works the first time, fails on refresh, works on the second refresh, and then fails on all subsequent refreshes (tested twenty). I have my server configured to start one thread, with a minimum and maximum of one spare thread. Here's the error log: [Sun Nov 27 19:40:12 2005] [notice] SIGUSR1 received. Doing graceful restart [Sun Nov 27 19:40:13 2005] [notice] Apache/1.3.33 (Debian GNU/Linux) mod_perl/1. 29 configured -- resuming normal operations [Sun Nov 27 19:40:13 2005] [notice] Accept mutex: sysvsem (Default: sysvsem) [Sun Nov 27 19:40:41 2005] [error] Can't locate Hdwf.pm in @INC (@INC contains: /etc/perl /usr/local/lib/perl/5.8.4 /usr/local/share/perl/5.8.4 /usr/lib/perl5 / usr/share/perl5 /usr/lib/perl/5.8 /usr/share/perl/5.8 /usr/local/lib/site_perl . /etc/apache-perl/ /etc/apache-perl/lib/perl) at /usr/local/share/perl/5.8.4/Apa che/Reload.pm line 132.\n [Sun Nov 27 19:41:04 2005] [error] Can't locate Hdwf.pm in @INC (@INC contains: /etc/perl /usr/local/lib/perl/5.8.4 /usr/local/share/perl/5.8.4 /usr/lib/perl5 / usr/share/perl5 /usr/lib/perl/5.8 /usr/share/perl/5.8
RE: [cgiapp] changes to Perl modules used by CGI scripts run under Apache::Registry not seen by Apache
On Sun, 27 Nov 2005 19:54:07 -0800, David Christensen wrote: Hi David Very frustrating. Yes, a couple of suggestions: Directory /home/dpchrist/hdwf Eeek. I do not put the stuff I posted inside any tags. AllowOverride All PerlModule Apache::Reload PerlInitHandler Apache::Reload PerlSetVar ReloadAll Off PerlSetVar ReloadModules Hdwf Hdwf::* /Directory Sorry. I should have said: The stuff I posted just sits at the very end of httpd.conf, and use Apache::Reload; I do not use this in any of my scripts. -- Ron Savage [EMAIL PROTECTED] http://savage.net.au/index.html - Web Archive: http://www.mail-archive.com/cgiapp@lists.erlbaum.net/ http://marc.theaimsgroup.com/?l=cgiappr=1w=2 To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]