Re: Memory leak hell...
On Mon, 11 Sep 2000, Stas Bekman wrote: I was thinking about going thru the symbol table and dumping all the variables. And run diff between the dumps of the two requests. Be careful though that Devel::Peek doesn't show a complete dump for the whole structure, and I couldn't find the interface for changing the deepness of datastructure traversal. I think Doug has patched Apache::Peek to make this configurable. Do you think it still won't work? Yes. Because this only seems to give you access to package variables, not trapped lexicals or anything in closures. -- Matt/ Fastnet Software Ltd. High Performance Web Specialists Providing mod_perl, XML, Sybase and Oracle solutions Email for training and consultancy availability. http://sergeant.org | AxKit: http://axkit.org
Re: Executing Perl Scripts on the Web Browser.
Dear All, Iam presently using BSDI unix. When I am trying to execute the perl scripts on the browser I am not able to execute. I went to httpd.conf file and checked for your given below steps for configuring. But, I was able to see the related configuration steps in srm.conf file instead of httpd.conf file. i.e., as follows: /var/www/conf/httpd.conf /srm.conf /access.conf Pleaseprovide me the steps properly ...I mean to say. step by step by which I can configure the Unix machine in such a way that I can easily execute the PERL SCRIPTS on the Browser. Please help me out. Best Regards., Abdul Rahman. - Original Message - From: [EMAIL PROTECTED] To: ABDUL RAHMAN... Cc: [EMAIL PROTECTED] ; Matt Sergeant Sent: ???, ? 04, 2000 8:15 PM Subject: RE: Executing Perl Scripts on the Web Browser. On 04-Sep-00 ABDUL RAHMAN... wrote:Dear All,Can any body say me how to execute perl scripts on the web server apache.What are the configuration steps required to configure to execute the perl scripts onthe any browsers.Please send me the steps if any body knows.Abdul Rahman.Hi,You'll need a directory in which you'll put your scipts (usually : cgi-bin)In httpd.conf, you have to modify the lines ScriptAlias : ScriptAlias /cgi-bin/ /my/path/to/cgi-bin/ the location lines :Location /cgi-bin SetHandler perl-script PerlHandler Apache::Registry Options +ExecCGI/Locationand the Directory linesDirectory "/my/path/to/cgi-bin" Options ExecCgi AllowOverride AuthConfig FileInfo Indexes Limit Options Order allow,deny Allow from all/Directory This works for me.Take a look at the docs on the Apache websiteHope this helpsSteph Dear All, Can any body say me how to execute perl scripts on the web server apache. What are the configuration steps required to configure to execute the perl scripts on the any browsers. Please send me the steps if any body knows. Abdul Rahman.
Re: Memory leak hell...
On Mon, 11 Sep 2000, Matt Sergeant wrote: On Mon, 11 Sep 2000, Stas Bekman wrote: I was thinking about going thru the symbol table and dumping all the variables. And run diff between the dumps of the two requests. Be careful though that Devel::Peek doesn't show a complete dump for the whole structure, and I couldn't find the interface for changing the deepness of datastructure traversal. I think Doug has patched Apache::Peek to make this configurable. Do you think it still won't work? Yes. Because this only seems to give you access to package variables, not trapped lexicals or anything in closures. Well, you don't know where the leakage is. May be the problem *is* in the package variables... At least if you prove that it's not, you narrow your search path. What I'd do is taking the module that prints the Stack trace and patch it to print memory foot print after each trace line with GTop or else, and then just grep for the first place where the memory bumps up and find the offending code. Of course you have to take into account Frank's reply. _ 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://jazzvalley.com http://singlesheaven.com http://perlmonth.com perl.org apache.org
Re: Memory leak hell...
On Mon, 11 Sep 2000, Stas Bekman wrote: On Mon, 11 Sep 2000, Matt Sergeant wrote: On Mon, 11 Sep 2000, Stas Bekman wrote: I was thinking about going thru the symbol table and dumping all the variables. And run diff between the dumps of the two requests. Be careful though that Devel::Peek doesn't show a complete dump for the whole structure, and I couldn't find the interface for changing the deepness of datastructure traversal. I think Doug has patched Apache::Peek to make this configurable. Do you think it still won't work? Yes. Because this only seems to give you access to package variables, not trapped lexicals or anything in closures. Well, you don't know where the leakage is. May be the problem *is* in the package variables... At least if you prove that it's not, you narrow your search path. I think there are about 3 package variables in total. Its not in them. :-) What I'd do is taking the module that prints the Stack trace and patch it to print memory foot print after each trace line with GTop or else, and then just grep for the first place where the memory bumps up and find the offending code. Of course you have to take into account Frank's reply. I'm going to take a more radical approach. A re-write of major portions of the code to make it easier to track it down. *sigh*... -- Matt/ Fastnet Software Ltd. High Performance Web Specialists Providing mod_perl, XML, Sybase and Oracle solutions Email for training and consultancy availability. http://sergeant.org | AxKit: http://axkit.org
persistent info (storing config?)
(I'm not subscribed, please CC: [EMAIL PROTECTED]) Hello everyone. I'm using mod_perl and Apache for a typical web project. Each piece of mod_perl code will need to be able to access a lot of configuration info. I guess we'll store the configuration info in a plaintext file. This configuration info will need to be changed by the admin (whether by editing the config file or using a web interface). However, I'd rather not parse the entire config file for every single request (the config file may be very long, and/or consist of multiple files). Is there any way to parse the config file once, store the results, and make the data available to any of my code? I was thinking of putting the parsing code into a Perl module, and `use`ing the module in startup.pl . But will this ensure that the file is only parsed once? When subsequent scripts 'use' the module, won't this require parsing the file again? Or if the parsing of the file is separated into a subroutine, how will the results be stored so that they can be accessed quickly by any code which uses the module? Sorry if I'm explaining myself poorly - feel free to ask for clarification. One more thing - it would be nice to be able to re-parse the config file when someone sends Apache a certain signal. Is this possible? Thanks in advance, Neil -- Neil Conway [EMAIL PROTECTED] Get my GnuPG key from: http://klamath.dyndns.org/mykey.asc Encrypted mail welcomed It should be first patch, not first post. -- Alan Cox PGP signature
Fw: Executing Perl Scripts on the Web Browser.
Dear All, Can any body help me.. please...It quite urgent. Presently I am able to execute the perl script on the console but not on the any browser. I want to configure my Bsdi unix machine in such a way that I want to execute the PERL SCRIPTS ON THE BROWSER. Please send me the configuration steps if anyone has... Should I download any of the softwares for this purpose. Your quick response will be highly appreciated. Best Regards., Abdul Rahman. - Original Message - From: Matt Sergeant [EMAIL PROTECTED] To: ABDUL RAHMAN... [EMAIL PROTECTED] Sent: ???, ? 11, 2000 10:55 AM Subject: Re: Executing Perl Scripts on the Web Browser. I don't know how I ended up as your personal help desk for Apache/Perl issues, but I'd rather if you just sent mail to the lists instead. Thanks. On Mon, 11 Sep 2000, ABDUL RAHMAN... wrote: Dear All, Iam presently using BSDI unix. When I am trying to execute the perl scripts on the browser I am not able to execute. I went to httpd.conf file and checked for your given below steps for configuring. But, I was able to see the related configuration steps in httpd.conf file instead it is available in httpd.conf file. i.e., as follows: /var/www/conf/httpd.conf /srm.conf /access.conf Please provide me the steps properly ...I mean to say. step by step by which I can configure the Unix machine in such a way that I can easily execute the PERL SCRIPTS on the Browser. Please help me out. Best Regards., Abdul Rahman. - Original Message - From: [EMAIL PROTECTED] To: ABDUL RAHMAN... Cc: [EMAIL PROTECTED] ; Matt Sergeant Sent: ???, ? 04, 2000 8:15 PM Subject: RE: Executing Perl Scripts on the Web Browser. On 04-Sep-00 ABDUL RAHMAN... wrote: Dear All, Can any body say me how to execute perl scripts on the web server apache. What are the configuration steps required to configure to execute the perl scripts on the any browsers. Please send me the steps if any body knows. Abdul Rahman. Hi, You'll need a directory in which you'll put your scipts (usually : cgi-bin) In httpd.conf, you have to modify the lines ScriptAlias : ScriptAlias /cgi-bin/ /my/path/to/cgi-bin/ the location lines : Location /cgi-bin SetHandler perl-script PerlHandler Apache::Registry Options +ExecCGI /Location and the Directory lines Directory "/my/path/to/cgi-bin" Options ExecCgi AllowOverride AuthConfig FileInfo Indexes Limit Options Order allow,deny Allow from all /Directory This works for me. Take a look at the docs on the Apache website Hope this helps Steph -- Dear All, Can any body say me how to execute perl scripts on the web server apache. What are the configuration steps required to configure to execute the perl scripts on the any browsers. Please send me the steps if any body knows. Abdul Rahman. -- Matt/ Fastnet Software Ltd. High Performance Web Specialists Providing mod_perl, XML, Sybase and Oracle solutions Email for training and consultancy availability. http://sergeant.org | AxKit: http://axkit.org
RE: [Mason] Problem: no-Content.
Oops my mistake the i do not have a problem accessing the '/' of the site but only when i try to access the "/mason" part of the site... PS. I have got the same problem with 0.87 (Bit i saw it had some installation problems) (I have not installed Version 0.88): # make test PERL_DL_NONLAZY=1 /usr/bin/perl -Iblib/arch -Iblib/lib -I/usr/local/lib/perl5/5. 6.0/sun4-solaris -I/usr/local/lib/perl5/5.6.0 -e 'use Test::Harness qw(runtests $verbose); $verbose=0; runtests @ARGV;' t/*.t t/01-syntax.ok t/02-sections...ok t/03-mc.ok t/04-misc...ok t/05-requestUse of uninitialized value in join at /clickly/compbst/HTML- Mason-0.87/test/data/request/obj/shared/check_error line 18. t/05-requestok 6/6FAILED test 5 Failed 1/6 tests, 83.33% okay t/06-parser.ok t/07-interp.ok t/08-ah.ok t/09-component..ok t/10-cache..NOK 3FAILED tests 1-3 Failed 3/3 tests, 0.00% okay t/11-inheritok Failed Test Status Wstat Total Fail Failed List of failed --- t/05-request.t61 16.67% 5 t/10-cache.t 33 100.00% 1-3 Failed 2/11 test scripts, 81.82% okay. 4/74 subtests failed, 94.59% okay. *** Error code 29 make: Fatal error: Command failed for target `test_dynamic' HTML::Mason is your perlhandler in the /mason request space, so what's supposed to handle a root object "/" request? Do a simple setup for one virtualhost and make sure your choices of documentroot, alias settings and component_root settings agree before broadening the solution for multiple virtualhosts. Also, back down to Mason 0.87 until 0.89 is released. -Ian Hello all, -- The Problem -- When i try try retrieve http://www.clickly.com/index.html (Test-Site: not the real clickly.com) i get a blank return and i mean a real blank content return (tried it with telnet to port 80 and the server only sends back the headers of the web-page?) Does anybody know what the problem is? I'va tried all sorts of things but nothing worked. Thanks in advance, Guido Moonen -- The Stuff i have -- * Solaris V 2.6 op Sun ultrasparc. * perl, v5.6.0 built for sun4-solaris * Server version: Apache/1.3.12 (Unix) Server built: Sep 6 2000 14:51:05 * mod_perl-1.24 * Mason v. 0.88 -- Handler.PL -- SNIP my (%parsers, %interp, %ah); foreach my $site qw(www modified management) { $parsers{$site} = new HTML::Mason::Parser(allow_globals = [qw($dbh %session)]); $interp{$site} = new HTML::Mason::Interp (parser=$parsers{$site}, comp_root="/clickly/html/$site/", data_dir="/clickly/masonhq/$site/", system_log_events="ALL"); $ah{$site} = new HTML::Mason::ApacheHandler(interp=$interp{$site}); chown (scalar(getpwnam "nobody"), scalar(getgrnam "nobody"), $interp{$site}-files_written); } sub handler { my ($r) = @_; my $site = $r-dir_config('site'); return -1 if $r-content_type $r-content_type !~ m|^text/|i; my $status = $ah{$site}-handle_request($r); return $status; } SNIP -- httpd.conf -- SNIP # www.clickly.com (Default) VirtualHost 192.168.0.210 ServerAdmin [EMAIL PROTECTED] DocumentRoot /clickly/html/www ServerName www.clickly.com PerlSetVar site 'www' Directory "/clickly/html/www" Options Indexes FollowSymLinks MultiViews ExecCGI AllowOverride None Order allow,deny Allow from all /Directory alias /mason /clickly/html/www Location /mason SetHandler perl-script PerlHandler HTML::Mason /Location /VirtualHost SNIP == Guido Moonen Clickly.com Van Diemenstraat 206 1013 CP Amsterdam THE NETHERLANDS Mob: +31 6 26912345 Tel: +31 20 6934083 Fax: +31 20 6934866 E-mail: [EMAIL PROTECTED] http://www.clickly.com Get Your Software Clickly! ==
SIGSEGV
Hello I have a Segmentation fault error with mod perl ! Any idea ? using : perl -v: This is perl, version 5.005_03 built for i386-linux apache : Server version: Apache/1.3.9 (Unix) mod_perl-1.24 - (gdb) run /opt/apache/lib/perl/WCM.pl Starting program: /usr/bin/perl /opt/apache/lib/perl/WCM.pl warning: Unable to find dynamic linker breakpoint function. GDB will be unable to debug shared library initializers and track explicitly loaded dynamic code. (no debugging symbols found)...(no debugging symbols found)... (no debugging symbols found)...(no debugging symbols found)... (no debugging symbols found)...(no debugging symbols found)... Program received signal SIGSEGV, Segmentation fault. 0x400e6865 in realloc () from /lib/libc.so.6 (gdb) where #0 0x400e6865 in realloc () from /lib/libc.so.6 #1 0x400e678d in realloc () from /lib/libc.so.6 #2 0x807a00f in Perl_saferealloc () #3 0x8088562 in Perl_sv_grow () #4 0x808a761 in Perl_sv_setpv () #5 0x401b11f1 in ?? () from /opt/apache/lib/perl/PerlSWIP.so #6 0x8087022 in Perl_pp_entersub () #7 0x80b0c86 in Perl_runops_standard () #8 0x8059274 in perl_run () #9 0x8057843 in main () #10 0x400a72e7 in __libc_start_main () from /lib/libc.so.6 (gdb) - François -- [EMAIL PROTECTED] BULL-CITBtel:(+33) 556 437 848 Home: [EMAIL PROTECTED] 207, cours du Médoc fax:(+33) 556 437 978 http://www.citb.bull.net 33000 Bordeaux BullCom: 227 7848 ICQ :3886291 Linux -
[OT] Re: open(FH,'|qmail-inject') fails
"Randal L. Schwartz" wrote: Man, if I see ONE MORE script that checks for a "legal email", I'm gonna scream. Matter of fact, I already did. :) I screamed when I've seen the correct version too :-) It is at http://public.yahoo.com/~jfriedl/regex/code.html and the regex for URL's is at http://foad.org/~abigail/Perl/url2.html
Re: persistent info (storing config?)
# persistency for perl data structures use Storable; -Carlos Neil Conway wrote: (I'm not subscribed, please CC: [EMAIL PROTECTED]) Hello everyone. I'm using mod_perl and Apache for a typical web project. Each piece of mod_perl code will need to be able to access a lot of configuration info. I guess we'll store the configuration info in a plaintext file. This configuration info will need to be changed by the admin (whether by editing the config file or using a web interface). However, I'd rather not parse the entire config file for every single request (the config file may be very long, and/or consist of multiple files). Is there any way to parse the config file once, store the results, and make the data available to any of my code? I was thinking of putting the parsing code into a Perl module, and `use`ing the module in startup.pl . But will this ensure that the file is only parsed once? When subsequent scripts 'use' the module, won't this require parsing the file again? Or if the parsing of the file is separated into a subroutine, how will the results be stored so that they can be accessed quickly by any code which uses the module? Sorry if I'm explaining myself poorly - feel free to ask for clarification. One more thing - it would be nice to be able to re-parse the config file when someone sends Apache a certain signal. Is this possible? Thanks in advance, Neil -- Neil Conway [EMAIL PROTECTED]> Get my GnuPG key from: http://klamath.dyndns.org/mykey.asc Encrypted mail welcomed It should be first patch, not first post. -- Alan Cox Part 1.2Type: application/pgp-signature -- --- Carlos Ramirez + Boeing + Reusable Space Systems + 714.372.4181 ---
Question
Anyone know why a browser would send something like this? HTTP_ACCEPT_LANGUAGE=en-us,x-ns1MKtfdqbuNhQ;q=0.4,x-ns2r2e09OnmPe2 the x-ns1 and x-ns2 stuff look like base64 encoded 8-byte blocks, almost as if it's some kind of key exchange or key leaking mechanism. -- greg
Re: Question
On 11 Sep 2000 [EMAIL PROTECTED] wrote: Anyone know why a browser would send something like this? HTTP_ACCEPT_LANGUAGE=en-us,x-ns1MKtfdqbuNhQ;q=0.4,x-ns2r2e09OnmPe2 the x-ns1 and x-ns2 stuff look like base64 encoded 8-byte blocks, almost as if it's some kind of key exchange or key leaking mechanism. Its very odd that one specifies a score too. I've never seen this before. -- Matt/ Fastnet Software Ltd. High Performance Web Specialists Providing mod_perl, XML, Sybase and Oracle solutions Email for training and consultancy availability. http://sergeant.org | AxKit: http://axkit.org
Re: Question
On Mon, 11 Sep 2000, Matt Sergeant wrote: On 11 Sep 2000 [EMAIL PROTECTED] wrote: Anyone know why a browser would send something like this? HTTP_ACCEPT_LANGUAGE=en-us,x-ns1MKtfdqbuNhQ;q=0.4,x-ns2r2e09OnmPe2 the x-ns1 and x-ns2 stuff look like base64 encoded 8-byte blocks, almost as if it's some kind of key exchange or key leaking mechanism. Its very odd that one specifies a score too. I've never seen this before. The score is a part of the RFC. You forget that the browser is not only NC or IE :) You can implement your own browser in many ways and than send any kind of headers. So if I send to your server this header: HTTP_ACCEPT_LANGUAGE=Stas_is_learning_french_please_speak_slowly;q=0.99,en-us;0.01 Will you also ask why Stas is learning french? :) :) :) I ask myself the same question :) _ 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://jazzvalley.com http://singlesheaven.com http://perlmonth.com perl.org apache.org
Re: persistent info (storing config?)
On Sun, 10 Sep 2000, Neil Conway wrote: However, I'd rather not parse the entire config file for every single request (the config file may be very long, and/or consist of multiple files). Is there any way to parse the config file once, store the results, and make the data available to any of my code? Yes, if you load things up in startup (before the fork) they will be available to all processes for reading. See http://thingy.kcilink.com/modperlguide/perl/Using_Global_Variables_and_Shari.html I was thinking of putting the parsing code into a Perl module, and `use`ing the module in startup.pl . But will this ensure that the file is only parsed once? Yes. See the perl man pages or http://thingy.kcilink.com/modperlguide/perl/use_require_do_INC_and.html When subsequent scripts 'use' the module, won't this require parsing the file again? One more thing - it would be nice to be able to re-parse the config file when someone sends Apache a certain signal. Is this possible? Yes. If you delete a module from %INC, you can require it again. Of course you'll lose the shared memory savings, because each child will have it's own copy now. - Perrin
RE: Core dumping
On Sat, 9 Sep 2000, Shane Adams wrote: #7 0x80894de in XS_Apache_finfo (cv=0x8207410) at Apache.xs:1844 i haven't tried to reproduce this, but suspect a bug in $r-finfo which the patch below should workaround. --- lib/HTML/Mason/ApacheHandler.pm~Thu Aug 24 22:42:51 2000 +++ lib/HTML/Mason/ApacheHandler.pm Mon Sep 11 11:43:02 2000 @@ -531,7 +531,7 @@ # If filename is a directory, then either decline or simply reset # the content type, depending on the value of decline_dirs. # -if (-d $r-finfo) { +if (-d $r-filename) { if ($self-decline_dirs) { return DECLINED; } else { @@ -544,7 +544,7 @@ # (mainly for dhandlers). # my $pathname = $r-filename; -$pathname .= $r-path_info unless -f $r-finfo; +$pathname .= $r-path_info unless -f _; # # Compute the component path via the resolver. @@ -555,7 +555,7 @@ # # Decline if file does not pass top level predicate. # -if (-f $r-finfo and defined($self-{top_level_predicate})) { +if (-f _ and defined($self-{top_level_predicate})) { return NOT_FOUND unless $self-{top_level_predicate}-($r-filename); }
Re: Question
On Mon, 11 Sep 2000, Stas Bekman wrote: On Mon, 11 Sep 2000, Matt Sergeant wrote: On 11 Sep 2000 [EMAIL PROTECTED] wrote: Anyone know why a browser would send something like this? HTTP_ACCEPT_LANGUAGE=en-us,x-ns1MKtfdqbuNhQ;q=0.4,x-ns2r2e09OnmPe2 the x-ns1 and x-ns2 stuff look like base64 encoded 8-byte blocks, almost as if it's some kind of key exchange or key leaking mechanism. Its very odd that one specifies a score too. I've never seen this before. The score is a part of the RFC. You forget that the browser is not only NC or IE :) You can implement your own browser in many ways and than send any kind of headers. So if I send to your server this header: Yes I know the RFC well :-) HTTP_ACCEPT_LANGUAGE=Stas_is_learning_french_please_speak_slowly;q=0.99,en-us;0.01 But to what purpose? That was the point. No server is going to deliver alternate content in a language that isn't defined by the IANA list. Will you also ask why Stas is learning french? :) :) :) I ask myself the same question :) :-) -- Matt/ Fastnet Software Ltd. High Performance Web Specialists Providing mod_perl, XML, Sybase and Oracle solutions Email for training and consultancy availability. http://sergeant.org | AxKit: http://axkit.org
Re: Memory leak hell...
On Sun, 10 Sep 2000, Matt Sergeant wrote: For 2 days solid now I've been trying to track down a very bizarre memory leak in AxKit. I've checked everything I can think of - all circular references are now gone, all closures clean up carefully after themselves, and I've reduced the usage of some external modules. But still the processes grow. Now to the wierd bit. I could track this down if it wasn't for this: The memory leak starts after the Nth hit, usually around 35. This is running under httpd -X. So it goes along very happily for 35 hits - memory usage is rock solid stable. Then after the 35th hit the memory usage starts to grow about 4k per hit. Obviously thats an impossible rate of growth to sustain for any amount of time, and soon the server is swamped. you're leaking on every request, consider this example: use strict; my $i = 0; my @a; my $old_size = proc_size(); while (++$i) { my $size = proc_size(); if ($size != $old_size) { printf "Size changed from $old_size to $size, i=$i\n"; $old_size = $size; ; #pause } push @a, []; } sub proc_size { my $size = 0; open my $fh, "/proc/self/status"; while ($fh) { last if (($size) = (/^VmRSS:\s+(\d+)/)); } close $fh; $size; } outputs: Size changed from 1376 to 1436, i=1 Size changed from 1436 to 1472, i=2 Size changed from 1472 to 1476, i=55 Size changed from 1476 to 1480, i=99 Size changed from 1480 to 1484, i=158 Size changed from 1484 to 1488, i=204 Time::HiRes, Apache::* (core apache stuff only), AxKit, Digest::MD5, Compress::Zlib, Fcntl, XML::Parser, XML::XPath, Unicode::Map8, Unicode::String, MIME::Base64, Storable (loaded but not used), XML::Sablotron (loaded but not used). look for xsubs in those modules you're using that are calling new{SV,AV,HV,RV} or SvREFCNT_inc(). sounds like botched refcnting or failure to mortalize a new*V. actually, my first guess is Apache::ModuleConfig-get, if you don't explicitly pass __PACKAGE__ as the last argument, perl_eval_pv() is called, which has a leak plugged in perl-current: [ 6201] By: gsar on 2000/06/06 00:42:59 Log: Perl_eval_pv() leaks 4 bytes every time it is called because it does a PUSHMARK that's never ever POPMARKed; in general, only Perl_call_[sp]v() need a PUSHMARK for incoming arguments; Perl_eval_[sp]v() don't because they don't take any incoming arguments (this leak has been around since the original version of perl_eval_pv() in 5.003_97e) Branch: perl ! perl.c so first try changing: Apache::ModuleConfig-get($r) to Apache::ModuleConfig-get($r, __PACKAGE__)
Re: Question
HI Stas, On Mon, 11 Sep 2000, Stas Bekman wrote: Will you also ask why Stas is learning French? Chercher la femme? [50 Jahre Musik mit Hazy Osterwald] 73, Ged.
Re: Question
"GWH" == G W Haywood [EMAIL PROTECTED] writes: GWH HI Stas, GWH On Mon, 11 Sep 2000, Stas Bekman wrote: Will you also ask why Stas is learning French? GWH Chercher la femme? Most likely because the people in Paris demand you speak to them in perfect French. High school level French is not accepted ;-| -- =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= Vivek Khera, Ph.D.Khera Communications, Inc. Internet: [EMAIL PROTECTED] Rockville, MD +1-301-545-6996 GPG MIME spoken herehttp://www.khera.org/~vivek/
RE: Memory leak hell...
-Original Message- From: Doug MacEachern [mailto:[EMAIL PROTECTED]] Sent: Monday, September 11, 2000 2:54 PM To: Matt Sergeant Cc: [EMAIL PROTECTED] Subject: Re: Memory leak hell... [snip] look for xsubs in those modules you're using that are calling new{SV,AV,HV,RV} or SvREFCNT_inc(). sounds like botched refcnting or failure to mortalize a new*V. actually, my first guess is Apache::ModuleConfig-get, if you don't explicitly pass __PACKAGE__ as the last argument, perl_eval_pv() is called, which has a leak plugged in perl-current: [ 6201] By: gsar on 2000/06/06 00:42:59 Log: Perl_eval_pv() leaks 4 bytes every time it is called because it does a PUSHMARK that's never ever POPMARKed; in general, only Perl_call_[sp]v() need a PUSHMARK for incoming arguments; Perl_eval_[sp]v() don't because they don't take any incoming arguments (this leak has been around since the original version of perl_eval_pv() in 5.003_97e) Branch: perl ! perl.c so first try changing: Apache::ModuleConfig-get($r) to Apache::ModuleConfig-get($r, __PACKAGE__) that's a good bit of info to know - thanks... --Geoff
Re: Question
GWH HI Stas, GWH On Mon, 11 Sep 2000, Stas Bekman wrote: Will you also ask why Stas is learning French? GWH Chercher la femme? Most likely because the people in Paris demand you speak to them in perfect French. High school level French is not accepted ;-| well then we're a long shot away, and so are many French natives :) Nah, we won't be that demanding, lest we scare him away from the, erm, "most beautiful city in the world". -- Eric
AuthCookieURL
Hi, I've got a modified version of Ken Williams' Apache::AuthCookie that works with munged URLs. This module also will work without a login script, so it can act as a simple session manager that works with cookies or URLs. So, you can have it require a login in one section of your site, and just manage sessions in another. I haven't had the time lately to run it though the paces as I would like, but I am using it. Ken showed some interest in looking at it early on, but I haven't been able to get in touch with him in a while. So if anyone else would like to test it, it can be found at: http://www.hank.org/modules/AuthCookieURL-0.02.tar.gz I've had a few people ask about it, but I'd rather someone here try it before releasing it to anyone else. As it's simply a few modifications of Ken's code, I'd like him to review it too. If you do look at it, please look over the module itself. There's more notes and questions in the code than in the documentation, and I'm sure someone more experienced than I will spot improvements. Lastly, I'm not a big fan of URL munged sessions, but I have some clients where cookies are disable. There's a bunch of issues with munged URLs that I'd rather not have to worry about. Oh well. NAME Apache::AuthCookieURL - Perl Authentication and Authorization via cookies or URL munging SYNOPSIS In httpd.conf PerlModule Apache::AuthCookieURLHandler # Or to use simple session generation w/o persistence #PerlModule Apache::AuthCookieURL # Send expires with cookie PerlSetVar WhateverExpires +90d # Other cookie settings #PerlSetVar WhateverDomain some.domain # This can only be set to "/" if using URL sessions #PerlSetVar WhateverPath /path #PerlSetVar WhateverSecure 1 # Login script to call PerlSetVar WhateverLoginScript /login.pl # Or for just session management without a login script #PerlSetVar WhateverLoginScript NONE PerlSetVar AuthCookieURLDebug 5 # Disable cookies (only URL based sessions) #PerlSetVar WhateverNoCookie 1 # This block enables URL session handling: "MISSING" can be anything PerlTransHandler Apache::AuthCookieURLHandler-URLsession ErrorDocument 302 /MISSING ErrorDocument 301 /MISSING Location /MISSING SetHandler perl-script PerlHandler Apache::AuthCookieURLHandler-error_document /Location Location /protected AuthType Apache::AuthCookieURLHandler AuthName Whatever PerlAuthenHandler Apache::AuthCookieURLHandler-authenticate PerlAuthzHandler Apache::AuthCookieURLHandler-authorize require valid-user /Location # provide access to some areas Location /protected/open AuthName none /Location Location /images AuthName none /Location # Make sure the login script can be run Files login.pl Options +ExecCGI SetHandler perl-script PerlHandler Apache::Registry /Files # LOGIN is the action defined by the login.pl script Files LOGIN AuthType Apache::AuthCookieURLHandler AuthName Whatever SetHandler perl-script PerlHandler Apache::AuthCookieURLHandler-login /Files # better to just invalidate the session, of course Files LOGOUT AuthType Apache::AuthCookieURLHandler PerlSetVar WhateverLogoutURI / AuthName Whatever SetHandler perl-script PerlHandler Apache::AuthCookieURLHandler-logout /Files DESCRIPTION ** Warning: beta software. This should be used for testing purposes only. I'm sure the interface will change (or disappear) without notice. Please report any problems or comments back to Bill Moseley [EMAIL PROTECTED] This module is a modification of Ken Williams [EMAIL PROTECTED] Apache::AuthCookie. Please see perldoc Apache::AuthCookie for complete instructions. As this is intended to be a drop-in replacement for Apache::AuthCookie you may wish to install and test with Ken's Apache::AuthCookie before trying AuthCookieURL. Basically, this module allows you to catch any unauthenticated access and redirect to a login script that you define. The login script posts credentials (e.g. username and password) and your script can then validate and provide a session key. The session key is sent in a cookie, and also in a munged URL and a redirect is issued and the process starts all over. (Now you see why you should install Ken's documentation!) Apache::AuthCookieURL adds the following changes to Apache::AuthCookie. * URL munging If the PerlTransHandler is enabled in httpd.conf the session key will also be
Re: Apache::Compress install problems/On the fly html contentcompression
On Mon, 11 Sep 2000, Bogomolnyi Constantin wrote: Hello all, I try to install Apache::Compress module , but when i make test i says : Invalid command 'Perl', perhaps mis-spelled or defined by a module not include d in the server configuration make: *** [start_httpd] Error 1 And if I try to start httpd it says : Syntax error on line 284 of /usr/local/etc/httpd_perl/httpd.conf: Can't locate loadable object for module Apache::File in @INC (@INC contains: /us r/local/lib/perl5/5.6.0/i686-linux /usr/local/lib/perl5/5.6.0 /usr/local/lib/per l5/site_perl/5.6.0/i686-linux /usr/local/lib/perl5/site_perl/5.6.0 /usr/local/li b/perl5/site_perl /usr/local/ /usr/local/lib/perl) at /usr/local/lib/perl5/site_ perl/5.6.0/i686-linux/mod_perl.pm line 16 Compilation failed in require at /usr/local/lib/perl5/site_perl/5.6.0/Apache/Com press.pm line 5. BEGIN failed--compilation aborted at /usr/local/lib/perl5/site_perl/5.6.0/Apache /Compress.pm line 5. Compilation failed in require at (eval 15) line 3. at the line 284 on httpd.conf i have :PerlModule Apache::Compress Any idea would be apreciated . You need to recompile mod_perl with the option EVERYTHING=1 (Doug - whats the likelihood of you making that the default for 1.25?)... I'm also looking for some information about On the fly compression because we have an huge 100 ko main page , and 70% of our users are using IE4 ou NC4 or so the accept gziped content . *cough* AxKit *cough* :-) -- Matt/ Fastnet Software Ltd. High Performance Web Specialists Providing mod_perl, XML, Sybase and Oracle solutions Email for training and consultancy availability. http://sergeant.org | AxKit: http://axkit.org
Re: Apache::Compress install problems/On the fly html contentcompression
In my (incomplete) testing, Netscape 4.7x works. So far Apache::Compress takes the browser at its word, and only compresses the content if it sees an "Accept-Encoding: gzip" header sent from the client to the server. Some other folks have used the approach of forcing gzipped content whenever the module "knows" the browser can handle it. I tend not to like that approach. The Apache::Compress code is only about 40 lines long in total, you might try putting a few debug statements in there to see what's going on. It's possible that the Content-length header isn't getting properly reset (Apache::Compress doesn't set it, though it probably should), but that the content is getting compressed/decompressed properly anyway. I'm not sure whether that's much of a problem for most browsers or not. Certainly it must be a problem for caching proxies or something. [EMAIL PROTECTED] (Bogomolnyi Constantin) wrote: hello , Thank you very much , EVERYTHING=1 helps now it look like Apache::Compress works but when I put PerlModule Apache::Compress # Compress regular files FilesMatch "\.html$" PerlHandler Apache::Compress /FilesMatch in my httpd.conf and i take test.html witch is as big as 700ko , so I expect to winn at least 30 % using gzip , but when i look in access log i see 10.x.x.x - - [...] "GET HTTP/1.1" 200 70 witch mean that there is no compression used , But i use IE 5.1 and NE4.5 so it should work , non ? Thank you very much for all information on how it is supposed to work is it only Linux versions of netscape witch is concerned with this ?? Best CB - Original Message - From: "Matt Sergeant" [EMAIL PROTECTED] To: "Bogomolnyi Constantin" [EMAIL PROTECTED] Cc: [EMAIL PROTECTED] Sent: Monday, September 11, 2000 11:22 PM Subject: Re: Apache::Compress install problems/On the fly html contentcompression On Mon, 11 Sep 2000, Bogomolnyi Constantin wrote: Hello all, I try to install Apache::Compress module , but when i make test i says : Invalid command 'Perl', perhaps mis-spelled or defined by a module not include d in the server configuration make: *** [start_httpd] Error 1 And if I try to start httpd it says : Syntax error on line 284 of /usr/local/etc/httpd_perl/httpd.conf: Can't locate loadable object for module Apache::File in @INC (@INC contains: /us r/local/lib/perl5/5.6.0/i686-linux /usr/local/lib/perl5/5.6.0 /usr/local/lib/per l5/site_perl/5.6.0/i686-linux /usr/local/lib/perl5/site_perl/5.6.0 /usr/local/li b/perl5/site_perl /usr/local/ /usr/local/lib/perl) at /usr/local/lib/perl5/site_ perl/5.6.0/i686-linux/mod_perl.pm line 16 Compilation failed in require at /usr/local/lib/perl5/site_perl/5.6.0/Apache/Com press.pm line 5. BEGIN failed--compilation aborted at /usr/local/lib/perl5/site_perl/5.6.0/Apache /Compress.pm line 5. Compilation failed in require at (eval 15) line 3. at the line 284 on httpd.conf i have :PerlModule Apache::Compress Any idea would be apreciated . You need to recompile mod_perl with the option EVERYTHING=1 (Doug - whats the likelihood of you making that the default for 1.25?)... I'm also looking for some information about On the fly compression because we have an huge 100 ko main page , and 70% of our users are using IE4 ou NC4 or so the accept gziped content . *cough* AxKit *cough* :-) -- Matt/ Fastnet Software Ltd. High Performance Web Specialists Providing mod_perl, XML, Sybase and Oracle solutions Email for training and consultancy availability. http://sergeant.org | AxKit: http://axkit.org ------ Ken Williams Last Bastion of Euclidity [EMAIL PROTECTED]The Math Forum
Re: AuthCookieURL
[EMAIL PROTECTED] (Bill Moseley) wrote: Hi, I've got a modified version of Ken Williams' Apache::AuthCookie that works with munged URLs. This module also will work without a login script, so it can act as a simple session manager that works with cookies or URLs. So, you can have it require a login in one section of your site, and just manage sessions in another. I haven't had the time lately to run it though the paces as I would like, but I am using it. Ken showed some interest in looking at it early on, but I haven't been able to get in touch with him in a while. So if anyone else would like to test it, it can be found at: Hi Bill, You're not the only one who's been unsuccessful in getting me to respond, I've got pretty high latency lately. =( But I'm still interested in seeing how to best integrate this. I should have some time later this week. ------ Ken Williams Last Bastion of Euclidity [EMAIL PROTECTED]The Math Forum
cvs commit: modperl-site/embperl Changes.pod.1.html
richter 00/09/11 02:54:13 Modified:embperl Changes.pod.1.html Log: Embperl Webpages - Changes Revision ChangesPath 1.174 +7 -2 modperl-site/embperl/Changes.pod.1.html Index: Changes.pod.1.html === RCS file: /home/cvs/modperl-site/embperl/Changes.pod.1.html,v retrieving revision 1.173 retrieving revision 1.174 diff -u -r1.173 -r1.174 --- Changes.pod.1.html2000/09/07 20:14:55 1.173 +++ Changes.pod.1.html2000/09/11 09:54:12 1.174 @@ -21,7 +21,7 @@ [a href="" HOME/a]nbsp;nbsp; [a href="Changes.pod.cont.html"CONTENT/a]nbsp;nbsp; [a href="Changes.pod.cont.html"PREV (Revision History - Content)/a]nbsp;nbsp; [a href="Changes.pod.2.html"NEXT (1.3b5 (BETA) 20. Aug 2000)/a]nbsp;nbsp; brhr P -Last Update: Thu Sep 7 22:15:34 2000 (MET) +Last Update: Mon Sep 11 11:54:52 2000 (MET) P NOTE: This version is only available via A HREF="CVS.pod.1.html#INTRO" "CVS"/A @@ -29,7 +29,9 @@ P -PRE - Changed EmbperlObject search order: +PRE - Embperl now runs on ActiveState Perl. With a lot of help + from Randy Korbes. + - Changed EmbperlObject search order: * If EMBPERL_OBJECT_STOPDIR is set, this directory is taken as the last directory in the normal search path, instead of the directory where the base template (EMBPERL_OBJECT_BASE) is found. @@ -42,6 +44,9 @@ calling scripts (see SetupSession and GetSession) - Added method for deleting session data and cookie - Added method for triggering resend of session cookie. + - embpcgi* and embpexec* are now geratated out of *.templ instead + of editied in place to avoid problems with cvs conflicts + and lower/uppercase on Win32. Suggest by Jens-Uwe Mager. /PRE p[a href="" HOME/a]nbsp;nbsp; [a href="Changes.pod.cont.html"CONTENT/a]nbsp;nbsp; [a href="Changes.pod.cont.html"PREV (Revision History - Content)/a]nbsp;nbsp; [a href="Changes.pod.2.html"NEXT (1.3b5 (BETA) 20. Aug 2000)/a]nbsp;nbsp; br font color="#808080"___br