Re: mod_perl 1.21 - CGI.pm 2.56 error in phase other than content
On Fri, 10 Dec 1999 [EMAIL PROTECTED] wrote: Does nay one know how to get round the bug in the above combination. When I create a new CGI in any phase other than Response I get a Can't call method "register_cleanup" on an undefined value at /usr/lib/perl5/5.00505/CGI.pm line 263. This would appear to be caused by apache-request not returning the request. from ~/Mail/.sent-mail-sep-1999: To: Ken Williams [EMAIL PROTECTED] cc: al [EMAIL PROTECTED], [EMAIL PROTECTED] Subject: Re: Help! CGI.pm problems with Apache In-Reply-To: [EMAIL PROTECTED] Message-ID: [EMAIL PROTECTED] MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII On Tue, 3 Aug 1999, Ken Williams wrote: I believe you need to upgrade your mod_perl, this bug has been squashed in 1.21. this is actually not related to that bug. the bug 1.21 fixed what that registered cleanups were not always called. this bug is triggered by CGI.pm calling Apache-request before the content response phase. Ali, give us more details on your module, what phase is it called in? you should be able to bandaid with this configuration: PerlPostReadRequestHandler 'sub { Apache-request(shift) }' -Doug
Re: silent failure when I try to use PerlRequire in httpd.conf
if you build with PERL_TRACE=1 and start the server like so: % setenv MOD_PERL_TRACE=1 % httpd -X you should get some helpful diagnotics. On Sat, 11 Dec 1999, Bill Marrs wrote: Hi, I've been using mod_perl successfully albeit minimally for a couple months now. I'm trying to tune performance and memory usage by consolidating some common Perl "use" directives in a PerlRequire statement. However, when I add this line to my Apache config file (/etc/httpd/conf/httpd.conf), the server fails to come up - and also give no indication that I can find of a problem. So, I don't know what's going wrong. Here's what I'm adding to my httpd.conf file: PerlRequire /home/ugtz/startup.pl I have the usual stuff in my /home/ugtz/startup.pl file, actually I tried commenting everything but the #!/usr/local/bin/perl and the "1;" at the end, and it still failed. So, I don't think the contents of the file are at fault. My httpd error log doesn't say anything is wrong, it actually doesn't log anything - like it never got that far... I do: % /etc/rc.d/init.d/httpd start Starting httpd: [ OK ] % ps -ef |grep httpd [no httpd processes] % tail /etc/httpd/logs/error_log [ nothing new in log ] Does anyone have any clues for me to track down on this, I'm stumped. -bill
Re: more then one PerlTransHandler
On 12 Dec 1999, Evgenii Bazarov wrote: Hi! I tried to set more then one PerlTransHandler but if I specify both on the same line, Apache says "syntax error", otherwise it see only the last one. make sure you have built the server with at least PERL_STACKED_HANDLERS=1 or EVERYTHING=1. if you're still stuck, please send the complete error message.
Re: Newbie: Tough times with sfio
On Sun, 5 Dec 1999, hamid khoshnevis wrote: Hello, I am a newbie modperl'er and I am tyring to get system calls to return data to modperl (via stdout). Based on what I have read, sfio need to be linked in. Has anyone successfully done so and does stdout gets directed properly. you can use: print `command`; instead of system "command"; but you're throwing performance out the window either way. best not to fork at all if you can avoid it.
Re: simple xml parsing within html
On Thu, 9 Dec 1999, G.W. Haywood wrote: any suggestions on making HTML::Parser work faster Performance is a real issue in mod_perl systems, so I've put some work into this. Maybe it will spawn a thread. Here are a couple of suggestions for speeding up HTML::Parser. Apparently the author is looking at this at present too. He will know a lot more about what the code is doing that I do. have you not seen HTML-Parser-XS: http://www.cpan.org/authors/id/GAAS/ ??
Re: Unloading a library
On Tue, 7 Dec 1999, Matt Sergeant wrote: How can I completely unload a library and all memory associated with it, and unload any dso's connected with that library? For example, say I use XML::Parser in a Perl section - I don't want that hanging around - it's a big library, so I'd like to completely unload it - is it possible? how about: delete $INC{'XML/Parser.pm'}; Apache::PerlRun-flush_namespace('XML::Parser'); for .so's you might be able to pull some stunts with DynaLoader, but I haven't tried that.
Re: PerlFreshRestart and %INC
On Fri, 3 Dec 1999, Tim Bunce wrote: ... But is that _really_ what PerlFreshRestart does? I thought it destroyed the entire perl interpreter before then recreating one from scratch? this is the way PerlFreshRestart works at the moment. the original implementation did destroy the interpreter and re-compile everything from scratch. but perl_destruct() wasn't quite bug free at the time, the current hack was put in it's place, which we found out later, isn't bug free either. we will do it the right way for 2.0, but in the meantime, a complete shutdown and start of the server is the safest way to do a "fresh restart".
Re: Apache::StatINC problem with use base
On Sun, 5 Dec 1999, Autarch wrote: I encountered a problem using Apache::StatINC with modules that have the directive: use base qw( SomeClass ); The error I got was the following: [Mon Dec 6 07:35:47 1999] [error] Inherited %FIELDS can't override existing %FIELDS at /usr/lib/perl5/5.0050 3/base.pm line 73 BEGIN failed--compilation aborted at /usr/lib/perl5/site_perl/5.005/HKMDB/Job.pm line 10. After messing a bit with Apache::StatINC I found that the solution was to 'use' the module again rather than requiring it. I have a patch attached to do this. I'm not sure if this is really the right solution though. ! require $key; ... ! eval "use $key;"; use() doesn't help, you just hid the problem with eval "" I suppose it wouldn't be such a bad idea to change: eval { require $key }; warn $@ if $@;
Re: Name: overview
On Sat, 4 Dec 1999, Victor Zamouline wrote: Let me overview the propositions that have been made: 1) Eagle, proposed by Ged Haywood. Copyrighted by O'Reilly, but it looks like this problem can be solved. 2) Hedgehog, proposed by Stas Bekman. 3) Oyster, proposed by Randy Harmon 4) Mythical beast with the head of an eagle and the body of a camel, proposed by Rod Butcher 5) Meld Pro, anagram proposed by Robin Berjon 6) Eagle with a single red-blue-yellow feather in its wing, proposed by Salve Nilsen 7) Red brick base of a building, with mod_perl inscribed on a brass plaque, proposed by John Burns Did I miss out something? while I appreciate the enthusiasm: - the name mod_perl will not change, mod_ == Apache, perl == Perl, the name is almost 4 years old, it simply doesn't make sense to change it - if you want to hold a new logo contest like the one we had ~2 years ago, that could be fun, see http://perl.apache.org/logos/
Re: Book: guestbook.cgi
On Sun, 12 Dec 1999, Michael Dearman wrote: I've copied example 4-15 and multi-checked it, for the past couple of days. Finally used a copy of the example obtained from the book site. But still have problems. modperl.com has the book source tarball, including a newer version of the guestbook than the (broken) example in the book.
Re: @INC and make test
looks like the httpd you are running does not have Apache::Util linked in. EVERYTHING=1 should take care of that, which you can see using nm: % nm ../apache-1.3/src/httpd | grep Util 0809b800 T XS_Apache__Util_escape_html 0809b750 T XS_Apache__Util_escape_uri 0809b8a0 T XS_Apache__Util_ht_time 0809b9e0 T XS_Apache__Util_parsedate 0809b6c4 T XS_Apache__Util_size_string 0809ba94 T boot_Apache__Util On Wed, 8 Dec 1999, Ruben I Safir wrote: Working on Red HAT 6.0 Down loaded and untarred Perl Modules and Apache (no rpm) make test on modperl fails on trying to find PerlTransHandler which httpd -L doesn't display. Compilered according to instructions for APACI with perl Makefile.PL EVERYTHING=1 DO_HTTPD=1 USE_APACI-1 make make install Also - we loaded EMBPERL. We are using the following httpd.conf listing on the bottom. httpd can't load a modules Apache:Util which is in the path that it says it can't find. This is the error: [root@webbie /root]# /usr/local/apache/bin/httpd Syntax error on line 198 of /usr/local/apache/conf/httpd.conf: Can't locate loadable object for module Apache::Util in @INC (@INC contains: /usr/lib/perl5/5.00503/i386-linux /usr/lib/perl5/5.00503 /usr/lib/perl5/site_perl/5.005/i386-linux /usr/lib/perl5/site_perl/5.005 . /usr/local/apache/ /usr/local/apache/lib/perl) at /usr/lib/perl5/site_perl/5.005/i386-linux/mod_perl.pm line 14 BEGIN failed--compilation aborted at /usr/lib/perl5/site_perl/5.005/Apache/EmbperlChain.pm line 4. ls -al /usr/lib/perl5/site_perl/5.005/i386-linux/Apache Blah Blah -rwxrwxrwx 1 root root 2444 Feb 1 1999 Util.pm As you can see, I opened Util all the way, yet it still can't seem to be found (grinding teeth) I tried to uncover the error but I think I'm not getting the problem. I modified mod_perl.pm to printout from standard error The result is this: [root@webbie /root]# /usr/local/apache/bin/httpd ENV mod_perl/1.21 CLASS : Apache::Constants ENV mod_perl/1.21 CLASS : Apache::Connection ENV mod_perl/1.21 CLASS : Apache::Server ENV mod_perl/1.21 CLASS : Apache ENV mod_perl/1.21 CLASS : Apache::Util Syntax error on line 198 of /usr/local/apache/conf/httpd.conf: Can't locate loadable object for module Apache::Util in @INC (@INC contains: /usr/lib/perl5/5.00503/i386-linux /usr/lib/perl5/5.00503 /usr/lib/perl5/site_perl/5.005/i386-linux /usr/lib/perl5/site_perl/5.005 . /usr/local/apache/ /usr/local/apache/lib/perl) at /usr/lib/perl5/site_perl/5.005/i386-linux/mod_perl.pm line 17 BEGIN failed--compilation aborted at /usr/lib/perl5/site_perl/5.005/Apache/EmbperlChain.pm line 4. __ ServerType standalone ServerRoot "/usr/local/apache" PidFile /usr/local/apache/logs/httpd.pid ScoreBoardFile /usr/local/apache/logs/httpd.scoreboard Timeout 300 KeepAlive On MaxKeepAliveRequests 100 KeepAliveTimeout 15 MinSpareServers 5 MaxSpareServers 10 StartServers 5 MaxClients 150 MaxRequestsPerChild 0 Port 80 User nobody Group nobody ServerAdmin [EMAIL PROTECTED] DocumentRoot "/usr/local/apache/htdocs" Directory / Options FollowSymLinks AllowOverride None /Directory Directory "/usr/local/apache/htdocs" Options Indexes FollowSymLinks AllowOverride None Order allow,deny Allow from all /Directory UserDir public_html DirectoryIndex index.html AccessFileName .htaccess Files ~ "^\.ht" Order allow,deny Deny from all /Files UseCanonicalName On TypesConfig /usr/local/apache/conf/mime.types DefaultType text/plain IfModule mod_mime_magic.c MIMEMagicFile /usr/local/apache/conf/magic /IfModule HostnameLookups Off ErrorLog /usr/local/apache/logs/error_log LogLevel warn LogFormat "%h %l %u %t \"%r\" %s %b \"%{Referer}i\" \"%{User-Agent}i\"" combined LogFormat "%h %l %u %t \"%r\" %s %b" common LogFormat "%{Referer}i - %U" referer LogFormat "%{User-agent}i" agent CustomLog /usr/local/apache/logs/access_log common ServerSignature On Alias /icons/ "/usr/local/apache/icons/" Alias /embperl2 "/usr/local/apache/embperl/" Directory "/usr/local/apache/icons" Options Indexes MultiViews AllowOverride None Order allow,deny Allow from all /Directory # This module changes base href to sruben.dental.nyu.edu PerlModule Apache::BASEREF Directory "/usr/local/apache/htdocs" SetHandler perl-script PerlHandler Apache::BASEREF /Directory Directory "/usr/local/apache/embperl" SetHandler perl-script PerlHandler Apache::BASEREF /Directory Directory "/usr/local/apache/finance" SetHandler perl-script PerlHandler Apache::BASEREF /Directory ScriptAlias /cgi-bin/ "/usr/local/apache/cgi-bin/" Directory "/usr/local/apache/cgi-bin" AllowOverride None
Re: Hanging processes
On Fri, 10 Dec 1999, Tony Demark wrote: I am having a problem with hanging httpd processes. I have done some AV searches as well as investigated the list archives and did not find any conclusive answer to this problem. If I missed it, can someone point me in the right direction? If any more information will help decode this problem, I can reproduce the problem really easily (bot hitting our stage site causes a few of these processes to pop up). a few things could shed some more light: build a libperld.a and compile with PERL_DEBUG=1 (see SUPPORT doc) and/or, in gdb: (gdb) source mod_perl-1.21/.gdbinit (gdb) curinfo should tell you the line/filename of the offending Perl code add this to the .gdbinit (which is in the modperl cvs tree): define longmess set $sv = perl_eval_pv("Carp::longmess()", 1) printf "%s\n", ((XPV*) ($sv)-sv_any )-xpv_pv end (gdb) longmess should produce a Perl stacktrace
RE: silent failure when I try to use PerlRequire in httpd.conf
(gdb) bt #0 0x40308503 in boot_DBI () Looks like your Perl installation binaries (DBI in this case), doesn't match with Apache/mod_perl. So the best would be to compile everything Apache/Perl/mod_perl from the sources Gerald
Re: ModPerl problems, I think
From: Dave Pfaltzgraff@PATAPSCO on 12/14/99 08:50 AM I have a problem, that I think is mod_perl, but since I'm new, I'll need some pointers. perl.apache.org/guide My system is apache with mod_perl running on a linux system. For the most part it runs fine, but every once in a while, the server stops responding. The entry in the error log is: [error] Undefined subroutine called at /usr/local/apache/perl/main line 164. When I look at the code, line 164 is the first call to a subroutine in the module called DAS.pm. In my httpd.conf file, I have the line: PerlRequire DAS.pm DASPG.pm I think what puzzles me the most is that this will be running and then all of a sudden the error occurs. Once it happens, the only recourse is to stop and restart apache. It's almost as though apache, or maybe mod_perl, forgets that the module was loaded. Any suggestions as to what may be going wrong? What should I look for? Thanks for any pointers, Dave ___ Stas Bekmanmailto:[EMAIL PROTECTED] http://www.stason.org/stas Perl,CGI,Apache,Linux,Web,Java,PC http://www.stason.org/stas/TULARC perl.apache.orgmodperl.sourcegarden.org perlmonth.comperl.org single o- + single o-+ = singlesheavenhttp://www.singlesheaven.com
Re: Hanging processes
Doug, Tried what you suggest, but with seemingly disappointing results. (below) The hangs seem to come _after_ the logging phase - the heap just keep growing and the process takes up all available CPU, but it doesn't seem to be doing anything! This is really getting dis-heartening. Thanks, - Tony gdb /opt/apache/bin/httpd 7396 Attaching to program `/opt/apache/bin/httpd', process 7396 Reading symbols from /usr/lib/libsocket.so.1...done. Reading symbols from /usr/lib/libnsl.so.1...done. Reading symbols from /usr/lib/libdl.so.1...done. Reading symbols from /usr/lib/libm.so.1...done. Reading symbols from /usr/lib/libc.so.1...done. Reading symbols from /usr/lib/libcrypt_i.so.1...done. Reading symbols from /usr/lib/libmp.so.2...done. Reading symbols from /usr/lib/libgen.so.1...done. Reading symbols from /usr/platform/SUNW,Ultra-250/lib/libc_psr.so.1...done. Reading symbols from /opt/local/perl/auto/BSD/Resource/Resource.so...done. Reading symbols from /opt/local/lib/perl5/auto/Data/Dumper/Dumper.so...done. Reading symbols from /opt/local/lib/perl5/auto/B/B.so...done. Reading symbols from /opt/local/lib/perl5/auto/Fcntl/Fcntl.so...done. Reading symbols from /opt/local/lib/perl5/auto/DB_File/DB_File.so...done. Reading symbols from /opt/local/perl/auto/Time/HiRes/HiRes.so...done. Reading symbols from /usr/lib/nss_files.so.1...done. Reading symbols from /opt/local/lib/perl5/auto/IO/IO.so...done. Reading symbols from /opt/local/lib/perl5/auto/Socket/Socket.so...done. Symbols already loaded for /usr/lib/libsocket.so.1 Symbols already loaded for /usr/lib/libnsl.so.1 Symbols already loaded for /usr/lib/libdl.so.1 Symbols already loaded for /usr/lib/libm.so.1 Symbols already loaded for /usr/lib/libc.so.1 Symbols already loaded for /usr/lib/libcrypt_i.so.1 Symbols already loaded for /usr/lib/libmp.so.2 Symbols already loaded for /usr/lib/libgen.so.1 Symbols already loaded for /usr/platform/SUNW,Ultra-250/lib/libc_psr.so.1 Symbols already loaded for /opt/local/perl/auto/BSD/Resource/Resource.so Symbols already loaded for /opt/local/lib/perl5/auto/Data/Dumper/Dumper.so Symbols already loaded for /opt/local/lib/perl5/auto/B/B.so Symbols already loaded for /opt/local/lib/perl5/auto/Fcntl/Fcntl.so Symbols already loaded for /opt/local/lib/perl5/auto/DB_File/DB_File.so Symbols already loaded for /opt/local/perl/auto/Time/HiRes/HiRes.so Symbols already loaded for /usr/lib/nss_files.so.1 Symbols already loaded for /opt/local/lib/perl5/auto/IO/IO.so Symbols already loaded for /opt/local/lib/perl5/auto/Socket/Socket.so 0xff251ac8 in memcmp () from /usr/platform/SUNW,Ultra-250/lib/libc_psr.so.1 (gdb) (gdb) source /opt/local/src/info_services/mod_perl-1.21/.gdbinit (gdb) curinfo Attempt to extract a component of a value that is not a structure pointer. (gdb) longmess Attempt to extract a component of a value that is not a structure pointer. (gdb) In message [EMAIL PROTECTED], Doug MacEa chern writes: On Fri, 10 Dec 1999, Tony Demark wrote: I am having a problem with hanging httpd processes. I have done some AV searches as well as investigated the list archives and did not find any conclusive answer to this problem. If I missed it, can someone point me in t he right direction? If any more information will help decode this problem, I ca n reproduce the problem really easily (bot hitting our stage site causes a few of these processes to pop up). a few things could shed some more light: build a libperld.a and compile with PERL_DEBUG=1 (see SUPPORT doc) and/or, in gdb: (gdb) source mod_perl-1.21/.gdbinit (gdb) curinfo should tell you the line/filename of the offending Perl code add this to the .gdbinit (which is in the modperl cvs tree): define longmess set $sv = perl_eval_pv("Carp::longmess()", 1) printf "%s\n", ((XPV*) ($sv)-sv_any )-xpv_pv end (gdb) longmess should produce a Perl stacktrace
Re: $r-handler returning undef
At 12:14 AM 12/14/99 -0800, Doug MacEachern wrote: On Sun, 12 Dec 1999, Bill Moseley wrote: I'm wondering why $r-handler returns undef for perl-script handlers. I just dropped this into t/conf/httpd.conf: [...] and ran 'make test', I see the expected results: handler=text/perl-module, uri=/LoadClass.pm Oh, sorry. I got caught on the internal redirect of a DirectoryIndex directive used in a number of different directories. The original request for / was returning $r-handler = undef and the subrequest, of course, wasn't hitting the PerlLogHandler. For example, this is what I was seeing: [Tue Dec 14 07:42:05 1999] [warn] 6571 'unknown handler' 'PerlLogHandler' 'httpd/unix-directory' GET / HTTP/1.0 Changing to a PerlFixupHandler seems to catch the internal redirect -- although it get two entries in my log on an internal redirect. Thanks for your time, Bill Moseley mailto:[EMAIL PROTECTED]
Re: apache segfaults on mod_perl dlclose
So I've been reading. I've actually then gone on to test it with a non-DSO mod_perl and still get segfaults in the cleanup handling phase. I think the two errors may be related. I'm attaching The output from MOD_PERL_TRACE=all (had to set PERL_FREE=0 since it was giving way too many error messages. Hope this helps. This problem is really hampering my work at the moment. Let me know if there's anything else I should try. -Saar On Tue, 14 Dec 1999, Doug MacEachern wrote: mod_perl+dso is not a stable mix, try linking mod_perl static. On Fri, 10 Dec 1999, Saar Picker wrote: Hi, After building apache with --shared-module=max and building mod_perl using apxs, I get some strange behavior. I've also built my perl with -g -DDEBUGGING. On starting the web server, I get a bunch of "Bad free() ignored." messages that seem to occur at the end of every block of perl code (ie. scripts, loaded modules, etc.). Then the server segfaults. Using httpd -X and gdb I've found that it cores when trying to do a dlclose() on the mod_perl shared library. Does anyone have an insights as to what might be happening? Backtrace below. Thanks, -Saar Picker Backtrace: (gdb) bt #0 0x401f4624 in ?? () #1 0x4009d0c0 in dlclose_doit (handle=0x80b5fb0) at dlclose.c:26 #2 0x4000a12b in _dl_catch_error (errstring=0x4009ed00, operate=0x4009d0a8 dlclose_doit, args=0x80b5fb0) at dl-error.c:141 #3 0x4009d608 in _dlerror_run (operate=0x4009d0a8 dlclose_doit, args=0x80b5fb0) at dlerror.c:122 #4 0x4009d08e in dlclose (handle=0x80b5fb0) at dlclose.c:32 #5 0x806f590 in ap_os_dso_unload (handle=0x80b5fb0) at os.c:130 #6 0x804f280 in unload_module (modi=0x80ad2d4) at mod_so.c:181 #7 0x805102e in run_cleanups (c=0x80ae05c) at alloc.c:1706 #8 0x804f85d in ap_clear_pool (a=0x80ad0dc) at alloc.c:531 #9 0x805f803 in standalone_main (argc=4, argv=0xb954) at http_main.c:4469 #10 0x8060093 in main (argc=4, argv=0xb954) at http_main.c:4830 #11 0x400b7cb3 in __libc_start_main (main=0x805fd5c main, argc=4, argv=0xb954, init=0x804e890 _init, fini=0x8093d6c _fini, rtld_fini=0x4000a350 _dl_fini, stack_end=0xb94c) at ../sysdeps/generic/libc-start.c:78 loading perl module 'Apache'...ok perl_startup: perl aleady running...ok loading perl module 'Apache'...ok cleanup_av: SvREFCNT(0x81c8c14)==1 cleanup_av: SvREFCNT(0x819102c)==1 cleanup_av: SvREFCNT(0x819138c)==1 cleanup_av: SvREFCNT(0x8184ba4)==1 cleanup_av: SvREFCNT(0x8191074)==1 cleanup_av: SvREFCNT(0x8191020)==1 cleanup_av: SvREFCNT(0x81076c0)==1 cleanup_av: SvREFCNT(0x81076f0)==1 cleanup_av: SvREFCNT(0x81076d8)==1 loading perl module 'Apache'...ok [Tue Dec 14 09:28:11 1999] [error] Cannot remove module mod_perl.c: not found in module list perl_cmd_warn: 1 perl_cmd_tainting: 1 perl_cmd_setenv: 'PERLDB_OPTS' = 'NonStop=1 LineInfo=/tmp/db.out AutoTrace=1 frame=2' loading perl module 'Apache'...ok loading perl module 'Apache::DB'...ok perl_cmd_fresh_restart: 0 perl_cmd_require: /usr/home/saarp/test/apache/perl/startup.pl attempting to require `/usr/home/saarp/test/apache/perl/startup.pl' init `PerlTransHandler' stack perl_cmd_push_handlers: @PerlTransHandler, 'Apache::UriHandler' pushing `Apache::UriHandler' into `PerlTransHandler' handlers init `PerlLogHandler' stack perl_cmd_push_handlers: @PerlLogHandler, 'Apache::LogDBI' pushing `Apache::LogDBI' into `PerlLogHandler' handlers init `PerlHandler' stack perl_cmd_push_handlers: @PerlHandler, 'Apache::Registry' pushing `Apache::Registry' into `PerlHandler' handlers init `PerlHandler' stack perl_cmd_push_handlers: @PerlHandler, 'Apache::AXML' pushing `Apache::AXML' into `PerlHandler' handlers init `PerlHandler' stack perl_cmd_push_handlers: @PerlHandler, 'Apache::Logon' pushing `Apache::Logon' into `PerlHandler' handlers init `PerlHandler' stack perl_cmd_push_handlers: @PerlHandler, 'Apache::Logout' pushing `Apache::Logout' into `PerlHandler' handlers init `PerlHandler' stack perl_cmd_push_handlers: @PerlHandler, 'Apache::Error' pushing `Apache::Error' into `PerlHandler' handlers init `PerlHandler' stack perl_cmd_push_handlers: @PerlHandler, 'Apache::Error' pushing `Apache::Error' into `PerlHandler' handlers init `PerlHandler' stack perl_cmd_push_handlers: @PerlHandler, 'Apache::PlaySong' pushing `Apache::PlaySong' into `PerlHandler' handlers loading perl module 'Apache'...ok `PerlRestartHandler' push_handlers() stack is empty PerlRestartHandler handlers returned -1 [Tue Dec 14 09:28:11 1999] [info] created shared memory segment #545920 perl_init_ids: uid=99, euid=99, gid=99, egid=99 `PerlChildInitHandler' push_handlers() stack is empty PerlChildInitHandler handlers returned -1 `PerlInitHandler' push_handlers() stack is empty PerlInitHandler handlers returned -1 `PerlPostReadRequestHandler' push_handlers() stack is empty PerlPostReadRequestHandler handlers
One handler covering the whole site
I am trying to implement a small mod_perl handler that will affect the whole site, but at the same time should also let every other handler do its work. I have tried the following in my httpd.conf: ... LocationMatch / SetHandler perl-script PerlHandler My::Handler /LocationMatch Location /hello SetHandler perl-script PerlHandler Apache::Hello /Location ... But that means that Location /hello is not affected by My::Handler and if I change the order of the Location sections /hello doesn't work anymore (Can't be found). Is there a way of implementing a handler affecting the whole site without having to add it to every location and directory directive in the httpd.conf? (I would like the following module to take over when I return DECLINED, but that doesn't work the way I did it.) Kees
Re: silent failure when I try to use PerlRequire in httpd.conf
#1 0x403da306 in ?? () from /etc/httpd/modules/libperl.so broken record mod_perl+dso is not a stable mix, try linking mod_perl static /broken record
Re: Hanging processes
On Tue, 14 Dec 1999, Tony Demark wrote: Doug, Tried what you suggest, but with seemingly disappointing results. (below) The hangs seem to come _after_ the logging phase - the heap just keep growing and the process takes up all available CPU, but it doesn't seem to be doing anything! if you could try the libperld.a+PERL_DEBUG=1 suggestion, and a new stacktrace, it might provide some new clues.
Re: Limiting CPU (was Re: embperl pages and braindead sucking robots)
"Doug" == Doug MacEachern [EMAIL PROTECTED] writes: My CPU-based limiter is working quite nicely. It lets oodles of static pages be served, but if someone starts doing CPU intensive stuff, they get booted for hogging my server machine. The nice thing is that I return a standard "503" error including a "retry-after", so if it is a legitimate mirroring program, it'll know how to deal with the error. Doug choice! It's also been very successful at catching a whole slew of user-agents that believe in sucking senselessly. Here's my current block-list: or m{Offline Explorer/} # bad robot! or m{www\.gozilla\.com} # bad robot! or m{pavuk-}# bad robot! or m{ExtractorPro} # bad robot! or m{WebCopier} # bad robot! or m{MSIECrawler} # bad robot! or m{WebZIP}# bad robot! or m{Teleport Pro} # bad robot! or m{NetAttache/} # bad robot! or m{gazz/} # bad robot! or m{geckobot} # bad robot! or m{nttdirectory} # bad robot! or m{Mister PiX}# bad robot! Of course, these are just the ones that hit my site hard enough to trigger the "exceeds 10% cumulative CPU in 15 seconds" rule. They often get in trouble when they start invoking the 20 or 30 links in /books/ that look like /cgi/amazon?isbn=, in SPITE of my /robots.txt that says "don't look in /cgi". (More on that in a second...) Doug - one thing I noticed is that mod_cgi isn't charging the child-process time to the server anywhere between post-read-request and log phases. Does that mean there's no "wait" or "waitpid" until cleanup? Doug it should be, mod_cgi waits for the child, parsing it's header output, Doug etc. mod_cgi does no waiting. :) The only wait appears to be in the cleanup handling area. Hence, in my logger, I do this: ## first, reap any zombies so child CPU is proper: { my $kid = waitpid(-1, 1); if ($kid 0) { # $r-log-warn("found kid $kid"); # DEBUG redo; } } And every mod_cgi would generate a process for me in this LogHandler, so I know that mod_cgi is not reaping them. FYI. :) Also, Doug, can there be only one $r-cleanup_handler? I was getting intermittent results until I changed my -cleanup_handler into a push'ed loghandler. I also use -cleanup_handler in other modules, so I'm wondering if there's a conflict. Doug you should be able to use any number of cleanup_handlers. do you have a Doug small test case to reproduce the problem? Grr. Not really. I just moved everything to LogHandlers instead. I just no longer trust cleanup_handlers, because my tests were consistent with "only one cleanup permitted". -- Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777 0095 [EMAIL PROTECTED] URL:http://www.stonehenge.com/merlyn/ Perl/Unix/security consulting, Technical writing, Comedy, etc. etc. See PerlTraining.Stonehenge.com for onsite and open-enrollment Perl training!
Re: Limiting CPU (was Re: embperl pages and braindead sucking robots)
It's also been very successful at catching a whole slew of user-agents that believe in sucking senselessly. Here's my current block-list: [...] or m{Teleport Pro} # bad robot! [...] Teleport Pro does have options to control how it behaves: 1. "Obey the Robot Exclusion Standard". Default: On 2. "Wait seconds before requesting more than two files at once from a single server". Valid: 0+ Default: 1 second 3. Number of threads. Valid: 1-10 Default: 10 Because of #2, Teleport Pro only has one active thread at a time, and it is idle at least 50% of the time (when downloading image archives). In other words, it's possible for a user can configure Teleport Pro to hammer a server, but it behaves respectfully using the default settings. Their site: http://www.tenmax.com/ ELB -- Eric L. Brine | Chicken: The egg's way of making more eggs. [EMAIL PROTECTED] | Do you always hit the nail on the thumb? ICQ# 4629314 | An optimist thinks thorn bushes have roses.
Re: Limiting CPU (was Re: embperl pages and braindead sucking robots)
"Eric" == Eric L Brine [EMAIL PROTECTED] writes: Eric Because of #2, Teleport Pro only has one active thread at a time, and it Eric is idle at least 50% of the time (when downloading image archives). In Eric other words, it's possible for a user can configure Teleport Pro to Eric hammer a server, but it behaves respectfully using the default settings. The users that hit mine, hit my limits. So "one bad apple does in fact spoil the whole bunch, girl." :) Eric Their site: http://www.tenmax.com/ But fear this, at http://www.tenmax.com/teleport/pro/features.htm: libTen simultaneous retrieval threads/b get data at the fastest speeds possible liServer-side image map exploration -- translates server-side maps into client-side maps for offline browsing liServer Overload Protection -- prevents remote servers from overloading and dropping connection early liConfigurable Agent Identity allows Teleport Pro to impersonate popular browsers; gets data from even the stingiest servers Sounds to me like they are precisely at odds with anyone doing the kind of blocking that I want to do. -- Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777 0095 [EMAIL PROTECTED] URL:http://www.stonehenge.com/merlyn/ Perl/Unix/security consulting, Technical writing, Comedy, etc. etc. See PerlTraining.Stonehenge.com for onsite and open-enrollment Perl training!
Re: troubleshooting seg fault/child exit
I am having a problem similar to yours... Whenever I try an connect to Oracle (using DBD and DBI), I am getting a segmentation fault / child pid exit error. But this only happens under mod_perl, and only on one box in particular. If I move the exact same script to another box, everything works great. Also, if I write a command line perl script that talks to Oracle (e.g., does not use mod_perl), everything is fine. I ran into this problem once before, and I forget what I did to fix it. I don't recall that it was anything in the script itself - perhaps a setting in one of Apache's .conf files? Throughout my testing today, I am led to believe it has something to do with either Apache or mod_perl, and not with any particular script... Any help would be appreciated. Jason Simms __ Get Your Private, Free Email at http://www.hotmail.com
Re: Hanging processes [LONG with debugging output]
In message [EMAIL PROTECTED], Doug MacEac hern writes: On Tue, 14 Dec 1999, Tony Demark wrote: Doug, Tried what you suggest, but with seemingly disappointing results. (below) Th e hangs seem to come _after_ the logging phase - the heap just keep growing an d the process takes up all available CPU, but it doesn't seem to be doing anything! if you could try the libperld.a+PERL_DEBUG=1 suggestion, and a new stacktrace, it might provide some new clues. Now we are getting somewhere, I hope. There seem to be several people that are having a similar problem to this, are any of you seeing similar output? Thanks, - Tony wrist:root[11]# gdb /opt/apache/bin/httpd.debug 20831 GNU gdb 4.18 Copyright 1998 Free Software Foundation, Inc. GDB is free software, covered by the GNU General Public License, and you are welcome to change it and/or distribute copies of it under certain conditions. Type "show copying" to see the conditions. There is absolutely no warranty for GDB. Type "show warranty" for details. This GDB was configured as "sparc-sun-solaris2.7"... /opt/local/apache/bin/20831: No such file or directory. Attaching to program `/opt/apache/bin/httpd.debug', process 20831 Reading symbols from /usr/lib/libsocket.so.1...done. Reading symbols from /usr/lib/libnsl.so.1...done. Reading symbols from /usr/lib/libdl.so.1...done. Reading symbols from /usr/lib/libm.so.1...done. Reading symbols from /usr/lib/libc.so.1...done. Reading symbols from /usr/lib/libcrypt_i.so.1...done. Reading symbols from /usr/lib/libmp.so.2...done. Reading symbols from /usr/lib/libgen.so.1...done. Reading symbols from /usr/platform/SUNW,Ultra-250/lib/libc_psr.so.1...done. Reading symbols from /opt/local/lib/perl5/auto/Data/Dumper/Dumper.so...done. Reading symbols from /opt/local/lib/perl5/auto/B/B.so...done. Reading symbols from /opt/local/lib/perl5/auto/Fcntl/Fcntl.so...done. Reading symbols from /opt/local/lib/perl5/auto/DB_File/DB_File.so...done. Reading symbols from /opt/local/perl/auto/Time/HiRes/HiRes.so...done. Reading symbols from /usr/lib/nss_files.so.1...done. Reading symbols from /opt/local/lib/perl5/auto/IO/IO.so...done. Reading symbols from /opt/local/lib/perl5/auto/Socket/Socket.so...done. Symbols already loaded for /usr/lib/libsocket.so.1 Symbols already loaded for /usr/lib/libnsl.so.1 Symbols already loaded for /usr/lib/libdl.so.1 Symbols already loaded for /usr/lib/libm.so.1 Symbols already loaded for /usr/lib/libc.so.1 Symbols already loaded for /usr/lib/libcrypt_i.so.1 Symbols already loaded for /usr/lib/libmp.so.2 Symbols already loaded for /usr/lib/libgen.so.1 Symbols already loaded for /usr/platform/SUNW,Ultra-250/lib/libc_psr.so.1 Symbols already loaded for /opt/local/lib/perl5/auto/Data/Dumper/Dumper.so Symbols already loaded for /opt/local/lib/perl5/auto/B/B.so Symbols already loaded for /opt/local/lib/perl5/auto/Fcntl/Fcntl.so Symbols already loaded for /opt/local/lib/perl5/auto/DB_File/DB_File.so Symbols already loaded for /opt/local/perl/auto/Time/HiRes/HiRes.so Symbols already loaded for /usr/lib/nss_files.so.1 Symbols already loaded for /opt/local/lib/perl5/auto/IO/IO.so Symbols already loaded for /opt/local/lib/perl5/auto/Socket/Socket.so 0x164f80 in Perl_sv_free (sv=0x93fb14) at sv.c:3052 3052del_SV(sv); (gdb) source /opt/local/src/info_services/mod_perl-1.21/.gdbinit (gdb) curinfo 19:/opt/local/perl/Apache/Constants.pm (gdb) longmess at /opt/local/perl/Apache/Constants.pm line 19 Apache::Constants::AUTOLOAD() called at /opt/local/perl/Apache/Registry .pm line 43 Apache::Registry::handler('Apache=SCALAR(0x77f528)') called at (eval 71) line 0 eval {...} called at (eval 71) line 0 (gdb) And some output from many of the programs in /usr/proc/bin : pcred 20831: e/r/suid=3101 e/r/sgid=101 pfiles 20831: /opt/apache/bin/httpd.debug -f /opt/apache/conf/httpd.conf Current rlimit: 72 file descriptors 0: S_IFCHR mode:0666 dev:32,0 ino:27161 uid:0 gid:3 rdev:13,2 O_RDONLY 1: S_IFCHR mode:0666 dev:32,0 ino:27161 uid:0 gid:3 rdev:13,2 O_WRONLY 2: S_IFREG mode:0664 dev:32,5 ino:105173 uid:0 gid:1 size:3917089 O_WRONLY|O_APPEND 4: S_IFDOOR mode:0444 dev:188,0 ino:26629 uid:0 gid:0 size:0 O_RDONLY|O_LARGEFILE FD_CLOEXEC door to nscd[232] 5: S_IFREG mode:0664 dev:190,1 ino:2036833 uid:1012 gid:101 size:716 O_RDONLY FD_CLOEXEC 6: S_IFREG mode:0644 dev:190,1 ino:1370144 uid:0 gid:1 size:180224 O_RDONLY|O_LARGEFILE FD_CLOEXEC 7: S_IFREG mode:0444 dev:190,1 ino:1019302 uid:0 gid:1 size:2852 O_RDONLY FD_CLOEXEC 8: S_IFREG mode:0644 dev:190,1 ino:1370145 uid:0 gid:1 size:344064 O_RDONLY|O_LARGEFILE FD_CLOEXEC 15: S_IFREG mode:0664 dev:32,5 ino:105173 uid:0 gid:1 size:3917089 O_WRONLY|O_APPEND 16: S_IFSOCK mode:0666 dev:183,0 ino:37659 uid:0 gid:0 size:0 O_RDWR 17: S_IFSOCK mode:0666 dev:183,0 ino:37654 uid:0 gid:0 size:0 O_RDWR 18: S_IFREG mode:0644 dev:32,5
Re: troubleshooting seg fault/child exit
Jason Simms wrote: I am having a problem similar to yours... Whenever I try an connect to Oracle (using DBD and DBI), I am getting a segmentation fault / child pid exit error. But this only happens under mod_perl, and only on one box in particular. If I move the exact same script to another box, everything works great. Also, if I write a command line perl script that talks to Oracle (e.g., does not use mod_perl), everything is fine. What Hardware/software have you observed this on? I have been seeing the _exact same symptoms_ for the better part of a month while attempting to rehost my team's website. My HW/SW: HP-UX 11.0 (with HP's ANSI-C compiler) Oracle 7.3.4 perl 5.005_02 mod_perl 1.21 apache 1.3.9 DBI 1.13 DBD::Oracle 1.03 I've tried gcc 2.95 instead of HP's ANSI-C compiler, with the exact same results. I even tried compiling everything static, again with no success. This is a configuration which (under slightly earlier versions of everything) is currently up on a production machine running HP-UX 10.20, so I've been more than a little frustrated. Throughout my testing today, I am led to believe it has something to do with either Apache or mod_perl, and not with any particular script... Any help would be appreciated. I had traced the problem to an interaction between mod_perl and the Oracle libraries linked into DBD. If the fix is as simple as correcting some settings in the .conf files, that means I won't have to spend the better part of tomorrow reinstalling Oracle. I *had* decided the problem had lain in how it had been installed instead of with the apache end of things until about five minutes ago. Ges
Re: troubleshooting seg fault/child exit
The reason I don't think it has anything to do with DBD is that, as I said, I have been able to use a script which calls DBD::Oracle not running under mod_perl and everything works great. This is on the same box that dies when calling DBD through mod_perl. And again, the same script, when run on a different box with the same verison of DBI and DBD, runs fine. Therefore, if the problem does lie in the communication with DBD as per your hypothesis), it must be a mod_perl communication problem, as "regular" Perl is able to use the same module and talk to Oracle without a hitch... For reference, my hw/sw is: Solaris 2.7 (gcc) Oracle 8.0.6 Perl 5.005_03 mod_perl 1.21 Apache 1.3.9 DBI 1.13 DBD::Oracle 1.03 What I find odd is that all of the sudden people seem to be coming out of the woodwork about this stuff. Whe I searched through mailing list archives, some of them going back years, I found something odd... Many people were talking about this same problem between December of last year and January of this year. No one found a satisfactory solution (at least, I didn't see one). Some blamed it on pre-loading CGI.pm in startup.perl, while others blamed it on having a PerlFreshRestart On in the Apache confguration scripts. This seems to be a pretty big deal, if so many people are complaining under so many configurations, and apparently it has gone on for over a year. Jason Simms __ Get Your Private, Free Email at http://www.hotmail.com
Re: Core dump on graceful restart.
not sure, but this may be relevant: http://perl.apache.org/guide/troubleshooting.html#Evil_things_might_happen_when_us cliff rayman genwax.com "C. R. Oldham" wrote: Greetings, My Apache core dumps on graceful restart. I've noticed that it only happens after mod_perl pages are accessed, and it seems to have something to do with Mysql access as well. A backtrace from gdb indicated the problem was in do_obj_cleanup (maybe a spelling error there--I had the core file but it disappeared from my /tmp directory after an unexpected reboot). This is on Debian Linux (Potato) with a 2.2.13 kernel. I thought the problem was caused because I was running mod_perl as a DSO, but after rebuilding Apache so perl was statically linked the problem did not go away. Mysql access via perl is through DBI 1.13 and the Perl Msql-Mysql-DBD 1.2210. Perl is at 5.005_03, from the Debian package. I also have some PHP scripts that access Mysql, but if I run Apache and never touch mod_perl pages it does not core after accessing the PHP/Mysql stuff. Has anyone seen this? Should I care that Apache segfaults on graceful restart? -- | Charles R. (C. R.) Oldham | NCA Commission on Schools| | [EMAIL PROTECTED] | Arizona St. Univ., PO Box 873011,| | V:480/965-8700 F:480/965-9423 | Tempe, AZ 85287-3011 _ | | "I like it!"--Citizen G'Kar | #include disclaimer.h X_|
Win32+PerlModule works !!!
- Original Message - From: Randy Kobes [EMAIL PROTECTED] To: Rolf Ohnmacht [EMAIL PROTECTED] Cc: [EMAIL PROTECTED] Sent: Tuesday, December 14, 1999 2:32 AM Subject: Re: Win32+modperl+EmbPerl - some questions ... 1.) 'PerlModule' ( eg. srm.conf ) or 'use HTML::Embperl' ( startup.pl) both don't work! But if I leave it - no problem! Is this a special "Win32-behaviour"? Hi, I've seen a similar problem before on Win32 - try compiling mod_perl with the PERL_STARTUP_DONE_CHECK flag set, which you can do by adding #define PERL_STARTUP_DONE_CHECK 1 to the top of src/modules/perl/mod_perl.h. best regards, Randy Kobes Thanks a lot, Randy!!! I recompiled mod_perl with that flag, and now PerlModule/PerlRequire/Use ... work! Apache comes up, and everything seems fine so far! But I don't know how this flag influences whatever. If that works for all Win32-systems and has no bad side-effect, I suggest that it should be inserted into the distributed 'mod_perl.h'-file - thinking I'm not the only one having this problem ... Rolf
Re: apache segfaults on mod_perl dlclose
On Tue, 14 Dec 1999, Doug MacEachern wrote: On Tue, 14 Dec 1999, Saar Picker wrote: So I've been reading. I've actually then gone on to test it with a non-DSO mod_perl and still get segfaults in the cleanup handling phase. I think is 'make test' core dumping or ? let's see your perl -V too No, make test works fine. Perl -V info below. This is on a redhat6.1 box with glibc2.1.1. -Saar Summary of my perl5 (5.0 patchlevel 5 subversion 3) configuration: Platform: osname=linux, osvers=2.2.5-15, archname=i686-linux uname='linux ernie 2.2.5-15 #1 mon apr 19 23:00:46 edt 1999 i686 unknown ' hint=previous, useposix=true, d_sigaction=define usethreads=undef useperlio=undef d_sfio=undef Compiler: cc='cc', optimize='-g', gccversion=egcs-2.91.66 19990314/Linux (egcs-1.1.2 release) cppflags='-Dbool=char -DHAS_BOOL -DDEBUGGING' ccflags ='-Dbool=char -DHAS_BOOL -DDEBUGGING' stdchar='char', d_stdstdio=undef, usevfork=false intsize=4, longsize=4, ptrsize=4, doublesize=8 d_longlong=define, longlongsize=8, d_longdbl=define, longdblsize=12 alignbytes=4, usemymalloc=y, prototype=define Linker and Libraries: ld='cc', ldflags =' -L/usr/local/lib' libpth=/usr/local/lib /lib /usr/lib libs=-lnsl -lndbm -lgdbm -ldb -ldl -lm -lc -lposix -lcrypt libc=/lib/libc.so.6, so=so, useshrplib=true, libperl=libperl.so Dynamic Linking: dlsrc=dl_dlopen.xs, dlext=so, d_dlsymun=undef, ccdlflags='-rdynamic -Wl,-rpa th,/usr/local/debug/lib/perl5/5.00503/i686-linux/CORE' cccdlflags='-fpic', lddlflags='-shared -L/usr/local/lib' Characteristics of this binary (from libperl): Compile-time options: DEBUGGING Built under linux Compiled at Dec 10 1999 11:33:43 @INC: /usr/local/debug/lib/perl5/5.00503/i686-linux /usr/local/debug/lib/perl5/5.00503 /usr/local/debug/lib/perl5/site_perl/5.005/i686-linux /usr/local/debug/lib/perl5/site_perl/5.005 .
Re: apache segfaults on mod_perl dlclose
Hrm. Does perl use 0x as a marker? I thought once an sv was freed it gets a null value or something. In any case, this shouldn't be happening due to any strictly perl modules I'm loading. I am using XML::Parser(::Expat) but I don't see why there should be interaction between the two. Even when I comment the XML module out, segfaults still occur. And there doesn't seem to be any problem when running the scripts from the command-line. Isn't perl supposed to be smart enough not to try and free variables which are already empty? Anyways, any ideas on how I might proceed would be helpful. -Saar On Tue, 14 Dec 1999, Doug MacEachern wrote: I just looked closer at your attachement, so this is not 'make test', lots of stuff going on here, you must have had a working mod_perl at somepoint. as for the actually core dump: assertion botched (chunk's head overwrite?): ovp-ovu.ovu_rmagic == 0x normally this is caused by duplicate free() or similar bug in an extension or the library an extension is linked with. if you don't have purify, insure++ or similar, you'll need to start backing out some of your many modules to identify the culprit. one of the Perl -D options for malloc activity might help too.
Re: troubleshooting seg fault/child exit
[Tue Dec 14 15:44:22 1999] [notice] child pid 13243 exit signal Segmentation fault (11) -- ... If someone could please point me in the right direction or FAQ, I, and my sanity, would be most happy. there are quite a few tips on debugging core dumps posted between last night and today, along with the SUPPORT doc. trying building a libperld.a, build mod_perl with PERL_DEBUG=1, and post a stacktrace.
Re: apache segfaults on mod_perl dlclose
On Tue, 14 Dec 1999, Saar Picker wrote: Hrm. Does perl use 0x as a marker? yes, see malloc.c I thought once an sv was freed it gets a null value or something. sure, but with Perls before 5.005_60-ish, Perl's malloc overrides system malloc/free *everywhere*, not just for Perl data, but also for other C code using malloc/free in the same runtime In any case, this shouldn't be happening due to any strictly perl modules I'm loading. true, but pure Perl can't be ruled out as triggering such a bug. it might help if you can run your server under gdb and post a stacktrace after this core dump.
Re: troubleshooting seg fault/child exit
What I find odd is that all of the sudden people seem to be coming out of the woodwork about this stuff. Whe I searched through mailing list archives, some of them going back years, I found something odd... Many people were talking about this same problem between December of last year and January of this year. No one found a satisfactory solution (at least, I didn't see one). Some blamed it on pre-loading CGI.pm in startup.perl, while others blamed it on having a PerlFreshRestart On in the Apache confguration scripts. This seems to be a pretty big deal, if so many people are complaining under so many configurations, and apparently it has gone on for over a year. core dumps can happen for many different reasons. why there are so many these past couple of days, I don't know, but doubt they are all triggered by the same thing. if you could follow suit and post a stacktrace from gdb, that would help.
again - more then one PerlTransHandler
Hi everybody, Sorry for the poor wording of my question. Once again: I am trying to install and use more then one translation handler. I tried two approaches to specifying handlers in the Apache config file (both recommended in the "Eagle" book.) First, have both handlers on the same line, e.g. in httpd.conf PerlTransHandler SimpleTranslation::handler FancyTranslation::handler In this case Apache spits out error: Syntax error on line 29 of /etc/httpd/conf/perl.conf PerlTransHandler takes one argument, the Perl Translation handler routine name. and exits. Secondly I tried to put two lines in config: PerlTransHandler SimpleTranslation::handler PerlTransHandler FancyTranslation::handler In this case, only second handler gets invoked. Am I missing something?!!! Evg Hi! I tried to set more then one PerlTransHandler but if I specify both on the same line, Apache says "syntax error", otherwise it see only the last one. Apache 1.3.6 on Linux with mod_perl 1.19 According to "Apache Modules" book it should be possible... Any advice will be highly appreciated! Cheers, Evg Get free email and a permanent address at http://www.netaddress.com/?N=1
Re: Stumped: Location ignored
I had this problem. It was Wing::Balance hard coding URI in Balance.pm. I changed if ($uri =~ m{^/login/([a-zA-Z0-9]+)/?$}) { $username = $1; } elsif ($uri ne "/index.html") { # Note that "GET /" turns into /index.html by the time it reaches us return DECLINED; } to if ($uri =~ m{^$Wing::Shared::LOGIN_URI/([a-zA-Z0-9]+)/?$}) { $username = $1; } elsif ($uri ne "$Wing::Shared::LOGIN_URI/") { # Note that "GET /" turns into /index.html by the time it reaches us return DECLINED; } And added $LOGIN_URI="/wing-login"; to Shared.pm. When the handler returns DECLINED Apache seems to retry the URL without the module. This made it seem as if the module was not being called at all. "Miguel A.L. Paraz" wrote: Hi, I hit this months ago but never really solved it... I'm working with the WING e-mail package by Malcolm Beattie. In my httpd.conf I have tried: PerlModule Wing_miranda_herrera_iphil_net::Balance Location / SetHandler perl-script PerlHandler Wing_miranda_herrera_iphil_net::Balance /Location Perl and: $Location{"/"} = { SetHandler = "perl-script"; PerlHandler = "Wing_miranda_herrera_iphil_net::Balance"; }; /Perl Neither of these work. When I access /, the module is not invoked, and instead, Apache brings up the DocumentRoot. How can I debug why Apache would choose to ignore the Location? Just to be sure I also tried it with Directory but without luck. Apache 1.3.9, mod_perl 1.2.1. (For those working with Wing already, I changed the names of the modules since I am doing "virtual hosting" with it.) Thanks! ---m -- Miguel "Migs" A.L. Paraz IPhil Communications Network, Inc. http://www.iphil.net Business Development/Training Group 5/F 116 Herrera St., Legaspi Village, Makati City, Philippines +63-2-750-2288 -- *Matthew Taylor:Computer section email: [EMAIL PROTECTED] * * The Royal Botanic Gardens, Kew, Tel : +44 (0)181 332 5714 * * Richmond, Surrey, TW9 3AB, UK Fax : +44 (0)181 332 5736 *