Perl section woe
Hi All, P. 417 of Eagle book has this: Directive is repeated mutiple times If a directive is repeated multiple times with different arguments each time, you can represent it as an array of arrays. This example using the AddIcon directive shows how: @AddIcon = ( [ '/icons/compressed.gif' = qw(.Z .z .gz .tgz .zip) ], [ '/icons/layout.gif' = qw(.html .shtml .htm .pdf) ], ) I am testing the limit directives in my Perl section: %LocationMatch = ( '^/(myscript|cgi-bin)/' = { 'AuthName' = 'Elephant', 'AuthType' = 'Animals', 'AuthDBMUserFile' = '/mydir/userdbm', 'AuthDBMGroupFile' = '/mydir/groupdbm', 'PerlAuthenHandler' = 'Animals::ElephantCookieHandler-authen', 'PerlSetVar'= ( [ 'VirtualServerName' = qw(www.myhouse.org) ], [ 'AuthCookieDebug' = 7 ], ), 'SetHandler'= 'perl-script', 'Options' = '+ExecCGI -Indexes', 'PerlSetupEnv' = 'On', 'require' = 'valid-user', 'AllowOverride' = 'None', }, ) Apache complains about this: handle_command (PerlSetVar "VirtualServerName" "www.myhouse.org"): perl_cmd_var: 'VirtualServerName' = 'learnonline.usyd.edu.au' OK ARRAY(0x2fc014) Options (Invalid command 'ARRAY(0x2fc014)', perhaps mis-spelled or defined by a module not included in the server configuration) Limit=no [Sat Feb 17 20:51:28 2001] [error] (22)Invalid argument: Perl: Invalid command 'ARRAY(0x2fc014)', perhaps mis-spelled or defined by a module not included in the server configuration valid-user AllowOverride (Invalid command 'valid-user', perhaps mis-spelled or defined by a module not included in the server configuration) Limit=no [Sat Feb 17 20:51:28 2001] [error] (22)Invalid argument: Perl: Invalid command 'valid-user', perhaps mis-spelled or defined by a module not included in the server configuration On require (Invalid command 'On', perhaps mis-spelled or defined by a module not included in the server configuration) Limit=no [Sat Feb 17 20:51:28 2001] [error] (22)Invalid argument: Perl: Invalid command 'On', perhaps mis-spelled or defined by a module not included in the server configuration Taking out "[ 'AuthCookieDebug' = 7 ]," makes the error go away, but it's not a solution. What's worse: how do you define multiple Limit sections like the following? Limit GET POST require group group1 group2 /Limit Limit PUT require group group1 /Limit I'm using A1.3.17 mp 1.2.5. I am at a loss. 8={ Jie
Re: mod_perl segfault
Doug MacEachern wrote: snipped ... it would probably be worth your while to try 5.6.1-trial1. Where does one download that? I have those in my logs, one more bug to kill. Someday, I'll go 24 hours without adding to my error logs, but that day won't happen too soon ... --Christopher Everett
Re: Perl section woe
On Sat, Feb 17, 2001 at 08:56:40PM +1100, Jie Gao wrote: Hi All, P. 417 of Eagle book has this: Directive is repeated mutiple times If a directive is repeated multiple times with different arguments each time, you can represent it as an array of arrays. This example using the AddIcon directive shows how: @AddIcon = ( [ '/icons/compressed.gif' = qw(.Z .z .gz .tgz .zip) ], [ '/icons/layout.gif' = qw(.html .shtml .htm .pdf) ], ) I am testing the limit directives in my Perl section: %LocationMatch = ( '^/(myscript|cgi-bin)/' = { 'AuthName' = 'Elephant', 'AuthType' = 'Animals', 'AuthDBMUserFile' = '/mydir/userdbm', 'AuthDBMGroupFile' = '/mydir/groupdbm', 'PerlAuthenHandler' = 'Animals::ElephantCookieHandler-authen', 'PerlSetVar'= ( [ 'VirtualServerName' = qw(www.myhouse.org) ], [ 'AuthCookieDebug' = 7 ], ), syntactically, you need an array reference here, so try using: 'PerlSetVar'= [ [ 'VirtualServerName' = qw(www.myhouse.org) ], [ 'AuthCookieDebug' = 7 ], ], 'SetHandler'= 'perl-script', 'Options' = '+ExecCGI -Indexes', 'PerlSetupEnv' = 'On', 'require' = 'valid-user', 'AllowOverride' = 'None', }, ) Erdmut -- Erdmut Pfeifer science+computing gmbh -- Bugs come in through open windows. Keep Windows shut! --
Re: mod_perl segfault
On Sat, 17 Feb 2001, Christopher L. Everett wrote: Doug MacEachern wrote: snipped ... it would probably be worth your while to try 5.6.1-trial1. Where does one download that? I have those in my logs, one more bug to kill. Someday, I'll go 24 hours without adding to my error logs, but that day won't happen too soon ... TRIAL2 is the latest, I use it without any problems so far: http://public.activestate.com/gsar/perl-5.6.1-TRIAL2.tar.gz _ 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://logilune.com/ http://singlesheaven.com http://perl.apache.org http://perlmonth.com/
Re: Perl section woe
On Sat, 17 Feb 2001, Erdmut Pfeifer wrote: On Sat, Feb 17, 2001 at 08:56:40PM +1100, Jie Gao wrote: %LocationMatch = ( '^/(myscript|cgi-bin)/' = { 'AuthName' = 'Elephant', 'AuthType' = 'Animals', 'AuthDBMUserFile' = '/mydir/userdbm', 'AuthDBMGroupFile' = '/mydir/groupdbm', 'PerlAuthenHandler' = 'Animals::ElephantCookieHandler-authen', 'PerlSetVar'= ( [ 'VirtualServerName' = qw(www.myhouse.org) ], [ 'AuthCookieDebug' = 7 ], ), syntactically, you need an array reference here, so try using: 'PerlSetVar'= [ [ 'VirtualServerName' = qw(www.myhouse.org) ], [ 'AuthCookieDebug' = 7 ], ], You are right. I totally missed that. Thanks a lot! But I still don't know what to do with the following: Limit GET POST require group group1 group2 /Limit Limit PUT require group group1 /Limit Anybody has any idea? Jie
Error installing URI module
I am trying to install several modules using CPAN. I am having trouble with URI... I get an error on heuristic test 6 when I try to install URI or the Bundle::LWP (which installs URI). How do I correct this error? I'm new to mod_perl and would like to figure out what test is failing and why. But heuristic test number 6 means nothing to me, and I couldn't find any answers in the mailing list archives or the mailing list FAQ. Any help is appreciated as I am at a loss as to how to go about fixing this. I am using OpenBSD 2.8 with Apache 1.3.12, perl 5.6.0, mod_perl 1.25. The URI file says version 1.10. Here is a typescript showing my versions along with the build error: Script started on Sat Feb 17 18:04:00 2001 bash-2.04$ perl -v This is perl, v5.6.0 built for i386-openbsd (with 1 registered patch, see perl -V for more detail) Copyright 1987-2000, Larry Wall Perl may be copied only under the terms of either the Artistic License or the GNU General Public License, which may be found in the Perl 5.0 source kit. Complete documentation for Perl, including FAQ lists, should be found on this system using `man perl' or `perldoc perl'. If you have access to the Internet, point your browser at http://www.perl.com/, the Perl Home Page. bash-2.04$ perl -MCGI -e 'print $CGI::VERSION, "\n";' 2.56 bash-2.04$ /usr/sbin/httpd -v Server version: Apache/1.3.12 (Unix) Server built: Oct 31 2000 17:41:06 bash-2.04$ uname -a OpenBSD bsd1 2.8 GENERIC#399 i386 bsd1# perl -MCPAN -e shell cpan shell -- CPAN exploration and modules installation (v1.59) ReadLine support enabled [4mcpan[m [1mi[m[1mn[m[1ms[m[1mt[m[1ma[m[1ml[m[1ml[m[1m [m[1mU[m[1mR[m[1mI[m CPAN: Storable loaded ok Going to read /root/.cpan/Metadata Running install for module URI Running make for G/GA/GAAS/URI-1.10.tar.gz Scanning cache /root/.cpan/build for sizes CPAN: MD5 loaded ok CPAN: Compress::Zlib loaded ok Checksum for /root/.cpan/sources/authors/id/G/GA/GAAS/URI-1.10.tar.gz ok URI-1.10 URI-1.10/t URI-1.10/t/ldap.t URI-1.10/t/rsync.t URI-1.10/t/old-relbase.t URI-1.10/t/http.t URI-1.10/t/pop.t URI-1.10/t/heuristic.t URI-1.10/t/roytest2.html URI-1.10/t/old-base.t URI-1.10/t/generic.t URI-1.10/t/news.t URI-1.10/t/roytest4.html URI-1.10/t/query.t URI-1.10/t/roy-test.t URI-1.10/t/old-absconf.t URI-1.10/t/file.t URI-1.10/t/roytest1.html URI-1.10/t/escape.t URI-1.10/t/abs.t URI-1.10/t/roytest3.html URI-1.10/t/mix.t URI-1.10/t/mailto.t URI-1.10/t/roytest5.html URI-1.10/t/data.t URI-1.10/URI URI-1.10/URI/pop.pm URI-1.10/URI/mailto.pm URI-1.10/URI/_generic.pm URI-1.10/URI/file.pm URI-1.10/URI/_login.pm URI-1.10/URI/Heuristic.pm URI-1.10/URI/http.pm URI-1.10/URI/file URI-1.10/URI/file/Base.pm URI-1.10/URI/file/OS2.pm URI-1.10/URI/file/Mac.pm URI-1.10/URI/file/QNX.pm URI-1.10/URI/file/Win32.pm URI-1.10/URI/file/FAT.pm URI-1.10/URI/file/Unix.pm URI-1.10/URI/snews.pm URI-1.10/URI/nntp.pm URI-1.10/URI/rsync.pm URI-1.10/URI/news.pm URI-1.10/URI/URL.pm URI-1.10/URI/_foreign.pm URI-1.10/URI/ftp.pm URI-1.10/URI/Escape.pm URI-1.10/URI/data.pm URI-1.10/URI/_segment.pm URI-1.10/URI/ldap.pm URI-1.10/URI/telnet.pm URI-1.10/URI/_query.pm URI-1.10/URI/_server.pm URI-1.10/URI/WithBase.pm URI-1.10/URI/gopher.pm URI-1.10/URI/rlogin.pm URI-1.10/URI/_userpass.pm URI-1.10/URI/https.pm URI-1.10/URI.pm URI-1.10/MANIFEST URI-1.10/Changes URI-1.10/rfc2396.txt URI-1.10/README URI-1.10/Makefile.PL URI-1.10/uri-test Removing previously used /root/.cpan/build/URI-1.10 CPAN.pm: Going to build G/GA/GAAS/URI-1.10.tar.gz Checking if your kit is complete... Looks good Writing Makefile for URI mkdir blib mkdir blib/lib cp URI/Escape.pm blib/lib/URI/Escape.pm cp URI.pm blib/lib/URI.pm cp URI/pop.pm blib/lib/URI/pop.pm cp URI/mailto.pm blib/lib/URI/mailto.pm cp URI/_generic.pm blib/lib/URI/_generic.pm cp URI/file/QNX.pm blib/lib/URI/file/QNX.pm cp URI/data.pm blib/lib/URI/data.pm cp URI/_segment.pm blib/lib/URI/_segment.pm cp URI/file.pm blib/lib/URI/file.pm cp URI/file/Win32.pm blib/lib/URI/file/Win32.pm cp URI/ldap.pm blib/lib/URI/ldap.pm cp URI/telnet.pm blib/lib/URI/telnet.pm cp URI/_query.pm blib/lib/URI/_query.pm cp URI/_server.pm blib/lib/URI/_server.pm cp URI/_login.pm blib/lib/URI/_login.pm cp URI/Heuristic.pm blib/lib/URI/Heuristic.pm cp URI/http.pm blib/lib/URI/http.pm cp URI/file/FAT.pm blib/lib/URI/file/FAT.pm cp URI/file/Base.pm blib/lib/URI/file/Base.pm cp URI/WithBase.pm blib/lib/URI/WithBase.pm cp URI/snews.pm blib/lib/URI/snews.pm cp URI/nntp.pm blib/lib/URI/nntp.pm cp URI/gopher.pm blib/lib/URI/gopher.pm cp URI/file/Mac.pm blib/lib/URI/file/Mac.pm cp URI/file/OS2.pm blib/lib/URI/file/OS2.pm cp URI/rlogin.pm blib/lib/URI/rlogin.pm cp URI/rsync.pm blib/lib/URI/rsync.pm cp URI/news.pm blib/lib/URI/news.pm cp URI/https.pm blib/lib/URI/https.pm cp URI/_userpass.pm blib/lib/URI/_userpass.pm cp URI/URL.pm blib/lib/URI/URL.pm cp URI/file/Unix.pm blib/lib/URI/file/Unix.pm cp URI/_foreign.pm blib/lib/URI/_foreign.pm cp URI/ftp.pm blib/lib/URI/ftp.pm mkdir
Re: Error installing URI module
I am trying to install several modules using CPAN. I am having trouble with URI... well, this is wrong forum to ask this question. Under mod_perl we usually use Apache::URI and not URI, since the former is implemented in C and therefore it's faster. However, since this question is quite generic and may help other users of mod_perl I'll try to give you some hints. I get an error on heuristic test 6 when I try to install URI or the Bundle::LWP (which installs URI). How do I correct this error? You get off CPAN shell, go into the build directory (/root/.cpan/build on my machine). Then you cd into URI source directory and look at the test file that has failed: more t/heuristic.t: [snip] if (gethostbyname("www.netscape.com")) { # DNS probably work, lets run test 6..8 $URI::Heuristic::MY_COUNTRY = "no"; print "not " unless uf_urlstr("perl/camel.gif") eq "http://www.perl.com/camel.gif"; print "ok 6\n"; [snip] that's where it fails. It works for me. You may want to run the test in the verbose mode: % make test TEST_VERBOSE=1 [snip] t/heuristic.1..14 uf_uristr: resolving http://www.sn.no/ uf_uristr: == http://www.sn.no/ uf_uristr: resolving /etc/passwd uf_uristr: == file:/etc/passwd uf_uristr: resolving ./foo.txt uf_uristr: == file:./foo.txt uf_uristr: resolving ftp.aas.no/lwp.tar.gz uf_uristr: == ftp://ftp.aas.no/lwp.tar.gz uf_uristr: resolving C:\CONFIG.SYS uf_uristr: == file:C:\CONFIG.SYS uf_uristr: resolving perl/camel.gif [snip] the last row works for me, and that's where it fails for you. I'm new to mod_perl and would like to figure out what test is failing and why. But heuristic test number 6 means nothing to me, and I couldn't find any answers in the mailing list archives or the mailing list FAQ. Any help is appreciated as I am at a loss as to how to go about fixing this. perldoc ExtUtils::MakeMaker and finally this might be a minor misbehavior and you might want to install the module anyway, hoping that it will not use this feature in this test. To do that from shell you just run 'make install' and under CPAN shell, you run 'force install URI' which will ignore the result of 'make test'. Hope that this helps... _ 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://logilune.com/ http://singlesheaven.com http://perl.apache.org http://perlmonth.com/
RE: General Question
Hi, Is this the thing you want? (otherwise please describe your problem more elaborately.) print "Content-Type: text/html\n\n"; print "html message here"; print "IMG SRC='images.gif'\n"; print "html message here"; Bye Muthu S Ganesh -Original Message-From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]On Behalf Of Kiran Kumar.MSent: 16 February 2001 13:36To: modperlSubject: General Question hi, I would like to know what header to print to view this on the browser, if text/html is entered the image is not displayed and if image/gif is entered the image does not appear , thanks in advance Kiran ps: if this is not the right place to ask this question please tell me where i can find help open(F1,"images.gif") ||errorhandler; while(F1) { $imgcont .=$_;} close(F1); print" html message here"; print $imgcont; print" html message here";
httpd takes 86 MB memory
Recently, my machine got an upgrade from 128 MB RAM to 386 MB RAM. The modperl enabled httpd process used to take up less than 10 MB each. But now, after the memory upgrade it is suddenly taking up 86 MB. Here is an excerpt from "top" (sorted by memory usage): PID USER PRI NI SIZE RSS SHARE STAT LIB %CPU %MEM TIME COMMAND 3746 tuxedo15 0 139M 128M 964 R 0 95.6 34.1 45:22 wusage 7257 nobody 0 0 103M 86M 84944 S 0 0.0 22.9 0:00 httpd 7253 nobody 0 0 102M 86M 85028 S 0 0.0 22.9 0:00 httpd 7263 nobody 0 0 102M 86M 85032 S 0 0.3 22.9 0:00 httpd Does anyone have suggestions on how to find out the problem/fix it? The httpd.conf has not been modified in a month, and the memory upgrade was done just three days ago. So, AFAIK the only thing on the machine that has changed is the amount of RAM. -Philip Mak ([EMAIL PROTECTED])