Re: mod_perl installation on Win32
xk wrote: I assume this is for mod_perl-1? Apache version info (shown on error web pages): Apache/2.0.35 (Win32) mod_perl/1.99_02-dev Perl/v5.6.1 Is this mod_perl 1.0 or 2.0? When I installed (from the location you pointed - theoryx5) it said mod_perl 2.0, but on Apache is shows 1.99 remember to use the script to report bugs, otherwise there will be no end to confusion. See: http://perl.apache.org/preview/modperl-docs/dst_html/docs/2.0/user/help/help.html#Reporting_Problems Do you have a LoadModule perl_module modules/mod_perl.so line in your httpd.conf file? Yes, I do. Perl scripts work now fine if I put the correct path in them. But I'd like to setup Apache::Registry to get rid of this limitation. if you want to use Apache::Registry from 1.x, you need to add: use Apache::compat; to your startup.pl. In 2.0 this is now ModPerl::Registry (though it's not 100% completed yet) I've managed to get some error texts: == [error] Can't locate loadable object for module Apache::Constants in @INC at .../Perl/site/lib/mod_perl.pm line 14 14:if ($ENV{MOD_PERL}) { 15:(defined {$class.'::bootstrap'} ? 16: \{$class.'::bootstrap'} : 17: \DynaLoader::bootstrap)- 18: ($class, $version); 19:} Compilation failed in require at .../Perl/site/lib/Apache.pm line 6. BEGIN failed--compilation aborted at .../Perl/site/lib/Apache.pm line 6. 6: use Apache::Constants qw(OK DECLINED); Compilation failed in require at .../Perl/site/lib/Apache/Registry.pm line 2. BEGIN failed--compilation aborted at .../Perl/site/lib/Apache/Registry.pm line 2. 2: use Apache (); Compilation failed in require at (eval 1) line 3. [error] Can't load Perl module Apache::Registry ... the ... and the code snippets are from me. Are there any modules missing? Althrough I'm a good C++ programmer, I don't know anything about how perl manages the modules, so I can't tell what's really wrong and I don't know where to look. -- __ 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: mod_perl installation on Win32
On Mon, 22 Apr 2002, xk wrote: Hi. I'm getting the following mod_perl error when I try to run a perl script through Apache: [error] failed to resolve handler `Apache::Registry' My configuration is: - Alias /perl/ C:/My Documents/HTML/xk Sound/perl/ #PerlModule Apache::Registry Location /perl SetHandler perl-script PerlHandler Apache::Registry Options +ExecCGI /Location - If I uncomment the #PerlModule Apache::Registry line, Apache will exit as soon as I start it, without any message in his window or the logs. I do have Apache::Registry installed, so what's wrong? I assume this is for mod_perl-1? Do you have a LoadModule perl_module modules/mod_perl.so line in your httpd.conf file? best regards, randy kobes
Re: mod_perl installation on Win32
I assume this is for mod_perl-1? Apache version info (shown on error web pages): Apache/2.0.35 (Win32) mod_perl/1.99_02-dev Perl/v5.6.1 Is this mod_perl 1.0 or 2.0? When I installed (from the location you pointed - theoryx5) it said mod_perl 2.0, but on Apache is shows 1.99 Do you have a LoadModule perl_module modules/mod_perl.so line in your httpd.conf file? Yes, I do. Perl scripts work now fine if I put the correct path in them. But I'd like to setup Apache::Registry to get rid of this limitation. I've managed to get some error texts: == [error] Can't locate loadable object for module Apache::Constants in INC at .../Perl/site/lib/mod_perl.pm line 14 14:if ($ENV{MOD_PERL}) { 15:(defined {$class.'::bootstrap'} ? 16: \{$class.'::bootstrap'} : 17: \DynaLoader::bootstrap)- 18: ($class, $version); 19:} Compilation failed in require at .../Perl/site/lib/Apache.pm line 6. BEGIN failed--compilation aborted at .../Perl/site/lib/Apache.pm line 6. 6: use Apache::Constants qw(OK DECLINED); Compilation failed in require at .../Perl/site/lib/Apache/Registry.pm line 2. BEGIN failed--compilation aborted at .../Perl/site/lib/Apache/Registry.pm line 2. 2: use Apache (); Compilation failed in require at (eval 1) line 3. [error] Can't load Perl module Apache::Registry ... the ... and the code snippets are from me. Are there any modules missing? Althrough I'm a good C++ programmer, I don't know anything about how perl manages the modules, so I can't tell what's really wrong and I don't know where to look.
RE: mod_perl installation on Win32
At 20:35 22.04.2002, David LeBlanc wrote: If Apache::Registry depends on Apache to access the registry, I don't believe that Apache uses the registry anymore, at least for file associations. The old change this setting to make apache look in the registry for file associations stuff is gone from the Apache 2.0 conf file. The Apache module doesn't use the resgistry at all, does it? David, I think you should read up on what Apache::Registry does :) It compiles CGI scripts to run them under mod_perl, it has nothing to do with the Windows Registry :) -- Per Einar Ellefsen [EMAIL PROTECTED]
Re: mod_perl installation on Win32
At 20:15 22.04.2002, xk wrote: I assume this is for mod_perl-1? Apache version info (shown on error web pages): Apache/2.0.35 (Win32) mod_perl/1.99_02-dev Perl/v5.6.1 Is this mod_perl 1.0 or 2.0? When I installed (from the location you pointed - theoryx5) it said mod_perl 2.0, but on Apache is shows 1.99 Do you have a LoadModule perl_module modules/mod_perl.so line in your httpd.conf file? Yes, I do. Perl scripts work now fine if I put the correct path in them. But I'd like to setup Apache::Registry to get rid of this limitation. I've managed to get some error texts: == [error] Can't locate loadable object for module Apache::Constants in @INC at .../Perl/site/lib/mod_perl.pm line 14 14:if ($ENV{MOD_PERL}) { 15:(defined {$class.'::bootstrap'} ? 16: \{$class.'::bootstrap'} : 17: \DynaLoader::bootstrap)- 18: ($class, $version); 19:} Compilation failed in require at .../Perl/site/lib/Apache.pm line 6. BEGIN failed--compilation aborted at .../Perl/site/lib/Apache.pm line 6. 6: use Apache::Constants qw(OK DECLINED); Compilation failed in require at .../Perl/site/lib/Apache/Registry.pm line 2. BEGIN failed--compilation aborted at .../Perl/site/lib/Apache/Registry.pm line 2. 2: use Apache (); Compilation failed in require at (eval 1) line 3. [error] Can't load Perl module Apache::Registry ... the ... and the code snippets are from me. Are there any modules missing? Althrough I'm a good C++ programmer, I don't know anything about how perl manages the modules, so I can't tell what's really wrong and I don't know where to look. Did you have an old version of mod_perl installed? The modules you are using seem to be from mod_perl 1, while you need the mod_perl 2 ones. If in doubt, try inserting PerlModule Apache2 before any other Perl* directives. -- Per Einar Ellefsen [EMAIL PROTECTED]
Re: mod_perl installation on Win32
Did you have an old version of mod_perl installed? The modules you are using seem to be from mod_perl 1, while you need the mod_perl 2 ones. I seem to have installed an older version before 2.0, but I'm not sure. In my /site/lib dir I have both Apache and Apache2 subdir. Is this ok? And I've found two mod_perl.pl files: one in /site/lib with version 1.2601 and one in /site/lib/Apache2 with version 1.9902. How can I uninstall the first one? If in doubt, try inserting PerlModule Apache2 before any other Perl* directives. I did this and now it says [error] Can't locate object method boot via package mod_perl::boot How can I check if module mod_perl::boot for example is installed? The docs aren't clear on this.
Re: mod_perl installation on Win32
Just posted minutes ago on this. This partially fixed me also. Problem was the line in the /perl container (PerlHandler Apache::Registry instead of PerlHandler ModPerl::Registry). Except now I get this: [Mon Apr 22 18:32:37 2002] [error] 1580: ModPerl::Registry: `Can't call method args on an undefined value at c:/perl/5.6.1/lib/CGI.pm line 433. It is referring to the IF statement: if ($MOD_PERL) { $query_string = Apache-request-args; } else { $query_string = $ENV{'QUERY_STRING'} if defined $ENV{'QUERY_STRING'}; $query_string ||= $ENV{'REDIRECT_QUERY_STRING'} if defined $ENV{'REDIRECT_QUERY_STRING'}; } In CGIpm up at line 148 there is this: # Turn on special checking for Doug MacEachern's modperl if (exists $ENV{'GATEWAY_INTERFACE'} ($MOD_PERL = $ENV{'GATEWAY_INTERFACE'} =~ /^CGI-Perl\//)) { $| = 1; require Apache; } Do I need to define 'GATEWAY_INTERFACE', or is it provided automatically by mod_perl? This is on Win2000. Thanks Chuck - Original Message - From: Randy Kobes [EMAIL PROTECTED] To: xk [EMAIL PROTECTED] Cc: [EMAIL PROTECTED] Sent: Monday, April 22, 2002 3:16 PM Subject: Re: mod_perl installation on Win32 On Mon, 22 Apr 2002, xk wrote: Apache version info (shown on error web pages): Apache/2.0.35 (Win32) mod_perl/1.99_02-dev Perl/v5.6.1 Is this mod_perl 1.0 or 2.0? When I installed (from the location you pointed - theoryx5) it said mod_perl 2.0, but on Apache is shows 1.99 This is normal - mod_perl, version 2.0, hasn't yet been released; the version on CPAN, which the above is reporting, is 1.99_01. I've managed to get some error texts: == [error] Can't locate loadable object for module Apache::Constants in @INC at .../Perl/site/lib/mod_perl.pm line 14 14:if ($ENV{MOD_PERL}) { 15:(defined {$class.'::bootstrap'} ? 16: \{$class.'::bootstrap'} : 17: \DynaLoader::bootstrap)- 18: ($class, $version); 19:} Compilation failed in require at .../Perl/site/lib/Apache.pm line 6. BEGIN failed--compilation aborted at .../Perl/site/lib/Apache.pm line 6. I've seen this as well at times - do you have a mod_perl-1.xx distribution in the same Perl tree? If so, try temporarily renaming /Perl/site/lib/Apache.pm - /Perl/site/lib/Apache-1.pm /Perl/site/lib/Apache/ - /Perl/site/lib/Apache-1/ as sometimes I think it gets confused between mod_perl-2 and mod_perl-1 stuff. For using Registry things, there was a bug that Doug fixed a little while ago - you should reinstall mod_perl-2.ppd from http://theoryx5.uwinnipeg.ca/ppmpackages/. The version number hasn't changed with this fix, so if you're using the ppm utility to install things, you should first uninstall mod_perl-2 and then reinstall it. Here's an example set-up for Registry scripts. In httpd.conf: PerlRequire C:/Apache2/conf/extra.conf Alias /perl/ C:/Apache2/perl/ Location /perl SetHandler perl-script PerlHandler ModPerl::Registry Options +ExecCGI /Location where C:/Apache2/conf/extra.conf is === use Apache2; use ModPerl::Registry (); 1; === An example script to go into C:/Apache2/perl/ would be == #!c:/Perl/bin/Perl.exe ## ## printenv -- demo CGI program which just prints its environment ## print HTMLBODYUL; foreach $var (sort(keys(%ENV))) { $val = $ENV{$var}; $val =~ s|\n|\\n|g; $val =~ s||\\|g; print LI${var}=\${val}\/LI\n; } # sleep(10); print /UL/BODY/HTML; == which would then be accessed as http://localhost/perl/printenv. A nice example of how Apache-2/mod_perl-2 addresses the single-thread limitation of Apache-1/mod_perl-1, as discussed at http://perl.apache.org/win32_multithread.html, is to uncomment the sleep(10) line in the above script, then, from a DOS prompt, run quick multiple instances of GET http://localhost/perl/printenv and check the access times in the logs when the script was handled, and compare to mod_perl-1. best regards, randy
Re: mod_perl installation on Win32
Hi. I'm getting the following mod_perl error when I try to run a perl script through Apache: [error] failed to resolve handler `Apache::Registry' My configuration is: - Alias /perl/ C:/My Documents/HTML/xk Sound/perl/ #PerlModule Apache::Registry Location /perl SetHandler perl-script PerlHandler Apache::Registry Options +ExecCGI /Location - If I uncomment the #PerlModule Apache::Registry line, Apache will exit as soon as I start it, without any message in his window or the logs. I do have Apache::Registry installed, so what's wrong?
Re: mod_perl installation on Win32
On Sat, 20 Apr 2002, xk wrote: Hi. I have apache 2.0.35 and ActivePerl 5.6.1 installed on Win32, and I can't install mod_perl 1.99_01. When I do perl Makefile.PL MP_AP_PREFIX=C:/Program Files/Apache Group/Apache2, it says Configuring Apache/2.0.35 mod_perl/1.99_01 Perl/v5.6.1 unlink...lib/Apache/BuildConfig.pm C:/Program Files/Apache Group/Apache2/bin/Apache.exe -l failed: Bad file descriptor at Apache-Test/lib/Apache/TestConfig.pm line 777, DATA chunk 1. You might try, if possible, installing Apache to a directory without spaces in the name - sometimes the spaces can cause problems ... Does anybody know where I could find an already compiled module for Win32? A mod_perl-2 ppm package is available for installation via ppm as ppm install http://theoryx5.uwinnipeg.ca/ppmpackages/mod_perl-2.ppd best regards, randy kobes