Re: conditional get
[snip] Also, I hate to whine, but despite the docs saying so, whatever value my script returns is completely ignored; I have to use $R-status (). I'm using Apache::Registry, in case that makes any difference. Apache::Registry ignores the actual return code from your script, using instead the $r-status hack that Kyle illustrated before. so, an A::R script such as: use Apache::Constants qw(SERVER_ERROR); shift-send_http_header('text/plain'); print ok; return SERVER_ERROR; will print 'ok' :) if some online documentation says otherwise, please let us know exactly where and we'll make sure it's accurate. remember that Apache::Registry is meant to be a mod_cgi emulation layer - once you start using the mod_perl API you might as well just write a real PerlHandler. HTH --Geoff
Re: conditional get
Geoffrey Young wrote: [snip] Also, I hate to whine, but despite the docs saying so, whatever value my script returns is completely ignored; I have to use $R-status (). I'm using Apache::Registry, in case that makes any difference. if some online documentation says otherwise, please let us know exactly where and we'll make sure it's accurate. The doc on issuing correct http headers has returns with values all over it: http://perl.apache.org/docs/general/correct_headers/correct_headers.html Regards Cristóvão
Re: conditional get
The doc on issuing correct http headers has returns with values all over it: http://perl.apache.org/docs/general/correct_headers/correct_headers.html the examples in that document assume that you're using mod_perl handlers, not Apache::Registry, though I admit that's not obvious unless you already know it. --Geoff
RE: Problems compiling mod_perl1.27 under IRIX64...
DeAngelo: I have not heard any reply to this email. We currently build mod_perl 1.27 for SGI IRIX64 using standard techniques and do *not* experience any build problem. If you send me the output of the par command I may be able to help you pinpoint your problem. Thanks Paul E Wilt Senior Principal Software Engineer Proquest Information and Learning - http://www.proquest.com mailto:paul.wilt;il.proquest.com 300 North Zeeb Rd Phone: (734) 302-6777 Ann Arbor, MI 48106Fax: (734) 302-6779 - -Original Message- From: Wilt, Paul [mailto:pwilt;xanedu.com] Sent: Friday, October 25, 2002 9:53 AM To: 'DeAngelo Lampkin'; 'Ged Haywood' Cc: 'mod_perl Mailing List' Subject: RE: Problems compiling mod_perl1.27 under IRIX64... DeAngelo: Have you run the par command I sent you? par -s -SS -o debug.out -a 128 make This should help figure out which file is missing. Thanks Paul E Wilt Senior Principal Software Engineer Proquest Information and Learning - http://www.proquest.com mailto:paul.wilt;il.proquest.com 300 North Zeeb Rd Phone: (734) 302-6777 Ann Arbor, MI 48106Fax: (734) 302-6779 - -Original Message- From: DeAngelo Lampkin [mailto:dlampkin;xencor.com] Sent: Thursday, October 24, 2002 4:49 PM To: Ged Haywood Cc: mod_perl Mailing List Subject: RE: Problems compiling mod_perl1.27 under IRIX64... Hi Ged, All the sources are in places I own and they were all built under my account originally. I built as root in a last ditch effort to resolve the problem, but the same error as I orginally posted occured yet again (i.e., ld32: FATAL 9: I/O error (1110): No such file or directory ). Yeah, I was grasping at straws. ;) And yeah, I 've read the docs. As I said before, this problem has occured before because I've seen the nearly exact same description in an archive of this mailing list. You can check out the original here: http://www.mail-archive.com/modperl;apache.org/msg28889.html . However there was never a resolution posted( or at least none that I could find.) Thanks, DeAngelo -Original Message- From: Ged Haywood [mailto:ged;www2.jubileegroup.co.uk] Sent: Thursday, October 24, 2002 12:24 PM To: DeAngelo Lampkin Cc: mod_perl Mailing List Subject: RE: Problems compiling mod_perl1.27 under IRIX64... Hi there, On Thu, 24 Oct 2002, DeAngelo Lampkin wrote: [snip] the make step ran fine [snip] However, the make install step crapped out and I got the following error: Warning: You do not have permissions to install into /usr/local/lib/perl5/site_perl/5.6.1/IP27-irix at /usr/local/lib/perl5/5. 6.1/IP27-irix/ExtUtils/Install.pm line 85. mkdir /usr/local/lib/perl5/site_perl/5.6.1/IP27-irix/auto/Apache: Permission denied at /usr/local/lib/perl5/5.6.1/IP27-irix/Ex tUtils/Install.pm line 139 Indeed, I don't have permissions to write there, which lead me to believe that this whole thing was a simple permissions error. Not unless you're building somewhere strange. Where did you put the sources? I usually use something like this: /home/ged/src/apache_1.3.27 and /home/ged/src/mod_perl-1.27 then su root only at the final make install step. However, when I had the system admin run perl Makefile.PL as root, Don't do that. You should build as an ordinary user. Have you read through the installation section of the mod_perl Guide? See the mod_perl home page for a link to the Guide. 73, Ged.
Re: conditional get
* Cristvo Dalla Costa [EMAIL PROTECTED] [2002-10-25 20:29]: Hi, I'm trying to get my script to work with conditional get, however, when the browser should use the local copy it doesn't display anything, just telling me that the image's broken. The Eagle book implies that you need to use Apache::File to get meets_conditions; are you doing so? (darren) -- There are worse things in life than death. Have you ever spent an evening with an insurance salesman? -- Woody Allen
Problems with mod_perl. Location of C code.
I have some troubles with mod_perl (loosing indata), but the problems are so obscure that it seems to me as I am the only (or one of very very few) who are encountering these problems. Anyway, what I need to continue finding this problem and eliminating it is: Where is the C code to mod_perl is the $r (request object) built? Where is the $r (request object) passed to the handler function? Answers to these questions would greatly speed up my debugging. Thanks alot. Med vänlig hälsning. Anders Lidén Futurize AB 031 - 709 09 70Ingela Gatenhielmsgata 3 http://www.futurize.se 421 30 Västra Frölunda But some things lost and some things gained, in living every day // Clannad
Re: conditional get
At 15:47 28.10.2002, =?UTF-8?B?Q3Jpc3TDs3bDo28gRGFsbGEgQ29zdGE=?= wrote: Geoffrey Young wrote: [snip] Also, I hate to whine, but despite the docs saying so, whatever value my script returns is completely ignored; I have to use $R-status (). I'm using Apache::Registry, in case that makes any difference. if some online documentation says otherwise, please let us know exactly where and we'll make sure it's accurate. The doc on issuing correct http headers has returns with values all over it: http://perl.apache.org/docs/general/correct_headers/correct_headers.html This is because it is illustrating handlers, even though it doesn't always display the whole handler subroutine. -- Per Einar Ellefsen [EMAIL PROTECTED]
Re: Get file list of the dir.
RK But this doesn't seem to be the problem ... What's printed in the RK browser? Is there anything in the error logs? Is the name of the RK directory to be read input from the user (if so, are you running RK under taint mode?), and are the permissions appropriate? Here is my module's code... use strict; use Apache::Constants qw(:common); use Apache::File (); use IO::Dir; sub handler { my $r = shift; return DECLINED unless $r-content_type() eq '' or $r-content_type() eq 'text/html'; my $file = $r-filename; my $tmp=substr($file,rindex($file,'/')+1,length($file)-$_-1,''); if (-e $r-finfo) { return DECLINED; } $r-content_type('text/plain'); $r-send_http_header; my htmls; my $refdir; opendir($refdir, $file); unless ($refdir) { $r-log_error(Err in opendir($refdir,$file) : $!); return SERVER_ERROR; } my $filedir; while ($filedir = readdir($refdir)) { next if (not $filedir =~/.html/); push(htmls, $filedir) if (-f $file$filedir); } closedir($refdir); foreach my $html(htmls) { $html=$file.$html; my $fh; unless ($fh = Apache::File-new($file)) { $r-log_error(Couldn't open $file for reading: $!); return SERVER_ERROR; } while ($fh) { $r-print($_); } $fh-close(); } return OK; } 1; __END__ I've attached file with browser output. ¶ . !x .. ¬¶ index.html Ò· images Òß· foto Òñ· ´ style.css Ò
Re: Problems with mod_perl. Location of C code.
Anders Lidén wrote: I have some troubles with mod_perl (loosing indata), but the problems are so obscure that it seems to me as I am the only (or one of very very few) who are encountering these problems. Anyway, what I need to continue finding this problem and eliminating it is: Where is the C code to mod_perl is the $r (request object) built? mod_perl hooks into Apache in mod_perl.c. the request object is built in Apache.xs: void request(self, r=NULL) SV *self Apache r PPCODE: self = self; if(items 1) perl_request_rec(r); XPUSHs(perl_bless_request_rec(perl_request_rec(NULL))); Where is the $r (request object) passed to the handler function? perl_call_handler() in mod_perl.c is what is called for each phase in the request cycle. after perl_call_handler() does lots of stuff to isolate the actual Perl handler, the call to the Perl subroutine is here: #ifdef PERL_METHOD_HANDLERS if(is_method) count = perl_call_method(method, G_EVAL | G_SCALAR); else #endif count = perl_call_sv(sv, G_EVAL | G_SCALAR); Answers to these questions would greatly speed up my debugging. Thanks alot. HTH --Geoff
Irix64 mod_perl compile problems - SOLVED.
Apparently some of the compile options need to be delimited by commas for compilers on SGI IRIX64 system. For a quick refresher on what the error was, the following error shows up during the Makefile.PL run: ld32: FATAL 9: I/O error (1110): No such file or directory The way to get rid of that helpful error message is to scroll down to the line in the Makefile.PL script that says the following (line 525 in this version of the Makefile.PL script): if($PERL_EXTRA_CFLAGS) { $PERL_EXTRA_CFLAGS = join( , split(,, $PERL_EXTRA_CFLAGS)); $PERL_EXTRA_CFLAGS =~ s/\s+/ /g; } And then comment out the line with the join so that it looks like this: if($PERL_EXTRA_CFLAGS) { #$PERL_EXTRA_CFLAGS = join( , split(,, $PERL_EXTRA_CFLAGS)); $PERL_EXTRA_CFLAGS =~ s/\s+/ /g; } And now Makefile.PL runs without giving you that error message and things compile as they are meant to! Thanks to my system admin for noticing that commas that were present in template files were not showing up in output and quickly drawing a connection. Also, I appreciate the help from Ged and Paul for eliminating other possible sources for error. Until next time, DeAngelo
Re: Apache::Clean, Apache::Compress, mod_gzip/deflate, cross sitescripting and more.
Richard Clarke wrote: Before I embark on a day exploring the pros and cons of today's cleaning/compression tools, I wondered if any of you could give me some feedback about your own experiences within the context of medium/large scale web sites/applications (E-Toys etc). We didn't use compression at eToys. There were two main reasons for this. First, it was still a fairly experimental idea at the time, and I had seen browser compatibility problems when hitting some sites that used it. (I believe these have been fixed since then.) Second, more than half of our content was served from the mod_proxy cache, and I'm not aware of a compression tool that works with that. Is there any advantage to using modules like HTML::Tree or HTML::Parser to remove information (i.e. removing autoexecuting javascript tags and any other CSS issues) from user submitted information. No, the best approach is to not attempt to filter user input at all but escape everything when you display it. Then if a user enters HTML characters they will just show up literally in the output. The only time you can't do it this way is if there are certain HTML characters you want to accept. - Perrin
Re: Get file list of the dir.
Thank you for your help! I'm terribly sorry for getting your time, It's my fault. There was an error in my code. I'm inattentive foolish man. But I've known new methods of reading directory listening. Best regards. ___ Sorry for my English.
RE: Irix64 mod_perl compile problems - SOLVED.
DeAngelo: Your sysadmin sure has a good eye! The link that you pointed to earlier: http://www.mail-archive.com/modperl;apache.org/msg28889.html has the following lines in it: Error Output for sanity check cd ..; cc -n32 -DIRIX -DMOD_PERL -DUSE_PERL_SSI -D_BSD_TYPES === *** -D_BSD_TIME -woff 1009,1110,1174,1184,1552 -OPT:Olimit=0 -I/usr/local/include -DLANGUAGE_C -DUSE_HSREGEX -DNO_DL_NEEDED -D_BSD_TYPES === *** -D_BSD_TIME -woff 1009 1110 1174 1184 1552 -OPT:Olimit=0 -I/usr/local/include -DLANGUAGE_C `./apaci` -I. -I/users/webuser/perl/lib/5.6.1/IP25-irix/CORE-o helpers/dummy helpers/dummy.c -L/usr/local/lib32 -L/usr/local/lib -Wl,-woff,84 /users/webuser/perl/lib/5.6.1/IP25-irix/auto/DynaLoader/DynaLoader.a -L/users/webuser/perl/lib/5.6.1/IP25-irix/CORE -lperl -lm -lc ld32: FATAL 9: I/O error (1110): No such file or directory cc INTERNAL ERROR: /usr/lib32/cmplrs/ld32 returned non-zero status 32 *** Error code 1 (bu21) = End of Error Report = Note the two lines I indicated with the === *** above: The -woff argument *DOES* need the commas to pass this cc command-line parameter to the linker backend. Later this week I will examine our builds to see why this does *not* seem to cause the same problem on our end. Thanks Paul E Wilt Senior Principal Software Engineer Proquest Information and Learning - http://www.proquest.com mailto:paul.wilt;il.proquest.com 300 North Zeeb Rd Phone: (734) 302-6777 Ann Arbor, MI 48106Fax: (734) 302-6779 - -Original Message- From: DeAngelo Lampkin [mailto:dlampkin;xencor.com] Sent: Monday, October 28, 2002 12:23 PM To: [EMAIL PROTECTED] Subject: Irix64 mod_perl compile problems - SOLVED. Apparently some of the compile options need to be delimited by commas for compilers on SGI IRIX64 system. For a quick refresher on what the error was, the following error shows up during the Makefile.PL run: ld32: FATAL 9: I/O error (1110): No such file or directory The way to get rid of that helpful error message is to scroll down to the line in the Makefile.PL script that says the following (line 525 in this version of the Makefile.PL script): if($PERL_EXTRA_CFLAGS) { $PERL_EXTRA_CFLAGS = join( , split(,, $PERL_EXTRA_CFLAGS)); $PERL_EXTRA_CFLAGS =~ s/\s+/ /g; } And then comment out the line with the join so that it looks like this: if($PERL_EXTRA_CFLAGS) { #$PERL_EXTRA_CFLAGS = join( , split(,, $PERL_EXTRA_CFLAGS)); $PERL_EXTRA_CFLAGS =~ s/\s+/ /g; } And now Makefile.PL runs without giving you that error message and things compile as they are meant to! Thanks to my system admin for noticing that commas that were present in template files were not showing up in output and quickly drawing a connection. Also, I appreciate the help from Ged and Paul for eliminating other possible sources for error. Until next time, DeAngelo
RE: Irix64 mod_perl compile problems - SOLVED.
DeAngelo: Quick follow-up! I looked in our setups and found that we actually use the LFLAGS (versus the CFLAGS) variable to pass this information to the linker. Try uncommenting the change you made and set the LFLAGS (ours has -g -n32 -mips4 -Wl,-woff,84) and see if that works. If so then we need to have Stas add an extra message about compiling on IRIX. Paul E Wilt Senior Principal Software Engineer Proquest Information and Learning - http://www.proquest.com mailto:paul.wilt;il.proquest.com 300 North Zeeb Rd Phone: (734) 302-6777 Ann Arbor, MI 48106Fax: (734) 302-6779 - -Original Message- From: Wilt, Paul [mailto:pwilt;xanedu.com] Sent: Monday, October 28, 2002 1:23 PM To: 'DeAngelo Lampkin'; '[EMAIL PROTECTED]' Subject: RE: Irix64 mod_perl compile problems - SOLVED. DeAngelo: Your sysadmin sure has a good eye! The link that you pointed to earlier: http://www.mail-archive.com/modperl;apache.org/msg28889.html has the following lines in it: Error Output for sanity check cd ..; cc -n32 -DIRIX -DMOD_PERL -DUSE_PERL_SSI -D_BSD_TYPES === *** -D_BSD_TIME -woff 1009,1110,1174,1184,1552 -OPT:Olimit=0 -I/usr/local/include -DLANGUAGE_C -DUSE_HSREGEX -DNO_DL_NEEDED -D_BSD_TYPES === *** -D_BSD_TIME -woff 1009 1110 1174 1184 1552 -OPT:Olimit=0 -I/usr/local/include -DLANGUAGE_C `./apaci` -I. -I/users/webuser/perl/lib/5.6.1/IP25-irix/CORE-o helpers/dummy helpers/dummy.c -L/usr/local/lib32 -L/usr/local/lib -Wl,-woff,84 /users/webuser/perl/lib/5.6.1/IP25-irix/auto/DynaLoader/DynaLoader.a -L/users/webuser/perl/lib/5.6.1/IP25-irix/CORE -lperl -lm -lc ld32: FATAL 9: I/O error (1110): No such file or directory cc INTERNAL ERROR: /usr/lib32/cmplrs/ld32 returned non-zero status 32 *** Error code 1 (bu21) = End of Error Report = Note the two lines I indicated with the === *** above: The -woff argument *DOES* need the commas to pass this cc command-line parameter to the linker backend. Later this week I will examine our builds to see why this does *not* seem to cause the same problem on our end. Thanks Paul E Wilt Senior Principal Software Engineer Proquest Information and Learning - http://www.proquest.com mailto:paul.wilt;il.proquest.com 300 North Zeeb Rd Phone: (734) 302-6777 Ann Arbor, MI 48106Fax: (734) 302-6779 - -Original Message- From: DeAngelo Lampkin [mailto:dlampkin;xencor.com] Sent: Monday, October 28, 2002 12:23 PM To: [EMAIL PROTECTED] Subject: Irix64 mod_perl compile problems - SOLVED. Apparently some of the compile options need to be delimited by commas for compilers on SGI IRIX64 system. For a quick refresher on what the error was, the following error shows up during the Makefile.PL run: ld32: FATAL 9: I/O error (1110): No such file or directory The way to get rid of that helpful error message is to scroll down to the line in the Makefile.PL script that says the following (line 525 in this version of the Makefile.PL script): if($PERL_EXTRA_CFLAGS) { $PERL_EXTRA_CFLAGS = join( , split(,, $PERL_EXTRA_CFLAGS)); $PERL_EXTRA_CFLAGS =~ s/\s+/ /g; } And then comment out the line with the join so that it looks like this: if($PERL_EXTRA_CFLAGS) { #$PERL_EXTRA_CFLAGS = join( , split(,, $PERL_EXTRA_CFLAGS)); $PERL_EXTRA_CFLAGS =~ s/\s+/ /g; } And now Makefile.PL runs without giving you that error message and things compile as they are meant to! Thanks to my system admin for noticing that commas that were present in template files were not showing up in output and quickly drawing a connection. Also, I appreciate the help from Ged and Paul for eliminating other possible sources for error. Until next time, DeAngelo
RE: Irix64 mod_perl compile problems - SOLVED.
Walt, I changed the PERL_EXTRA_CFLAGS variable in Makefile.PL to LFLAGS and got the following error: don't know how to make lib/Apache/MyConfig.pm (bu42). Also, there was no LFLAGS variable in the orginal generated Makefile. There are a couple variables called LDDLFLAGS and CCCDLFLAGS which I suppose are related. There's also a variable called LDFLAGs set to -L/usr/local/lib32 -L/usr/local/lib -Wl,-woff,84., which is similiar to the setting of the LFLAGS variable on your system. -Original Message- From: Wilt, Paul [mailto:pwilt;xanedu.com] Sent: Monday, October 28, 2002 10:41 AM To: Wilt, Paul; DeAngelo Lampkin; '[EMAIL PROTECTED]' Subject: RE: Irix64 mod_perl compile problems - SOLVED. DeAngelo: Quick follow-up! I looked in our setups and found that we actually use the LFLAGS (versus the CFLAGS) variable to pass this information to the linker. Try uncommenting the change you made and set the LFLAGS (ours has -g -n32 -mips4 -Wl,-woff,84) and see if that works. If so then we need to have Stas add an extra message about compiling on IRIX. Paul E Wilt Senior Principal Software Engineer Proquest Information and Learning - http://www.proquest.com mailto:paul.wilt;il.proquest.com 300 North Zeeb Rd Phone: (734) 302-6777 Ann Arbor, MI 48106Fax: (734) 302-6779 - -Original Message- From: Wilt, Paul [mailto:pwilt;xanedu.com] Sent: Monday, October 28, 2002 1:23 PM To: 'DeAngelo Lampkin'; '[EMAIL PROTECTED]' Subject: RE: Irix64 mod_perl compile problems - SOLVED. DeAngelo: Your sysadmin sure has a good eye! The link that you pointed to earlier: http://www.mail-archive.com/modperl;apache.org/msg28889.html has the following lines in it: Error Output for sanity check cd ..; cc -n32 -DIRIX -DMOD_PERL -DUSE_PERL_SSI -D_BSD_TYPES === *** -D_BSD_TIME -woff 1009,1110,1174,1184,1552 -OPT:Olimit=0 -I/usr/local/include -DLANGUAGE_C -DUSE_HSREGEX -DNO_DL_NEEDED -D_BSD_TYPES === *** -D_BSD_TIME -woff 1009 1110 1174 1184 1552 -OPT:Olimit=0 -I/usr/local/include -DLANGUAGE_C `./apaci` -I. -I/users/webuser/perl/lib/5.6.1/IP25-irix/CORE-o helpers/dummy helpers/dummy.c -L/usr/local/lib32 -L/usr/local/lib -Wl,-woff,84 /users/webuser/perl/lib/5.6.1/IP25-irix/auto/DynaLoader/DynaLoader.a -L/users/webuser/perl/lib/5.6.1/IP25-irix/CORE -lperl -lm -lc ld32: FATAL 9: I/O error (1110): No such file or directory cc INTERNAL ERROR: /usr/lib32/cmplrs/ld32 returned non-zero status 32 *** Error code 1 (bu21) = End of Error Report = Note the two lines I indicated with the === *** above: The -woff argument *DOES* need the commas to pass this cc command-line parameter to the linker backend. Later this week I will examine our builds to see why this does *not* seem to cause the same problem on our end. Thanks Paul E Wilt Senior Principal Software Engineer Proquest Information and Learning - http://www.proquest.com mailto:paul.wilt;il.proquest.com 300 North Zeeb Rd Phone: (734) 302-6777 Ann Arbor, MI 48106Fax: (734) 302-6779 - -Original Message- From: DeAngelo Lampkin [mailto:dlampkin;xencor.com] Sent: Monday, October 28, 2002 12:23 PM To: [EMAIL PROTECTED] Subject: Irix64 mod_perl compile problems - SOLVED. Apparently some of the compile options need to be delimited by commas for compilers on SGI IRIX64 system. For a quick refresher on what the error was, the following error shows up during the Makefile.PL run: ld32: FATAL 9: I/O error (1110): No such file or directory The way to get rid of that helpful error message is to scroll down to the line in the Makefile.PL script that says the following (line 525 in this version of the Makefile.PL script): if($PERL_EXTRA_CFLAGS) { $PERL_EXTRA_CFLAGS = join( , split(,, $PERL_EXTRA_CFLAGS)); $PERL_EXTRA_CFLAGS =~ s/\s+/ /g; } And then comment out the line with the join so that it looks like this: if($PERL_EXTRA_CFLAGS) { #$PERL_EXTRA_CFLAGS = join( , split(,, $PERL_EXTRA_CFLAGS)); $PERL_EXTRA_CFLAGS =~ s/\s+/ /g; } And now Makefile.PL runs without giving you that error message and things compile as they are meant to! Thanks to my system admin for noticing that commas that were present in template files were not showing up in output and quickly drawing a connection. Also, I appreciate the help from Ged and Paul for eliminating other possible sources for error. Until next time, DeAngelo
RE: conditional get
So, try the following change to your code: $R-content_type ($data {mimetype}); $R-set_content_length ($data {size}); $R-header_out ('ETag',$data {md5}); don't do that. use the $r-set_etag method instead, which is probably a bit safer than trying to figure out Etag rules yourself. I'm pretty sure that you shouldn't use the Etag header with non-static entities anyway, but I could be wrong. $r-set_etag ends up calling ap_make_etag to generate the ETag (from $r-mtime and $r-finfo) and setting the ETag header. That works great for static content, but for dynamic content you probably don't have valid finfo. So, generating an ETag yourself seems easier and safer, especially if you already have an MD5 hash of the content. Apache's $r-set_etag also satisfies RFC 2295, Transparent Content Negotiation in HTTP, by merging the variant list validator with whatever ap_make_etag returns. However, ETag's without vlv's are pretty much backwards compatible. -- Kyle Oppenheim Tellme Networks, Inc. http://www.tellme.com
re: solaris 2.6, mod_perl 1.27, apache 1.3.27, make test fails
Gurus, I have compiled mod_perl 1.27 with apache 1.3.27 under perl 5.8.0, solaris 2.6, using gcc 2.7.2.3. When I run the make test, it fails with the following in the error_log: /usr/local/bin/perl5.8.0 t/TEST 0 modules/actions...ok modules/cgi...FAILED test 4 Failed 1/5 tests, 80.00% okay modules/constants.ok modules/cookieskipped all skipped: no reason given modules/file..ok modules/httpdconf.ok modules/include...ok modules/log...ok modules/moduleskipped all skipped: no reason given modules/perlrun...skipped all skipped: no reason given modules/psections.skipped all skipped: no reason given modules/request...FAILED tests 1-10 Failed 10/10 tests, 0.00% okay modules/src...ok modules/stage.skipped all skipped: no reason given modules/statusfetch /perl/perl-status failed! modules/statusdubious Test returned status 255 (wstat 65280, 0xff00) DIED. FAILED tests 1-7 Failed 7/7 tests, 0.00% okay modules/symbolskipped all skipped: no reason given modules/uri...skipped all skipped: no reason given modules/util..skipped all skipped: no reason given internal/... The remainder of the tests fail for the most part because the apache server dies somewhere around the modules/request tests, most likely before. The logs/error_log shows: [notice] Destruction-DESTROY called for $global_object Subroutine fileparse_set_fstype redefined at /usr/local/lib/perl5/5.8.0/File/Basename.pm line 154. Subroutine fileparse redefined at /usr/local/lib/perl5/5.8.0/File/Basename.pm line 168. Subroutine basename redefined at /usr/local/lib/perl5/5.8.0/File/Basename.pm line 235. Subroutine dirname redefined at /usr/local/lib/perl5/5.8.0/File/Basename.pm line 248. Constant subroutine CGI::XHTML_DTD redefined at /usr/local/lib/perl5/5.8.0/constant.pm line 108. [Mon Oct 28 12:29:58 2002] [warn] [notice] child_init for process 19757, report any problems to [no address given] When I attempt to run the single test modules/request, I get the following output: % ./TEST -v modules/request modules/requestmodule Apache::Request is installed 1..10 not ok 1 HTTP/1.1 200 OK Connection: close Date: Mon, 28 Oct 2002 20:32:25 GMT Server: Apache/1.3.27 (Unix) mod_perl/1.27 Perl/v5.8.0 mod_layout/3.2 Content-Type: text/plain Client-Date: Mon, 28 Oct 2002 20:32:25 GMT Client-Peer: 127.0.0.1:8529 1..0 Test header seen more than once! /usr/local/lib/perl5/site_perl/Apache/Request.pm not ok 2 HTTP/1.1 200 OK Connection: close Date: Mon, 28 Oct 2002 20:32:25 GMT Server: Apache/1.3.27 (Unix) mod_perl/1.27 Perl/v5.8.0 mod_layout/3.2 Content-Type: text/plain Client-Date: Mon, 28 Oct 2002 20:32:25 GMT Client-Peer: 127.0.0.1:8529 1..0 Test header seen more than once! /usr/local/lib/perl5/site_perl/Apache/Request.pm not ok 3 /usr/local/lib/perl5/5.8.0/pod/perlfunc.pod should have 6496 lines (request-upload.pl says: ) not ok 4 not ok 5 /usr/local/lib/perl5/5.8.0/pod/perlpod.pod should have 685 lines (request-upload.pl says: ) not ok 6 not ok 7 /usr/local/lib/perl5/5.8.0/pod/perlxs.pod should have 1980 lines (request-upload.pl says: ) not ok 8 not ok 9 /usr/local/src/mod_perl/mod_perl-1.27/t/docs/book.gif should have 113 lines (request-upload.pl says: ) not ok 10 When I try to run all the tests that went before that, all running them as single tests, none of them cause the server to die. The modules/cgi test causes a single on error #4 for that test. The output is: ServerError: Insecure dependency in sysopen while running with -T switch at (eval 197) line 8. error-notes is also set dump of %@: /perl/cgi.pl = Insecure dependency in sysopen while running with -T switch at (eval 197) line 8. The output in the logs/error_log is: [Mon Oct 28 12:37:52 2002] [error] Insecure dependency in sysopen while running with -T switch at (eval 197) line 8. Background: I have used mod_perl up through versions 1.15, using perl 5.004_04, and earlier versions of Apache. I am trying to upgrade to the latest stable releases of everything and it just does not seem to be working. I have checked the list archives as well as google and anywhere else I could think of and could not find why it is not working. Any help is appreciated. Please let me know if you need any additional information. Thank you very much. JohnM ## John Mendenhall ## [EMAIL PROTECTED] ## Senior Network/Systems Administrator
Re: Apache::Clean, Apache::Compress, mod_gzip/deflate, cross sitescripting and more.
On Sun, 27 Oct 2002, Richard Clarke wrote: Before I embark on a day exploring the pros and cons of today's cleaning/compression tools, I wondered if any of you could give me some feedback about your own experiences within the context of medium/large scale web sites/applications (E-Toys etc). Is it too presumtious to expect that many users now have high speed connections and tools that clean and/or compress html are of a small benefit anymore? That is not to mention the proliferation of pretty websites with 90% graphics. We'are using mod_deflate on rambler.ru about 1.5 year. It's one of the biggest Russian portals and search engines. We use gzipping on caching and accelerating mod_accel frontends but not on mod_perl backends. We use conservative mod_deflate settings i.e. we do not compress responses to requests that go through any proxy servers. These settings allow us to save about 5-10% of all bandwidth. Of course benefit of compressing depends to clients and content. Many Russian users have slow connections and even they have fast enough links these links usually shared so their resulting bandwith is low. Graphics is usually good cacheble but texts is not always. If it's your case then gzipping allows you to save bandwidth. I see 3 some trades off of compression using. 1. Perfomance. mod_deflate has capabilty to check system idle time (on FreeBSD only) and to disable gzipping if idle time would be less then specified. Anyway I never saw less then 30% idle time on out frontends. It seems that modern CPUs can easy gzip several small enough (30K) responses. 2. Memory. zlib uses about 300K for compressing. It seems to me more important resource then CPU. Additional 300K is big enough to lightweight frontend so mod_deflate has directive to disable gzipping if there are more Apache childs then specified - this allows to avoid intensive swapping when number of Apache childs increases for some reason. 3. Browser bugs. But it seems that modern browsers have not serious gzipping bugs. Igor Sysoev http://sysoev.ru
FW: mod_perl / PerlAuthenHandler question
Steve, I have no objection to replying to the mod_perl list. I have no idea what is wrong I am so new at all of this that the more people who might have an idea the better. I am running Apache 1.3.22 and mod_perl 1.21 on a Sun Solaris 2.6 machine. I'm sure Apache and mod_perl are running as I can successfully grab that out of $ENV{SERVER_SOFTWARE}. I'm using perl 5.005_03. I am trying use a .htaccess file to allow NT Authenitcation on a directory. However, I am getting a server error Syntax error on line 6 of /web/content/askLucent/password-reset/.htaccess: Invalid command 'PerlAuthenHandler', perhaps mis-spelled or defined by a module not included in the server configuration Here are the contents of my .htaccess file Limit GET POST AuthName NT Domain\Login and Password AuthType Basic #PerlSetVar NT_Controllers 'na02il0015dc00:na02il0015dc01' PerlSetVar NT_Controllers 'na02il0015dc04:na02il0015dc01:NA02IL0015DC02' PerlAuthenHandler Apache::AuthenN2 require valid-user /Limit I did build mod_perl with EVERYTHING=1 and did a make install and stopped restarted Apache. Printing out the SERVER_SOFTWARE environment variable it shows 'Apache/1.3.22 (Unix) mod_perl/1.21'. What else can I do to see if mod_perl works? Jem -Original Message- From: Steve Piner [mailto:stevep;marketview.co.nz] Sent: Monday, October 28, 2002 3:30 PM To: Mitchel, Jennifer (Jem) Subject: Re: mod_perl / PerlAuthenHandler question Mitchel, Jennifer (Jem) wrote: Steve, I read your reply to a POST: http://mathforum.org/epigone/modperl/flygrexspir/3D447423.895BFCB5;marketview.co.nz. I am seeing the same error I did build my mod_perl with EVERYTHING=1. Any other ideas on what I'd be missing? Jem No idea as yet. What operating system are you building on? What is the command line you are using? Does mod_perl work OK other than the authentication and authorisation? Also, do you mind if we also send replies to the mod_perl list? I don't know everything, and someone is more likely to spot any errors that I might make. Steve -- Steve Piner Web Applications Developer Marketview Limited http://www.marketview.co.nz
re: solaris 2.6, mod_perl 1.27, apache 1.3.27, make test fails
I have compiled mod_perl 1.27 with apache 1.3.27 under perl 5.8.0, solaris 2.6, using gcc 2.7.2.3. When I run the make test, it fails Did you build your Perl 5.8.0? I ask because the general advice is that the same compiler must build both Perl and mod_perl. Some people seem to have had troubles with 5.8.0, although not necessarily associated with Solaris. I wouldn't do it right now (in case someone else comes up with an easier suggestion:) but if you did build your own Perl then it might be worth compiling 5.6.1 (or even 5.7.3 - I've had no troubles with 5.7.2 but then I'm not usually on Solaris...) to see if that's any better. We built our own Perl 5.8.0, as well as Perl 5.6.1. We had different problems with 5.6.1. That was a BIG jump from 1.15 to 1.27 and 5.004 to 5.8 !!! My advice would be to try to take smaller steps in future. We follow the adage of: If it ain't broke, don't fix it. We finally had a couple of free hours and decided to upgrade, to get all the security issues fixed, etc. However, seems we keep running into problems. Thanks for the insights. Any other suggestions? JohnM ## John Mendenhall ## [EMAIL PROTECTED] ## Senior Network/Systems Administrator
re: solaris 2.6, mod_perl 1.27, apache 1.3.27, make test fails
Do you have multiple versions of perl installed? Try a clean installation of perl and use the same compiler and same flags in building everything. Regards, Jie On Mon, 28 Oct 2002, John E. Mendenhall wrote: Date: Mon, 28 Oct 2002 12:44:07 -0800 (PST) From: John E. Mendenhall [EMAIL PROTECTED] To: [EMAIL PROTECTED] Subject: re: solaris 2.6, mod_perl 1.27, apache 1.3.27, make test fails Gurus, I have compiled mod_perl 1.27 with apache 1.3.27 under perl 5.8.0, solaris 2.6, using gcc 2.7.2.3. When I run the make test, it fails with the following in the error_log: /usr/local/bin/perl5.8.0 t/TEST 0 modules/actions...ok modules/cgi...FAILED test 4 Failed 1/5 tests, 80.00% okay modules/constants.ok modules/cookieskipped all skipped: no reason given modules/file..ok modules/httpdconf.ok modules/include...ok modules/log...ok modules/moduleskipped all skipped: no reason given modules/perlrun...skipped all skipped: no reason given modules/psections.skipped all skipped: no reason given modules/request...FAILED tests 1-10 Failed 10/10 tests, 0.00% okay modules/src...ok modules/stage.skipped all skipped: no reason given modules/statusfetch /perl/perl-status failed! modules/statusdubious Test returned status 255 (wstat 65280, 0xff00) DIED. FAILED tests 1-7 Failed 7/7 tests, 0.00% okay modules/symbolskipped all skipped: no reason given modules/uri...skipped all skipped: no reason given modules/util..skipped all skipped: no reason given internal/... The remainder of the tests fail for the most part because the apache server dies somewhere around the modules/request tests, most likely before. The logs/error_log shows: [notice] Destruction-DESTROY called for $global_object Subroutine fileparse_set_fstype redefined at /usr/local/lib/perl5/5.8.0/File/Basename.pm line 154. Subroutine fileparse redefined at /usr/local/lib/perl5/5.8.0/File/Basename.pm line 168. Subroutine basename redefined at /usr/local/lib/perl5/5.8.0/File/Basename.pm line 235. Subroutine dirname redefined at /usr/local/lib/perl5/5.8.0/File/Basename.pm line 248. Constant subroutine CGI::XHTML_DTD redefined at /usr/local/lib/perl5/5.8.0/constant.pm line 108. [Mon Oct 28 12:29:58 2002] [warn] [notice] child_init for process 19757, report any problems to [no address given] When I attempt to run the single test modules/request, I get the following output: % ./TEST -v modules/request modules/requestmodule Apache::Request is installed 1..10 not ok 1 HTTP/1.1 200 OK Connection: close Date: Mon, 28 Oct 2002 20:32:25 GMT Server: Apache/1.3.27 (Unix) mod_perl/1.27 Perl/v5.8.0 mod_layout/3.2 Content-Type: text/plain Client-Date: Mon, 28 Oct 2002 20:32:25 GMT Client-Peer: 127.0.0.1:8529 1..0 Test header seen more than once! /usr/local/lib/perl5/site_perl/Apache/Request.pm not ok 2 HTTP/1.1 200 OK Connection: close Date: Mon, 28 Oct 2002 20:32:25 GMT Server: Apache/1.3.27 (Unix) mod_perl/1.27 Perl/v5.8.0 mod_layout/3.2 Content-Type: text/plain Client-Date: Mon, 28 Oct 2002 20:32:25 GMT Client-Peer: 127.0.0.1:8529 1..0 Test header seen more than once! /usr/local/lib/perl5/site_perl/Apache/Request.pm not ok 3 /usr/local/lib/perl5/5.8.0/pod/perlfunc.pod should have 6496 lines (request-upload.pl says: ) not ok 4 not ok 5 /usr/local/lib/perl5/5.8.0/pod/perlpod.pod should have 685 lines (request-upload.pl says: ) not ok 6 not ok 7 /usr/local/lib/perl5/5.8.0/pod/perlxs.pod should have 1980 lines (request-upload.pl says: ) not ok 8 not ok 9 /usr/local/src/mod_perl/mod_perl-1.27/t/docs/book.gif should have 113 lines (request-upload.pl says: ) not ok 10 When I try to run all the tests that went before that, all running them as single tests, none of them cause the server to die. The modules/cgi test causes a single on error #4 for that test. The output is: ServerError: Insecure dependency in sysopen while running with -T switch at (eval 197) line 8. error-notes is also set dump of %@: /perl/cgi.pl = Insecure dependency in sysopen while running with -T switch at (eval 197) line 8. The output in the logs/error_log is: [Mon Oct 28 12:37:52 2002] [error] Insecure dependency in sysopen while running with -T switch at (eval 197) line 8. Background: I have used mod_perl up through versions 1.15, using perl 5.004_04, and earlier versions of Apache. I am trying to upgrade to the latest stable releases of everything and it just does not seem to be working. I have checked the list archives as well as google and anywhere else I could think of and could not find why it is not working. Any help is appreciated. Please let me know
Re: FW: mod_perl / PerlAuthenHandler question
> ... I am so new at all of this that the more people who might have an idea the better. We've all had to start somewhere. The spirit of open source is global support. Perhaps you might like to check the following from the mod_perl user guide. http://perl.apache.org/docs/1.0/guide/troubleshooting.html#Invalid_command__PerlHandler Reference is to httpd.conf file but in your case it's the .htaccess file. Good luck Alfred Vahau Uni. PNG "Mitchel, Jennifer (Jem)" wrote: Steve, I have no objection to replying to the mod_perl list. I have no idea what is wrong I am so new at all of this that the more people who might have an idea the better. I am running Apache 1.3.22 and mod_perl 1.21 on a Sun Solaris 2.6 machine. I'm sure Apache and mod_perl are running as I can successfully grab that out of $ENV{SERVER_SOFTWARE}. I'm using perl 5.005_03. I am trying use a .htaccess file to allow NT Authenitcation on a directory. However, I am getting a server error > Syntax error on line 6 of /web/content/askLucent/password-reset/.htaccess: > Invalid command 'PerlAuthenHandler', perhaps mis-spelled or defined by a > module not included in the server configuration Here are the contents of my .htaccess file Limit GET POST> AuthName "NT Domain\Login and Password" AuthType Basic #PerlSetVar NT_Controllers 'na02il0015dc00:na02il0015dc01' PerlSetVar NT_Controllers 'na02il0015dc04:na02il0015dc01:NA02IL0015DC02' PerlAuthenHandler Apache::AuthenN2 require valid-user /Limit> I did build mod_perl with EVERYTHING=1 and did a make install and stopped restarted Apache. Printing out the SERVER_SOFTWARE environment variable it shows 'Apache/1.3.22 (Unix) mod_perl/1.21'. What else can I do to see if mod_perl works? Jem -Original Message- From: Steve Piner [mailto:[EMAIL PROTECTED]] Sent: Monday, October 28, 2002 3:30 PM To: Mitchel, Jennifer (Jem) Subject: Re: mod_perl / PerlAuthenHandler question "Mitchel, Jennifer (Jem)" wrote: > > Steve, > > I read your reply to a POST: [EMAIL PROTECTED]">http://mathforum.org/epigone/modperl/flygrexspir/[EMAIL PROTECTED]. > > I am seeing the same error I did build my mod_perl with EVERYTHING=1. Any other ideas on what I'd be missing? > > Jem No idea as yet. What operating system are you building on? What is the command line you are using? Does mod_perl work OK other than the authentication and authorisation? Also, do you mind if we also send replies to the mod_perl list? I don't know everything, and someone is more likely to spot any errors that I might make. Steve -- Steve Piner Web Applications Developer Marketview Limited http://www.marketview.co.nz
Re: FW: mod_perl / PerlAuthenHandler question
It sounds like mod_perl is installed and running OK. Quoting from http://httpd.apache.org/docs/mod/core.html#limit: In the general case, access control directives should not be placed within a limit section. Do you need the limit section? Can you run without it? Steve Mitchel, Jennifer (Jem) wrote: [...] I am running Apache 1.3.22 and mod_perl 1.21 on a Sun Solaris 2.6 machine. I'm sure Apache and mod_perl are running as I can successfully grab that out of $ENV{SERVER_SOFTWARE}. I'm using perl 5.005_03. I am trying use a .htaccess file to allow NT Authenitcation on a directory. However, I am getting a server error Syntax error on line 6 of /web/content/askLucent/password-reset/.htaccess: Invalid command 'PerlAuthenHandler', perhaps mis-spelled or defined by a module not included in the server configuration Here are the contents of my .htaccess file Limit GET POST AuthName NT Domain\Login and Password AuthType Basic #PerlSetVar NT_Controllers 'na02il0015dc00:na02il0015dc01' PerlSetVar NT_Controllers 'na02il0015dc04:na02il0015dc01:NA02IL0015DC02' PerlAuthenHandler Apache::AuthenN2 require valid-user /Limit I did build mod_perl with EVERYTHING=1 and did a make install and stopped restarted Apache. Printing out the SERVER_SOFTWARE environment variable it shows 'Apache/1.3.22 (Unix) mod_perl/1.21'. What else can I do to see if mod_perl works? Jem -Original Message- From: Steve Piner [mailto:stevep;marketview.co.nz] Sent: Monday, October 28, 2002 3:30 PM To: Mitchel, Jennifer (Jem) Subject: Re: mod_perl / PerlAuthenHandler question Mitchel, Jennifer (Jem) wrote: Steve, I read your reply to a POST: http://mathforum.org/epigone/modperl/flygrexspir/3D447423.895BFCB5;marketview.co.nz. I am seeing the same error I did build my mod_perl with EVERYTHING=1. Any other ideas on what I'd be missing? Jem No idea as yet. What operating system are you building on? What is the command line you are using? Does mod_perl work OK other than the authentication and authorisation? Also, do you mind if we also send replies to the mod_perl list? I don't know everything, and someone is more likely to spot any errors that I might make. Steve -- Steve Piner Web Applications Developer Marketview Limited http://www.marketview.co.nz -- Steve Piner Web Applications Developer Marketview Limited http://www.marketview.co.nz
re: solaris 2.6, mod_perl 1.27, apache 1.3.27, make test fails
Hi there, On Mon, 28 Oct 2002, John E. Mendenhall wrote: I have compiled mod_perl 1.27 with apache 1.3.27 under perl 5.8.0, solaris 2.6, using gcc 2.7.2.3. When I run the make test, it fails Did you build your Perl 5.8.0? I ask because the general advice is that the same compiler must build both Perl and mod_perl. Some people seem to have had troubles with 5.8.0, although not necessarily associated with Solaris. I wouldn't do it right now (in case someone else comes up with an easier suggestion:) but if you did build your own Perl then it might be worth compiling 5.6.1 (or even 5.7.3 - I've had no troubles with 5.7.2 but then I'm not usually on Solaris...) to see if that's any better. I have used mod_perl up through versions 1.15, using perl 5.004_04, and That was a BIG jump from 1.15 to 1.27 and 5.004 to 5.8 !!! My advice would be to try to take smaller steps in future. 73, Ged.