Re: Can't solve the CGI/pm "Can't call register_cleanup" problem
On Tue, 31 Jul 2001, Fran Fabrizio wrote: > > Hello, > > I've just installed a mod_perl enabled Apache and I am trying to configure > it. I ran into the "can't call register_cleanup on an undefined value" > while I was trying out the sample startup.pl file in the "Writing Apache > Modules in Perl and C" book. I did see the note about this in the > troubleshooting, but the fix didn't solve my problem. CGI.pm 3.02 is an alpha version. I'm not sure about its interoperability with mod_perl. Get the 2.x version to solve the problem asap. > Here's my httpd.conf: > > ... > Alias /perl/ /usr/local/apachemp/cgi-bin/ > PerlPostReadRequestHandler 'sub { Apache->request(shift) }' > PerlModule Apache::Registry > PerlFreshRestart On > PerlRequire conf/startup.pl > > > SetHandler perl-script > PerlHandler Apache::Registry > Options ExecCGI > allow from all > PerlSendHeader on > > >SetHandler perl-script >PerlHandler Apache::Hello > > > And here is conf/startup.pl... > > #!/usr/local/bin/perl > > BEGIN { >use Apache (); >use lib Apache->server_root_relative('lib/perl'); > } > use Apache::Registry(); > use Apache::Constants(); > use CGI::Carp (); > use CGI qw(-compile :all); > 1; > > It dies on the use CGI qw(-compile :all); line, with the message: > > [root@dungeon apachemp]# ./bin/apachectl configtest > [Tue Jul 31 00:54:54 2001] [error] [Tue Jul 31 00:54:54 2001] startup.pl: > [Tue Jul 31 00:54:54 2001] startup.pl: [Tue Jul 31 00:54:54 2001] CGI.pm: > Can't call method "register_cleanup" on an undefined value at > /usr/lib/perl5/5.6.0/CGI/Object.pm line 225. > [Tue Jul 31 00:54:54 2001] startup.pl: [Tue Jul 31 00:54:54 2001] > startup.pl: BEGIN failed--compilation aborted at conf/startup.pl line 14. > [Tue Jul 31 00:54:54 2001] startup.pl: Compilation failed in require. > > Syntax error on line 995 of /usr/local/apache/conf/httpd.conf: > [Tue Jul 31 00:54:54 2001] startup.pl: [Tue Jul 31 00:54:54 2001] > startup.pl: [Tue Jul 31 00:54:54 2001] CGI.pm: Can't call method > "register_cleanup" on an undefined value at > /usr/lib/perl5/5.6.0/CGI/Object.pm line 225. > [Tue Jul 31 00:54:54 2001] startup.pl: [Tue Jul 31 00:54:54 2001] > startup.pl: BEGIN failed--compilation aborted at conf/startup.pl line 14. > [Tue Jul 31 00:54:54 2001] startup.pl: Compilation failed in require. > > [root@dungeon apachemp]# > > I'm running the following versions of the software: > Apache 1.3.20 > mod_perl 1.26 > CGI.pm 3.02 > > I saw the note about it in the faq/troubleshooting section of the docs on > perl.apache.org, but as you can see I made the suggested change (the > PerlPostReadRequestHandler line in httpd) and I still get the error. > > Any ideas? I'm not doing anything fancy, these are all default installs of > everything, just following the docs for installation and the book for the > startup.pl. The server starts and runs fine if I remove the use CGI > qw(-compile :all); line. > > Thanks, > Fran > _ Stas Bekman JAm_pH -- Just Another mod_perl Hacker http://stason.org/ mod_perl Guide http://perl.apache.org/guide mailto:[EMAIL PROTECTED] http://apachetoday.com http://eXtropia.com/ http://singlesheaven.com http://perl.apache.org http://perlmonth.com/
Can't solve the CGI/pm "Can't call register_cleanup" problem
Hello, I've just installed a mod_perl enabled Apache and I am trying to configure it. I ran into the "can't call register_cleanup on an undefined value" while I was trying out the sample startup.pl file in the "Writing Apache Modules in Perl and C" book. I did see the note about this in the troubleshooting, but the fix didn't solve my problem. Here's my httpd.conf: ... Alias /perl/ /usr/local/apachemp/cgi-bin/ PerlPostReadRequestHandler 'sub { Apache->request(shift) }' PerlModule Apache::Registry PerlFreshRestart On PerlRequire conf/startup.pl SetHandler perl-script PerlHandler Apache::Registry Options ExecCGI allow from all PerlSendHeader on SetHandler perl-script PerlHandler Apache::Hello And here is conf/startup.pl... #!/usr/local/bin/perl BEGIN { use Apache (); use lib Apache->server_root_relative('lib/perl'); } use Apache::Registry(); use Apache::Constants(); use CGI::Carp (); use CGI qw(-compile :all); 1; It dies on the use CGI qw(-compile :all); line, with the message: [root@dungeon apachemp]# ./bin/apachectl configtest [Tue Jul 31 00:54:54 2001] [error] [Tue Jul 31 00:54:54 2001] startup.pl: [Tue Jul 31 00:54:54 2001] startup.pl: [Tue Jul 31 00:54:54 2001] CGI.pm: Can't call method "register_cleanup" on an undefined value at /usr/lib/perl5/5.6.0/CGI/Object.pm line 225. [Tue Jul 31 00:54:54 2001] startup.pl: [Tue Jul 31 00:54:54 2001] startup.pl: BEGIN failed--compilation aborted at conf/startup.pl line 14. [Tue Jul 31 00:54:54 2001] startup.pl: Compilation failed in require. Syntax error on line 995 of /usr/local/apache/conf/httpd.conf: [Tue Jul 31 00:54:54 2001] startup.pl: [Tue Jul 31 00:54:54 2001] startup.pl: [Tue Jul 31 00:54:54 2001] CGI.pm: Can't call method "register_cleanup" on an undefined value at /usr/lib/perl5/5.6.0/CGI/Object.pm line 225. [Tue Jul 31 00:54:54 2001] startup.pl: [Tue Jul 31 00:54:54 2001] startup.pl: BEGIN failed--compilation aborted at conf/startup.pl line 14. [Tue Jul 31 00:54:54 2001] startup.pl: Compilation failed in require. [root@dungeon apachemp]# I'm running the following versions of the software: Apache 1.3.20 mod_perl 1.26 CGI.pm 3.02 I saw the note about it in the faq/troubleshooting section of the docs on perl.apache.org, but as you can see I made the suggested change (the PerlPostReadRequestHandler line in httpd) and I still get the error. Any ideas? I'm not doing anything fancy, these are all default installs of everything, just following the docs for installation and the book for the startup.pl. The server starts and runs fine if I remove the use CGI qw(-compile :all); line. Thanks, Fran
RE: [Problem] Can't return Content-type with SERVER_ERROR
On Mon, 30 Jul 2001, Paul Kulchenko wrote: > Hi, Geoffrey! > > > your procedure is correct. well, except that you can't do what you > > want :) > > > > take a look at http_protocol.c - > > > > 'r->content_type = "text/html; charset=iso-8859-1";' is hardcoded > > in ap_send_error_response(), so it's an apache thing and not a > > mod_perl thing... > Absolutely true to my surprise. That means you can't return proper > content-type and content-encoding with non-OK codes, Apache will > rewrite it for you anyway, which is too human-oriented and imho > should be corrected. I ended up generating usual successful response > with custom status (which is 500 in my case): > > $r->status($self->response->code); > $self->response->headers->scan(sub { $r->header_out(@_) }); > $r->send_http_header(join '; ', $self->response->content_type); > $r->print($self->response->content); > &Apache::Constants::OK; > > Probably worth mentioning in FAQ or somewhere. It took quite a bit of > my time. I've added it to the guide. > Best wishes, Paul. _ Stas Bekman JAm_pH -- Just Another mod_perl Hacker http://stason.org/ mod_perl Guide http://perl.apache.org/guide mailto:[EMAIL PROTECTED] http://apachetoday.com http://eXtropia.com/ http://singlesheaven.com http://perl.apache.org http://perlmonth.com/
Re: Bug??
On Tue, 31 Jul 2001, Chris Rodgers wrote: > Hi, > > I'm running Apache with mod_perl and mod_ssl. ("Apache/1.3.20 (Unix) > mod_perl/1.25 mod_ssl/2.8.4 OpenSSL/0.9.5a" to be precise.) > > I am listening on both port 80 (HTTP) and port 443 (HTTPS) and serving perl > scripts. There are two separate vhosts on the two ports -> i.e. entirely > different websites, but only one httpd (and associated set of children). > > Now, this works fine, except that if I try to access a script with the same > name on the http site and the https site, I get the WRONG version sometimes. > I think that this is because mod_perl is only using the server name (and not > the port / protocol) when it builds its table for caching scripts. > > Does anyone know how to fix this? I was thinking of editing all the .pm > files for mod_perl around where they refer to $NameWithVirtualHost - and to > add the port onto the begining of the unique identifier which is used to > form the namespace for each script. Would this work - or might it break > something else??! > > Any hints/tips would be greatly appreciated! http://perl.apache.org/guide/multiuser.html#Virtual_Hosts_in_the_guide _ Stas Bekman JAm_pH -- Just Another mod_perl Hacker http://stason.org/ mod_perl Guide http://perl.apache.org/guide mailto:[EMAIL PROTECTED] http://apachetoday.com http://eXtropia.com/ http://singlesheaven.com http://perl.apache.org http://perlmonth.com/
Bug??
Hi, I'm running Apache with mod_perl and mod_ssl. ("Apache/1.3.20 (Unix) mod_perl/1.25 mod_ssl/2.8.4 OpenSSL/0.9.5a" to be precise.) I am listening on both port 80 (HTTP) and port 443 (HTTPS) and serving perl scripts. There are two separate vhosts on the two ports -> i.e. entirely different websites, but only one httpd (and associated set of children). Now, this works fine, except that if I try to access a script with the same name on the http site and the https site, I get the WRONG version sometimes. I think that this is because mod_perl is only using the server name (and not the port / protocol) when it builds its table for caching scripts. Does anyone know how to fix this? I was thinking of editing all the .pm files for mod_perl around where they refer to $NameWithVirtualHost - and to add the port onto the begining of the unique identifier which is used to form the namespace for each script. Would this work - or might it break something else??! Any hints/tips would be greatly appreciated! Yours, Chris Rodgers.
Re: RewriteRule Proxy problems
> > > But if I go to http://www.buildreferrals.com/rotatorstats.asp?login=pmak0 > > > (that's the same URL, but with a query string added), then I get a "404 > > > Not Found" error. > > > > Of course you do. Your regex ^/(.*)\.asp doesn't match that URL with > > the query string. > > Why not? I did not put a "$" at the end of the regexp so it should still > match. I've also tried: > > RewriteRule ^/(.*)\.asp(.*) http://66.33.85.239/$1.asp$2 [p] > > but got the same "404 Not Found" error. Sorry, I should have said that it wouldn't match the query string itself. (I'm a little under-rested and over-caffeinated at the moment.) Looking back at your post, it seems like it still should have worked although it would have had no query string in the proxied request. You might try ^/(.*)\.asp(.*)$ for matching the whole query string, but I wouldn't thing it would be necessary with a greedy regex. - Perrin
Re: RewriteRule Proxy problems
On Mon, 30 Jul 2001, Perrin Harkins wrote: > > But if I go to http://www.buildreferrals.com/rotatorstats.asp?login=pmak0 > > (that's the same URL, but with a query string added), then I get a "404 > > Not Found" error. > > Of course you do. Your regex ^/(.*)\.asp doesn't match that URL with > the query string. Why not? I did not put a "$" at the end of the regexp so it should still match. I've also tried: RewriteRule ^/(.*)\.asp(.*) http://66.33.85.239/$1.asp$2 [p] but got the same "404 Not Found" error.
OT: Re: RewriteRule Proxy problems
Perrin Harkins wrote: > > In my lightweight httpd.conf, I have: > > > > RewriteRule ^/(.*)\.asp http://66.33.85.239/$1.asp [p] > > > > If I go to http://www.buildreferrals.com/rotatorstats.asp, it gets proxy'd > > correctly. > > > > But if I go to http://www.buildreferrals.com/rotatorstats.asp?login=pmak0 > > (that's the same URL, but with a query string added), then I get a "404 > > Not Found" error. > > Of course you do. Your regex ^/(.*)\.asp doesn't match that URL with the > query string. > - Perrin seems like it does match. it's monday, so maybe my internal pattern matching engine needs some tweaking. ;-) the rewrite engine gets handed: /rotatorstats.asp?login=pmak0 start from the beginning of the string and match the leading slash, then match all following characters. keep backing up till \.asp is also matched. i don't see how the query string makes any difference. if he put an end of string '$' at the end of the pattern, then that would change the matching and cause it to fail. -- ___cliff [EMAIL PROTECTED]http://www.genwax.com/
Re: RewriteRule Proxy problems
> In my lightweight httpd.conf, I have: > > RewriteRule ^/(.*)\.asp http://66.33.85.239/$1.asp [p] > > If I go to http://www.buildreferrals.com/rotatorstats.asp, it gets proxy'd > correctly. > > But if I go to http://www.buildreferrals.com/rotatorstats.asp?login=pmak0 > (that's the same URL, but with a query string added), then I get a "404 > Not Found" error. Of course you do. Your regex ^/(.*)\.asp doesn't match that URL with the query string. - Perrin
Re: segfault with mod_perl, Oraperl, XML::Parser
On Mon, 30 Jul 2001, Scott Kister wrote: > uselargefiles=define Have you tried turning off "uselargefiles"? I might be off track here, but recently I tried to install mod_perl on Solaris 5.8. It kept segfaulting until I turned off "uselargefiles" and binary compatibility with 5.00503. You could try recompiling perl with this configure line, then recompiling mod_perl and see what happens: sh Configure -des -Dcc=gcc -Ubincompat5005 -Uuselargefiles
Re: segfault with mod_perl, Oraperl, XML::Parser
I've been looking into this some more without much progress. Is anyone on this list successfully using modperl, DBD::Oracle, and XML::Parser on Solaris 2.8 x86? Are there any known symbol conflicts with Oracle's libclntsh.so and Expat? Any good alternative perl XML Parsers to Expat? Thanks, Scott On Sun, July 22 13:30 -0700, Scott Kister wrote: > > This program core dumps when run under mod_perl on Solaris 2.8 x86. > > #!./perl > use Oraperl; # use DBD::Oracle; fails as well > use XML::Parser; > my $parser = new XML::Parser; > $parser->parsestring(''); # fails with valid xml here as well > > It runs fine on Linux and Sparc Solaris. It also works fine from the > command line, or if I remove the use Oraperl line. I'm using the > following releases. I had the same problem under apache 1.3.19 and > mod_perl-1.25, and with perl compiled with and without usemymalloc. > I also tried Apache with mod_perl as a DSO and statically linked. > > apache 1.3.20 > expat-1.95.1 > mod_perl-1.26 > perl-5.6.1 > DBD-Oracle-1.06 > DBI-1.15 > XML-Parser-2.30 > > I searched the web and found a known problem with symbol conflict with > apache's expat, but I have --disable-rule=EXPAT. I also saw a > recommendation to use XML-Parser-2.29, which I tried with no success. > Has anyone here seen this problem or have ideas on how to solve it? > > The gdb backtrace: > (gdb) bt > #0 0xdefd3f98 in ?? () > #1 0xdfbd7da9 in ?? () > #2 0xdfbdeee2 in ?? () > #3 0xdfbd31a9 in ?? () > #4 0xdf78c6d1 in Perl_pp_entersub () >from /server/local/apache/libexec/libperl.so > #5 0xdf786f92 in Perl_runops_standard () >from /server/local/apache/libexec/libperl.so > #6 0xdf7484d6 in S_call_body () from /server/local/apache/libexec/libperl.so > #7 0xdf74829a in Perl_call_sv () from /server/local/apache/libexec/libperl.so > #8 0xdf729676 in perl_call_handler () >from /server/local/apache/libexec/libperl.so > #9 0xdf728ef4 in perl_run_stacked_handlers () >from /server/local/apache/libexec/libperl.so > #10 0xdf727734 in perl_handler () from /server/local/apache/libexec/libperl.so > #11 0x80739a5 in ap_invoke_handler () > #12 0x8088398 in process_request_internal () > #13 0x8088402 in ap_process_request () > #14 0x807f2db in child_main () > #15 0x807f564 in make_child () > #16 0x807f8ec in perform_idle_server_maintenance () > #17 0x807fe21 in standalone_main () > #18 0x8080460 in main () > #19 0x8056adf in _start () > > I turned on the nontstop debugging. The output from where it seg faults > is as follows. > > entering XML::Parser::Expat::parse > 438: my $self = shift; > 439: my $arg = shift; > 440: croak "Parse already in progress (Expat)" if $self->{_State_}; > 441: $self->{_State_} = 1; > 442: my $parser = $self->{Parser}; > 443: my $ioref; > 444: my $result = 0; > 446: if (defined $arg) { > 447: if (ref($arg) and UNIVERSAL::isa($arg, 'IO::Handle')) { > 455: eval { > 456: $ioref = *{$arg}{IO}; > 456: $ioref = *{$arg}{IO}; > -- end of output, seg fault here > > XML/Parser.pm > 455 sub Char { > 456my $expat = shift; > 457my $text = shift; > 458my $class = "${$expat}{Pkg}::Characters"; > 459my $clist = $expat->{Curlist}; > > > perl configure options: > -Dprefix=/server/local -Uusemymalloc -Ubincompat5005 -des > > % perl -V > Summary of my perl5 (revision 5.0 version 6 subversion 1) configuration: > Platform: > osname=solaris, osvers=2.8, archname=i86pc-solaris > uname='sunos x86-b 5.8 generic_108529-06 i86pc i386 i86pc ' > config_args='-Dprefix=/server/local -Uinstallusrbinperl -Ubincompat5005 -des' > hint=recommended, useposix=true, d_sigaction=define > usethreads=undef use5005threads=undef useithreads=undef usemultiplicity=undef > useperlio=undef d_sfio=undef uselargefiles=define usesocks=undef > use64bitint=undef use64bitall=undef uselongdouble=undef > Compiler: > cc='cc', ccflags ='-fno-strict-aliasing -I/usr/local/include -D_LARGEFILE_SOURCE >-D_FILE_OFFSET_BITS=64', > optimize='-O', > cppflags='-fno-strict-aliasing -I/usr/local/include' > ccversion='', gccversion='2.95.2 19991024 (release)', gccosandvers='solaris2.8' > intsize=4, longsize=4, ptrsize=4, doublesize=8, byteorder=1234 > d_longlong=define, longlongsize=8, d_longdbl=define, longdblsize=12 > ivtype='long', ivsize=4, nvtype='double', nvsize=8, Off_t='off_t', lseeksize=8 > alignbytes=4, usemymalloc=y, prototype=define > Linker and Libraries: > ld='cc', ldflags =' -L/usr/local/lib ' > libpth=/usr/local/lib /usr/lib /usr/ccs/lib > libs=-lsocket -lnsl -ldl -lm -lc > perllibs=-lsocket -lnsl -ldl -lm -lc > libc=/lib/libc.so, so=so, useshrplib=false, libperl=libperl.a > Dynamic Linking: > dlsrc=dl_dlopen.xs, dlext=so, d_dlsymun=undef, ccdlflags=' ' > cccdlflags='-fPIC', lddlflags='-G -L/usr
RewriteRule Proxy problems
I have a front-end lightweight Apache proxying Apache::ASP scripts to a backend mod_perl Apache. I am experiencing problems with query strings. In my lightweight httpd.conf, I have: RewriteRule ^/(.*)\.asp http://66.33.85.239/$1.asp [p] If I go to http://www.buildreferrals.com/rotatorstats.asp, it gets proxy'd correctly. But if I go to http://www.buildreferrals.com/rotatorstats.asp?login=pmak0 (that's the same URL, but with a query string added), then I get a "404 Not Found" error. The error log says: [Sun Jul 29 08:10:11 2001] [error] [client 206.173.59.73] File does not exist: proxy:http://66.33.85.239/rotatorstats.asp?login=pmak0 Does anyone know what I'm doing wrong? That error message seems strange because if I paste the http://66.33.85.239/rotatorstats.asp?login=pmak0 URL in my browser it will load. Looking at the logs for 66.33.85.239, it never even received a request from the frontend server when I got the 404 Not Found. I've also tried: RewriteRule ^/(.*\.asp(\?.*)?$) http://66.33.85.239/$1 [p] but it gives the same error message.
Re: Using Apache::Reload in development environment?
--On 30/07/01 06:43 -0400 Philip Mak wrote: > In "perldoc Apache::Reload", the DESCRIPTION has the following sections: > > - StatINC Replacement > - Register Modules Implicitly > - Register Modules Explicitly > - Special "Touch" File > > I just re-read it again and realized that "StatINC Replacement" is what I > wanted... although it wasn't obvious from just reading the header since I > don't know what StatINC is. Re-reading the first paragraph of DESCRIPTION, > I see that it implies that StatINC always checks the modification time of > the file. > > I was also somewhat confused as to what "PerlSetVar ReloadAll" does since > that perldoc page did not have an explicit definition, only examples of it > being used. PerlSetVar ReloadAll will reload all modules. That might take some time, so you might want to reload only your own modules, in which case you set it to Off, and add a directive to reload only your tree, such as PerlSetVar ReloadModules "Foo::* Bar::*" -- Eric Cholet 145C FF7F 7920 04B0 7BA3 48D8 5591 E2C0 6664 C078
Bad Action
I would like to apologies for my yesterday post of many lines. Though this message will cause also bandwith consumption, please forgive me ! I replied to the digest, instead of creating a new message. I am truly sorry ! Radu Caulea, Senior Oracle Consultant www.caulea.fr.st
RE: [Problem] Can't return Content-type with SERVER_ERROR
Hi, Geoffrey! > your procedure is correct. well, except that you can't do what you > want :) > > take a look at http_protocol.c - > > 'r->content_type = "text/html; charset=iso-8859-1";' is hardcoded > in ap_send_error_response(), so it's an apache thing and not a > mod_perl thing... Absolutely true to my surprise. That means you can't return proper content-type and content-encoding with non-OK codes, Apache will rewrite it for you anyway, which is too human-oriented and imho should be corrected. I ended up generating usual successful response with custom status (which is 500 in my case): $r->status($self->response->code); $self->response->headers->scan(sub { $r->header_out(@_) }); $r->send_http_header(join '; ', $self->response->content_type); $r->print($self->response->content); &Apache::Constants::OK; Probably worth mentioning in FAQ or somewhere. It took quite a bit of my time. Best wishes, Paul. --- Geoffrey Young <[EMAIL PROTECTED]> wrote: > > > > -Original Message- > > From: Paul Kulchenko [mailto:[EMAIL PROTECTED]] > > Sent: Monday, July 30, 2001 2:53 AM > > To: Stas Bekman > > Cc: [EMAIL PROTECTED] > > Subject: Re: [Problem] Can't return Content-type with > SERVER_ERROR > > > > [snip] > > > > > it's the same as to use err_headers_out as far as I understand. > What > > is the general procedure to generate custom content-type along > with > > SERVER_ERROR? > > > > sub handler { > > ... > > $r->content_type('text/xml; charset=utf-8'); > > $r->custom_response($self->response->code, > > $self->response->content); > > $self->response->code; > > } > > > > doesn't work if '$self->response->code' is 500. mod_perl > overrides my > > content-type with text/html. > > > > your procedure is correct. well, except that you can't do what you > want :) > > take a look at http_protocol.c - > > 'r->content_type = "text/html; charset=iso-8859-1";' is hardcoded > in > ap_send_error_response(), so it's an apache thing and not a > mod_perl > thing... > > HTH > > --Geoff > __ Do You Yahoo!? Make international calls for as low as $.04/minute with Yahoo! Messenger http://phonecard.yahoo.com/
Error with apache with mod_perl
Hi, my name is Mauricio I'm from Brazil I am trying install apache 1.3.20 with mod_perl 1.1.26 on Solaris 2.6 The output of gcc -v is: Reading specs from /net/gnu/stow/gcc-2.95.2-5.6/lib/gcc-lib/sparc-sun-solaris2.6/2.95.2/specsgcc version 2.95.2 19991024 (release) The steps of instalattion realized are: 1) I install perl 5.6.1 with the following options: sh Configure -Duseshrolib -Ubincompat5005 -Dcc=gcc make make test make install 2) I install mod_perl 1.1.26 with the following options: cd mod_perl_1.1.26 perl Makefile.PL APACHE_SRC="../apache.1.3.20/src" USE_APACI=1 USE_DSO=1 make make test make install question: Is right use USE_APACI=1 with USE_DSO=1 (next) ? 3) I install apache 1.3.20 with the following options: ./configure --prefix=/home/masilva/local/apachelocal --enable-module=so make make install I change httpd.conf: #httpd.conf LoadModule perl_module libexec/libperl.so Alias /perl/ /home/masilva/local/apachelocal/cgi-bin/perl/PerlModule Apache::PerlRun SetHandler perl-script PerlHandler Apache::PerlRun Options ExecCGI allow from all PerlSendHeader On PerlSetVar PerlRunOnce On I started apache with apachectl start wthout problems. I tried use Apache::Registry too. But when in the browser (netscape) i write in Location: "http://hermes:8081/perl/ag1/ag1.pl" The browser alert: The document contain no data Try again later or contact . The error_log display: [Mon Jul 30 11:52:53 2001] [notice] Apache/1.3.20 (Unix) mod_perl/1.26 configured -- resuming normal operations[Mon Jul 30 11:56:50 2001] [notice] child pid 21024 exit signal Segmentation Fault (11), possible coredump in /home/masilva/local/apachelocal Anybody know what i can be doing of error ? The apache function normally without error when i start with Apache::Perlrun or Registry disable. Thank you.
Re: Make test with mod_perl 1.26 - further iinfo
On Mon, 30 Jul 2001 [EMAIL PROTECTED] wrote: > > > What CGI.pm version are you using? > > perl -MCGI -le 'print $CGI::VERSION' > > Version 3.02. Is there a way to go back to an earlier version, if that > will take care of this problem? It was installed by either > Bundle::CPAN or Bundle::Apache - I have installed both of these > recently. Not with CPAN.pm. Grab it manually from CPAN or just copy CGI.pm if you still have it around (use 'locate') > > i think I've seen the same problem with v 3.02 which unfortunately > > gets installed by CPAN shell. > > > > In any case, when you have a problem with some test you should post > > the output of the verbose run. In your case it's: > > > > make start_httpd > > perl ./t/TEST -v modules/cgi > > make kill_httpd > > Here is the output from that: > > /usr/local/src/mod_perl-1.26> # make start_httpd > ../apache_1.3.20/src/httpd -f `pwd`/t/conf/httpd.conf -X -d `pwd`/t & > httpd listening on port 8529 > will write error_log to: t/logs/error_log > letting apache warm up...\c > done > /usr/local/src/mod_perl-1.26> # perl ./t/TEST -v modules/cgi > modules/cgi.module CGI is installed > 1..5 > ok 1 > ok 2 > ok 3 > ok 5 > FAILED test 4 > Failed 1/5 tests, 80.00% okay > Failed Test Status Wstat Total Fail Failed List of failed > --- > modules/cgi.t 51 20.00% 4 > Failed 1/1 test scripts, 0.00% okay. 1/5 subtests failed, 80.00% > okay. > /usr/local/src/mod_perl-1.26> # make kill_httpd > kill `cat t/logs/httpd.pid` > rm -f t/logs/httpd.pid > rm -f t/logs/error_log yeah, that's what I saw. > > > The only thing I have NOT done is installed Perl 5.6.1, which both > > > Bundle::CPAN and Bundle::Apache tried to install. Is this necessary > > > for this to work? Perl 5.00503 is on the box already. I was not > > > planning to upgrade Perl at this time. > > Is there any way to avoid starting to install Perl 5.6.1 when you > install Bundle::Apache or Bundle::CPAN? Yes and no. Newer CPAN.pm doesn't fetch 5.6.1 in most cases. I think it only does that if you ask for Data::Dumper and even then it asks whether you want to do that. May be that's not the case with Bundle:: > > you can always do: > > cpan> force install mod_perl > > to ignore the results of tests. Of course it's a good thing to report > > a bug and solve it. > > What would the side effects be to doing this, if there is a problem > with CGI.pm? No problems. CGI v3.x is in alpha stage. Get the 2.x version and you will be fine (and all the tests will pass too). > IN any case, thanks for the help and direction. You are very welcome :) _ Stas Bekman JAm_pH -- Just Another mod_perl Hacker http://stason.org/ mod_perl Guide http://perl.apache.org/guide mailto:[EMAIL PROTECTED] http://apachetoday.com http://eXtropia.com/ http://singlesheaven.com http://perl.apache.org http://perlmonth.com/
Re: Size
> I was wondering is this an unusual size? I know the man says size will grow etc... >but i am looking for others opinions based on there setups and real life vs. text >book comparison. > > 4669 nobody20 0 215M 91M 204 R29.6 55.9 1:00 httpd > That's not normal. Perhaps you have an old libapreq which did not handle memory well--install the latest Apache::Request from CPAN and see if your memory usage improves. If not, we'll need more info: what is the size of the process when started? ...what kinds of requests cause it to grow? ...how much does it grow each time? ...what line causes the memory to jump, if any (step through with Apache::DB watching memory use to test)? Sources of memory problems include circular references and failure to clean up resources between requests. -- Jeremy Howard [EMAIL PROTECTED]
Make test with mod_perl 1.26 - further iinfo
> What CGI.pm version are you using? > perl -MCGI -le 'print $CGI::VERSION' Version 3.02. Is there a way to go back to an earlier version, if that will take care of this problem? It was installed by either Bundle::CPAN or Bundle::Apache - I have installed both of these recently. > i think I've seen the same problem with v 3.02 which unfortunately > gets installed by CPAN shell. > > In any case, when you have a problem with some test you should post > the output of the verbose run. In your case it's: > > make start_httpd > perl ./t/TEST -v modules/cgi > make kill_httpd Here is the output from that: /usr/local/src/mod_perl-1.26> # make start_httpd ../apache_1.3.20/src/httpd -f `pwd`/t/conf/httpd.conf -X -d `pwd`/t & httpd listening on port 8529 will write error_log to: t/logs/error_log letting apache warm up...\c done /usr/local/src/mod_perl-1.26> # perl ./t/TEST -v modules/cgi modules/cgi.module CGI is installed 1..5 ok 1 ok 2 ok 3 ok 5 FAILED test 4 Failed 1/5 tests, 80.00% okay Failed Test Status Wstat Total Fail Failed List of failed --- modules/cgi.t 51 20.00% 4 Failed 1/1 test scripts, 0.00% okay. 1/5 subtests failed, 80.00% okay. /usr/local/src/mod_perl-1.26> # make kill_httpd kill `cat t/logs/httpd.pid` rm -f t/logs/httpd.pid rm -f t/logs/error_log > > The only thing I have NOT done is installed Perl 5.6.1, which both > > Bundle::CPAN and Bundle::Apache tried to install. Is this necessary > > for this to work? Perl 5.00503 is on the box already. I was not > > planning to upgrade Perl at this time. Is there any way to avoid starting to install Perl 5.6.1 when you install Bundle::Apache or Bundle::CPAN? > you can always do: > cpan> force install mod_perl > to ignore the results of tests. Of course it's a good thing to report > a bug and solve it. What would the side effects be to doing this, if there is a problem with CGI.pm? IN any case, thanks for the help and direction. -- Jonathan
[DIGEST] mod_perl digest 2001/07/28
-- mod_perl digest July 15, 2001 - July 28, 2001 -- Recent happenings in the mod_perl world... Features o mod_perl status o conference report o module announcements o mailing list highlights o links mod_perl status o mod_perl - stable: 1.26 (released July 11, 2001) [1] - development: 1.26_01-dev [2] o Apache - stable: 1.3.20 (released May 15, 2001) [3] - development: 1.3.21-dev [4] o Perl - stable: 5.6.1 (released April 9, 2001) [5] - development: 5.7.2 [6] conference report Well, the Open Source Convention was a success - it was the most enjoyable conference I have attended. I am sure that there will be a few reports that trickle in over the days as people return home, but here is a brief summary of my time at least... The usual cast of characters from the mod_perl community were there in full force - too many to mention without leaving somebody out. I think that everyone would agree that, despite far too many over-priced drinks, the time spent crowding the hotel lobby/bar was both enjoyable and constructive. There was no shortage of interesting talks. If you didn't already know, mod_perl had an entire track dedicated to it, with 6 tutorials and 13 talks. There were also separate Apache and XML tracks (and, of course, Perl). My own wanderings found me listening to Ryan Bloom, who gave a great overview of input and output filtering in Apache 2.0. Doug MacEachern's presentation of mod_perl 2.0 had lots of new material, including a demonstration of calling the mod_perl API from PHP. Matt Sergeant explained why SOAP sucks (and why it rocks), and Perrin Harkins deftly presented the different templating systems while avoiding an outright war using comedy and some burning images. There were lots of other talks given by people whose names you would recognize - I'll let others fill in the gaps. All in all it was highly educational and lots of fun - start making plans to attend next year... module announcements o SOAP::Lite 0.51 - a collection of Perl modules which provides a simple and lightweight interface to SOAP, including Apache::SOAP [7] o OpenInteract 1.1 - an extensible web application framework built on Apache, mod_perl, Template Toolkit and SPOPS [8] mailing list highlights It's been a light few weeks on the list, especially last week with the conference. I've been kinda swamped lately as well, but I'll try to return with something more substantial next week. o ApacheCon Dublin has been cancelled [9] o Some tips on increasing the amount of shared memory between the parent and child processes when using databases [10] o Share some experiences with Ultimate Bulletin Board [11] links o The Apache/Perl Integration Project [12] o mod_perl documentation [13] o mod_perl modules on CPAN [14] o mod_perl homepage [15] o mod_perl news and advocacy [16] o mod_perl list archives - modperl@ [17] [18] - dev@ [19] happy mod_perling... --Geoff [EMAIL PROTECTED] -- [1] http://perl.apache.org/dist/ [2] http://perl.apache.org/from-cvs/modperl/ [3] http://www.apache.org/dist/httpd/ [4] http://dev.apache.org/from-cvs/apache-1.3/ [5] http://www.cpan.org/src/stable.tar.gz [6] http://www.cpan.org/src/devel.tar.gz [7] http://forum.swarthmore.edu/epigone/modperl/raxgloxkhah [8] http://forum.swarthmore.edu/epigone/modperl/bligermlil [9] http://forum.swarthmore.edu/epigone/modperl/peebrorsterd [10] http://forum.swarthmore.edu/epigone/modperl/skulwerdpen [11] http://forum.swarthmore.edu/epigone/modperl/faxdimyerd [12] http://perl.apache.org [13] http://perl.apache.org/#docs [14] http://www.cpan.org/modules/by-module/Apache/ [15] http://www.modperl.com [16] http://www.take23.org [17] http://forum.swarthmore.edu/epigone/modperl/ [18] http://marc.theaimsgroup.com/?l=apache-modperl&r=1&w=2 [19] http://marc.theaimsgroup.com/?l=apache-modperl-dev&r=1&w=2
Re: Size
On Mon, 30 Jul 2001, John Buwa wrote: > It seems my modperl apache runs slower than my regular apache could this be the >reason? That's likely to be a symptom, not a cause. Can you be less vague than "runs slower"? Under mod_perl, your Perl scripts should run faster than they do under plain Apache, if they don't then something is wrong. Could be the machine is swapping for example. How much RAM have you got? 73, Ged.
Re: Copying files across machines
Hi there, On Sun, 29 Jul 2001, Radu Caulea wrote: > I use Apache 3.19, mod_perl, Oracle in an NT environment. As I decided to > have Apache on one machine and Oracle on another, I need to transfer and > display with Apache/mod_perl a remote html file (i.e. written by Oracle on > the other machine). [2000+ lines snipped] Please keep your posts to this list SHORT. The messages go out to thousands of readers. TMTOWTDI. You could use LWP:Simple for example to fetch the file if the Oracle server is prepared to give it up. Write a mod_perl handler on the Apache machine to fetch the file and then -er- simply print it. 73, Ged.
RE: Size
In our setup... (with many many modules loaded), the apache processes are around 30-40mb. In cases where I've seen apache get that big it's always been due to a bug or memory leak, usually in my own code. Michael -Original Message-From: John Buwa [mailto:[EMAIL PROTECTED]]Sent: Monday, July 30, 2001 11:44 AMTo: [EMAIL PROTECTED]Subject: Size Hello, I was wondering is this an unusual size? I know the man says size will grow etc... but i am looking for others opinions based on there setups and real life vs. text book comparison. 4669 nobody 20 0 215M 91M 204 R 29.6 55.9 1:00 httpd It seems my modperl apache runs slower than my regular apache could this be the reason? Thanks, John http://www.iii.co.uk Interactive Investor International is a leading UK Internet personal finance service that provides individuals with the capability to identify, compare, monitor and buy online a number of financial products and services. Interactive Investor Trading Limited, a subsidiary of Interactive Investor International plc, is regulated by the SFA.
Size
Hello, I was wondering is this an unusual size? I know the man says size will grow etc... but i am looking for others opinions based on there setups and real life vs. text book comparison. 4669 nobody 20 0 215M 91M 204 R 29.6 55.9 1:00 httpd It seems my modperl apache runs slower than my regular apache could this be the reason? Thanks, John
Re: Using Apache::Reload in development environment?
On Mon, 30 Jul 2001, Stas Bekman wrote: > no (re-)?read the manpage. it's all there. > > It's possible that Matt wants to add other options to the SYNOPSIS > section, as not everybody bothers to read the manpage. I think people are > used to see all of the functionality covered in SYNOPSIS. In "perldoc Apache::Reload", the DESCRIPTION has the following sections: - StatINC Replacement - Register Modules Implicitly - Register Modules Explicitly - Special "Touch" File I just re-read it again and realized that "StatINC Replacement" is what I wanted... although it wasn't obvious from just reading the header since I don't know what StatINC is. Re-reading the first paragraph of DESCRIPTION, I see that it implies that StatINC always checks the modification time of the file. I was also somewhat confused as to what "PerlSetVar ReloadAll" does since that perldoc page did not have an explicit definition, only examples of it being used.
RE: [Problem] Can't return Content-type with SERVER_ERROR
> -Original Message- > From: Paul Kulchenko [mailto:[EMAIL PROTECTED]] > Sent: Monday, July 30, 2001 2:53 AM > To: Stas Bekman > Cc: [EMAIL PROTECTED] > Subject: Re: [Problem] Can't return Content-type with SERVER_ERROR > [snip] > > it's the same as to use err_headers_out as far as I understand. What > is the general procedure to generate custom content-type along with > SERVER_ERROR? > > sub handler { > ... > $r->content_type('text/xml; charset=utf-8'); > $r->custom_response($self->response->code, > $self->response->content); > $self->response->code; > } > > doesn't work if '$self->response->code' is 500. mod_perl overrides my > content-type with text/html. > your procedure is correct. well, except that you can't do what you want :) take a look at http_protocol.c - 'r->content_type = "text/html; charset=iso-8859-1";' is hardcoded in ap_send_error_response(), so it's an apache thing and not a mod_perl thing... HTH --Geoff