[JOB WANTED] mod_perl programmer for hire
Thought I'd drop a note to announce my availability for either short-term or permanent employment. FYI, I live in San Francisco and don't want to move w/o quite a good reason, but I'll telecommute anywhere ;) In my previous job I designed and implemented a mod_perl web application that used an Oracle backend and could serve millions of fully dynamic pages (personalization, affiliate branding, NLS/charset including CJKV scripts, etc.) per day. mod_perl specific work has included most of the good stuff from the Guide, including (in no particular order): TransHandlers, cookie-based authorization, templating systems, session mgmt., Apache::Registry and pure handlers, load-balancing/proxies and related technologies, and more. Resume and references available, just drop me a note. Thanks, Chris p.s. As far as I can recall it is still ok to post this kind of thing on this list, but it makes me a bit squeamish nonetheless--sorry for spamming most of you.
Re: [RFC] New Apache Module, comments and name suggestions requested
On Dec 22, 1:15pm, darren chamberlain wrote: How is this different from using Template Toolkit directly? It's not, except that using the module is as simple as: FilesMatch "*.html$" SetHandler perl-script PerlHandler Grover /FilesMatch The module's working name is Grover, but it would probably end up living somewhere in the Apache:: namespace, if I were to put it on CPAN. I am open to suggestions for a new name. There's an Apache::Template module on the way which should provide a nice, clean Apache interface to the Template Toolkit. Usage should be as simple as the example you show above, but also allow TT configuration directives to be added to the httpd.conf. e.g. FilesMatch "*.tt2$" TTIncludePath /usr/local/tt2/templates SetHandler perl-script PerlHandlerApache::Template /FilesMatch Progress on the module got derailed by problems with configuration merging but I'm planning to pick it up again soon and finish it off. If you've got code/ideas/effort that you'd like to contribute then I'd be more than happy to work together and pool resources. Otherwise, you're welcome to slot the module somewhere into the Template::* namespace if you like. Template::Grover or something similar? Cheers A -- Andy Wardley [EMAIL PROTECTED] Signature regenerating. Please remain seated. [EMAIL PROTECTED] For a good time: http://www.kfs.org/~abw/
[DIGEST] mod_perl digest 12/25/2000
-- mod_perl digest December 25, 2000 - December 31, 2000 -- Recent happenings in the mod_perl world... Features o mod_perl status o cvs patches o module announcements o mailing list highlights o news o links mod_perl status o mod_perl - stable: 1.24_01 (released October 10, 2000) [1] - development: 1.24_02-dev [2] o Apache - stable: 1.3.14 (released October 13, 2000) [3] - development: 1.3.15-dev [4] o Perl - stable: 5.6 (released March 23, 2000) [5] - development: 5.7 [6] cvs patches o allow $r-finfo to be modified [7] o fix directive handlers bug triggered by LoadModule foo_module [8] o win32 updates for 1.3.15, including ApacheModulePerl.{dsp,dll} - mod_perl.{dsp,so} rename [9] module announcements o Apache::RequestNotes 0.06 - pass form and cookie data around in pnotes [10] o Apache::PageKit 0.91 - a web applications framework providing a clear separation of programming, content and presentation [11] o Apache::FileMan pre-release 0.03 - provides the same functionality as Apache::AutoIndex and can be used to both navigate and manage the web site [12] o Avacet Application Engine 2.0b2 - offers a language-neutral definition of data and interfaces for exchanging data, as well as a reference implementation of an application engine [13] mailing list highlights o This interesting thread discusses the overhead involved in using vars.pm versus fully qualified globals. [14] Other than that, not much of interest happened over the holidays - I think I'll just call it another great year for mod_perl... news o Netcraft December statistics [15] Apache 59.69% IIS 20.09% o Security Space December statistics [16] Apache 57.97% IIS 28.45% 11.51% (161,527) of Apache servers are running mod_perl [17] links o The Apache/Perl Integration Project [18] o mod_perl documentation [19] o mod_perl modules on CPAN [20] o mod_perl homepage [21] o mod_perl news and advocacy [22] o mod_perl list archives [23] [24] happy mod_perling... --Geoff [EMAIL PROTECTED] -- [1] http://perl.apache.org/dist/ [2] http://perl.apache.org/from-cvs/modperl/ [3] http://www.apache.org/dist/ [4] http://dev.apache.org/from-cvs/apache-1.3/ [5] http://www.perl.com/pub/language/info/software.html#stable [6] http://www.perl.com/pub/language/info/software.html#devel [7] http://marc.theaimsgroup.com/?l=apache-modperl-cvsm=97810977729586w=2 [8] http://marc.theaimsgroup.com/?l=apache-modperl-cvsm=97815291126928w=2 [9] http://marc.theaimsgroup.com/?l=apache-modperl-cvsm=97829122618630w=2 [10] http://forum.swarthmore.edu/epigone/modperl/zheldphaspeld [11] http://forum.swarthmore.edu/epigone/modperl/dermsarfi [12] http://forum.swarthmore.edu/epigone/modperl/bixsilflay [13] http://forum.swarthmore.edu/epigone/modperl/darsmorthon [14] http://forum.swarthmore.edu/epigone/modperl/twingpolsu [15] http://www.netcraft.com/survey [16] http://www.securityspace.com/s_survey/data/index.html [17] http://www.securityspace.com/s_survey/data/man.200012/apachemods.html [18] http://perl.apache.org [19] http://perl.apache.org/#docs [20] http://www.cpan.org/modules/by-module/Apache/ [21] http://www.modperl.com [22] http://www.take23.org [23] http://forum.swarthmore.edu/epigone/modperl/ [24] http://marc.theaimsgroup.com/?l=apache-modperlr=1w=2
Re: how to secure backend server ?
On Tue, 2 Jan 2001, Oleg Bartunov wrote: Hi, I have implement standard fe-be scheme as many times discussed in this list and described by Stas in his guide. Sorry, if I don't understand something simple. Everything works but I get a problem with securing my backend server - I want backend accepts requests only from my frontend. I have in backend's conf file: Directory "/db1/w3/comps/discovery" Options FollowSymLinks ExecCGI Includes MultiViews AllowOverride All Order deny,allow Deny from all Allow from MY_PROXY_IP /Directory Forget that, add the rule to your firewall. Its a far better place to manage these kinds of rules. -- Matt/ /||** Director and CTO ** //||** AxKit.com Ltd ** ** XML Application Serving ** // ||** http://axkit.org ** ** XSLT, XPathScript, XSP ** // \\| // ** Personal Web Site: http://sergeant.org/ ** \\// //\\ // \\
Re: how to secure backend server ?
At 03:02 PM 1/2/01 +, Matt Sergeant wrote: On Tue, 2 Jan 2001, Oleg Bartunov wrote: Hi, I have implement standard fe-be scheme as many times discussed in this list and described by Stas in his guide. Sorry, if I don't understand something simple. Everything works but I get a problem with securing my backend server - I want backend accepts requests only from my frontend. I have in backend's conf file: Directory "/db1/w3/comps/discovery" Options FollowSymLinks ExecCGI Includes MultiViews AllowOverride All Order deny,allow Deny from all Allow from MY_PROXY_IP /Directory Forget that, add the rule to your firewall. Its a far better place to manage these kinds of rules. I am not sure, but I suspect it may be possible to distinctly bind to 127.0.0.1 and thus disallow any external IP address listening for extra measure. The default for apache is to bind to every IP on the system promiscuously which you don't want on a BE server. Of course, you will need the firewall method if the BE server actually is on a physically separate machine from the FE server. Where security is concerned, it's not always the best idea to solely depend on firewall rules if you can help it... In case one gets misconfigured at least you have a 2nd one. Anyway, unless your mod_rewrite rules on the FE server are doing something other than blindly proxying all requests to the BE server, I am not sure whether the BE server is actually any more secure because of the reverse proxy. What attack could be made on the BE server directly that could not be made through just tunneling the same request through mod_rewrite on the FE server? eg Are you filtering for "passwd" in the URL with your rewrite rules?
Re:how to secure backend server ?
On Tuesday, January 02, 2001, Gunther Birznieks wrote the following about "how to secure backend server ?" GB I am not sure, but I suspect it may be possible to distinctly GB bind to 127.0.0.1 and thus disallow any external IP address GB listening for extra measure. The default for apache is to bind to GB every IP on the system promiscuously which you don't want on a BE GB server. You can explicitly bind an apache server to localhost. Best Regards, Mike Miller [EMAIL PROTECTED]
LWP and HTML::HeadParser....failed
Hi , I was trying to install mod_perl, but I ended up with 'LWP agent not found" errors and an "HTML:HeadParserfailed". As shown in my homepage below: "http://home.netvigator.com/~yungp/my_perl.html" Some of the helpful feedbacks from users of this mailing list say that I should install Apache 1.3.14. However, I have tried to install the LWP instead of installing Apache1.3.14, but I have met with no success as shown below: "[thekid@visors thekid]# perl -MCPAN -install LWP Can't open perl script "LWP": No such file or directory" I am currently using Apache 1.3.6. If I were to upgrade to 1.3.14, should i delete Apache 1.3.6? Just out of curiousity, how do I uninstall 1.3.14. I am normally a MS Windows user, so I am pretty new at this. If anyone can provide feedback, it would be helpful. Thanks. Peter
Re: LWP and HTML::HeadParser....failed
Yung Kwong Wing wrote: "[thekid@visors thekid]# perl -MCPAN -install LWP Can't open perl script "LWP": No such file or directory" try: perl -MCPAN -e 'install "LWP"' sterling
Memory leaks?
Hi, I have created a highly configurable content management system in modperl to build websites, which consists of several modules, some preload when apache initiates, some when a request initiates and some when needed. I had the opportunity to test the system with 2000 lan connected users to do some performance checking, and found out that for each request the server received, the child process which handled the request used a little more memory each time. In this test I had around 500.000 hits pr day, and apache/modperl used up all the 1Gb of memory the server had in a very short time. I checked and rechecked my code and could not find any kind of memory leak in it, so finally I had to configure the Apache to kill child processes after answering 100 requests, otherwise they would consume too much memory. Have anybody else experienced this kind of problem? The system runs on a dual 800 Mhz PIII with 1Gb ram on FreeBSD 4.2 and all content is fetched/stored in a MySql running on the same server. Another problem I encountered... when doing HTTP upload's, apache/modperl uses 7-8 times the size of the uploaded file, of memory. If I uploaded a 10Mb file, the server would typically use up to 170Mb for the child answering the request, and the child would not free all the memory used when the request had been handled. Can this really be true? Yours, // Per Moeller
Re: Memory leaks?
On Tue, 2 Jan 2001, Per 'stripe' Moeller wrote: Hi, I have created a highly configurable content management system in modperl to build websites, which consists of several modules, some preload when apache initiates, some when a request initiates and some when needed. I had the opportunity to test the system with 2000 lan connected users to do some performance checking, and found out that for each request the server received, the child process which handled the request used a little more memory each time. In this test I had around 500.000 hits pr day, and apache/modperl used up all the 1Gb of memory the server had in a very short time. I checked and rechecked my code and could not find any kind of memory leak in it, so finally I had to configure the Apache to kill child processes after answering 100 requests, otherwise they would consume too much memory. Have anybody else experienced this kind of problem? Lots of people. Memory leaks are very easy to introduce, and very hard to find. The most likely causes are closures, circular references, and bad modules. Not necessarily in that order :-) Another problem I encountered... when doing HTTP upload's, apache/modperl uses 7-8 times the size of the uploaded file, of memory. If I uploaded a 10Mb file, the server would typically use up to 170Mb for the child answering the request, and the child would not free all the memory used when the request had been handled. Can this really be true? Yes its true. Try the latest Apache::Request test release - it should fix this problem. -- Matt/ /||** Director and CTO ** //||** AxKit.com Ltd ** ** XML Application Serving ** // ||** http://axkit.org ** ** XSLT, XPathScript, XSP ** // \\| // ** Personal Web Site: http://sergeant.org/ ** \\// //\\ // \\
Re:how to secure backend server ?
On Tue, 2 Jan 2001, Mike Miller wrote: Date: Tue, 2 Jan 2001 11:14:26 -0500 From: Mike Miller [EMAIL PROTECTED] To: [EMAIL PROTECTED] Subject: Re:how to secure backend server ? On Tuesday, January 02, 2001, Gunther Birznieks wrote the following about "how to secure backend server ?" GB I am not sure, but I suspect it may be possible to distinctly GB bind to 127.0.0.1 and thus disallow any external IP address GB listening for extra measure. The default for apache is to bind to GB every IP on the system promiscuously which you don't want on a BE GB server. You can explicitly bind an apache server to localhost. This works only if frontend and backend are on the same physical server. But it will not works even in this situation if you have several proxies running while you want backend accepts requests only from one specific proxy. regards, Oleg Best Regards, Mike Miller [EMAIL PROTECTED] _ Oleg Bartunov, sci.researcher, hostmaster of AstroNet, Sternberg Astronomical Institute, Moscow University (Russia) Internet: [EMAIL PROTECTED], http://www.sai.msu.su/~megera/ phone: +007(095)939-16-83, +007(095)939-23-83
Re: how to secure backend server ?
Oleg Bartunov ([EMAIL PROTECTED]) said something to this effect on 01/02/2001: You can explicitly bind an apache server to localhost. This works only if frontend and backend are on the same physical server. But it will not works even in this situation if you have several proxies running while you want backend accepts requests only from one specific proxy. Bind an address on the 192.168.0 net as an alias on a real interface: bash# /sbin/ifconfig -a lo0: flags=849UP,LOOPBACK,RUNNING,MULTICAST mtu 8232 inet 127.0.0.1 netmask ff00 hme0: flags=863UP,BROADCAST,NOTRAILERS,RUNNING,MULTICAST mtu 1500 inet 200.200.200.200 netmask ff00 broadcast 200.200.200.255 ether 8:0:20:a2:e1:84 bash# /sbin/ifconfig le0:7 192.168.0.7 up bash# /sbin/ifconfig -a lo0: flags=849UP,LOOPBACK,RUNNING,MULTICAST mtu 8232 inet 127.0.0.1 netmask ff00 hme0: flags=863UP,BROADCAST,NOTRAILERS,RUNNING,MULTICAST mtu 1500 inet 200.200.200.200 netmask ff00 broadcast 200.200.200.255 ether 8:0:20:a2:e1:84 hme0:7: flags=843UP,BROADCAST,RUNNING,MULTICAST mtu 1500 inet 192.168.0.7 netmask ff00 broadcast 192.168.0.255 bash# And then bind another address on the same private subnet to an interface on another machine, and they can talk to each other via this network (set the route correctly as well, naturally). This interface will be invisible from the 'net. (darren) -- Life is full of misery, loneliness, and suffering - and it's all over much too soon. -- Woody Allen
Re: how to secure backend server ?
On Tue, 2 Jan 2001, Gunther Birznieks wrote: Date: Tue, 02 Jan 2001 23:41:01 +0800 From: Gunther Birznieks [EMAIL PROTECTED] To: Matt Sergeant [EMAIL PROTECTED], Oleg Bartunov [EMAIL PROTECTED] Cc: [EMAIL PROTECTED] Subject: Re: how to secure backend server ? At 03:02 PM 1/2/01 +, Matt Sergeant wrote: On Tue, 2 Jan 2001, Oleg Bartunov wrote: Hi, I have implement standard fe-be scheme as many times discussed in this list and described by Stas in his guide. Sorry, if I don't understand something simple. Everything works but I get a problem with securing my backend server - I want backend accepts requests only from my frontend. I have in backend's conf file: Directory "/db1/w3/comps/discovery" Options FollowSymLinks ExecCGI Includes MultiViews AllowOverride All Order deny,allow Deny from all Allow from MY_PROXY_IP /Directory Forget that, add the rule to your firewall. Its a far better place to manage these kinds of rules. I am not sure, but I suspect it may be possible to distinctly bind to 127.0.0.1 and thus disallow any external IP address listening for extra measure. The default for apache is to bind to every IP on the system promiscuously which you don't want on a BE server. Well, is it possible to tell apache to bind only one IP which is explicitly writen in Listen command ? Interesting, that I see right IP of proxy when I print environment but when request comes to backend I see wrong IP in $r-connection-remote_ip ! Also, in my original post I wrote that on my observation request passes twice access control - the first with proxy IP address (passes ok by configuration) and the second one with original client's IP which failes also by configuration. And this cause the problem. Does this correct behaivour ? In my understanding PerlPostReadRequestHandler is in the beginning of lifecycle of request. Of course, you will need the firewall method if the BE server actually is on a physically separate machine from the FE server. Where security is concerned, it's not always the best idea to solely depend on firewall rules if you can help it... In case one gets misconfigured at least you have a 2nd one. Anyway, unless your mod_rewrite rules on the FE server are doing something other than blindly proxying all requests to the BE server, I am not sure whether the BE server is actually any more secure because of the reverse proxy. What attack could be made on the BE server directly that could not be made through just tunneling the same request through mod_rewrite on the FE server? eg Are you filtering for "passwd" in the URL with your rewrite rules? True security is to pull out network cable :-) Now I have academic interest to understand what I've seen. regards, Oleg _ Oleg Bartunov, sci.researcher, hostmaster of AstroNet, Sternberg Astronomical Institute, Moscow University (Russia) Internet: [EMAIL PROTECTED], http://www.sai.msu.su/~megera/ phone: +007(095)939-16-83, +007(095)939-23-83
Mod Perl v1.24_01
I want to configure my apache server (1.3.14) with mod_perl (1.24_01) But when I configure mod_perl with the following command * perl Makefile.PL APACHE_SRC=/usr/src/http/apache_1.3.14/src DO_HTTPD=1 USE_APACI=1 PREP_HTTPD=1 EVERYTHING=1 * make * make test -- Gives the following error : Syntax error in Line 3 .../t/conf/http.conf Invalid Command POD I am quite new with Apache Mod_Perl. Is it also possible to receive a configuration file for Apache from someone. I use a SuSE Linux 7.0 system THX winmail.dat
Configuration File for Apache
Can someone send me a Configuration File for Apache please? THX winmail.dat
haunting variable values ? nested subs : cookies
Hello, I have a fairly simple/straight forward scripts which displays a form. I set a cookie to store name and email for the submitting user just in case they return. Yet when I set the cookie it gets set for all, from anywhere, not just me on my desktop. Sometimes a previous cookie pops up. The results aren't entirely consistent. I am unsure if this is a mod_perl problem, a nested subroutine problem, or a cookie problem. There are actually 3 scripts and a lib file that either display the form, process it, or do other process' not directly related to the form or cookies. I am using; Perl 5.6 mod_perl 1.24 CGI.pm 2.71 I set the cookie by; my %user; $user{'username'} = $q-param('author'); $user{'useremail'} = $q-param('email'); my $cookie = $q-cookie(-name='user', -value=\%user, -path='/threads', -expires='+1y'); I retrieve the cookie by; my %user; %user = $q-cookie('user'); I thought I might have had the nested subroutine problem discussed in the guide and moved my subroutines to a library file. This didn't help, but I likely copy/pasted the problem into my new lib.pl file. I know my description is rather cryptic but if you recognize a problem please let me know. Thanks, --- Don Fike UTK/ICL [EMAIL PROTECTED] 865-974-0293 ---
Re: Configuration File for Apache
Hi there, On Tue, 2 Jan 2001, Steve Haemelinck wrote: Can someone send me a Configuration File for Apache please? That's a bit like asking for someone to send you a book. It's not quite as easy as that. If you're just talking about Apache, then you're on the wrong List. If you're talking about Apache/mod_perl, then read http://perl.apache.org/guide especially the configuration sections. It's all there. 73, Ged.
Re: haunting variable values ? nested subs : cookies
Hi there, On Tue, 2 Jan 2001, Don Fike wrote: I know my description is rather cryptic Yup. but if you recognize a problem please let me know. Well at least you've been looking at the Guide! Could be you need to read the debugging section. It's sometimes easier to debug if you start Apache with: httpd -X So that there's only one process serving requests. It's explained in the Guide. 73, Ged.
PerlSetupEnv Off not working
Perhaps I am a bit confused about how this should be working...but.. I have PerlSetupEnv set to Off in httpd.conf.. yet in this sample script running as an Apache::Registry script: #!/opt/bin/perl use Data::Dumper; my $r = Apache-request(); $r-send_http_header('text/plain'); print Dumper(\%ENV); its dumping out what appears to be a complete enviroment.. what gives, shouldnt this be empty? there are some other Apache::Registry scripts which havent been re-written to not use CGI.pm anymore, is it possible that 'use'ing CGI.pm;' is forcing this to be turned back on? -confused --
Re: PerlSetupEnv Off not working
check the guide: http://thingy.kcilink.com/modperlguide/performance/PerlSetupEnv_Off.html But %ENV population is expensive. Those who have moved to the Perl Apache API no longer need this extra %ENV population, and can gain by turning it Off. Scripts using the CGI.pm module require PerlSetupEnv On because that module relies on a properly populated CGI environment table. ___ JR Mayberry wrote: Perhaps I am a bit confused about how this should be working...but.. I have PerlSetupEnv set to Off in httpd.conf.. yet in this sample script running as an Apache::Registry script: #!/opt/bin/perl use Data::Dumper; my $r = Apache-request(); $r-send_http_header('text/plain'); print Dumper(\%ENV); its dumping out what appears to be a complete enviroment.. what gives, shouldnt this be empty? there are some other Apache::Registry scripts which havent been re-written to not use CGI.pm anymore, is it possible that 'use'ing CGI.pm;' is forcing this to be turned back on? -confused --
Re: PerlSetupEnv Off not working
I understand that, but that is not what I am asking. Theoretically if CGI.pm requires PerlSetupEnv, then those scripts which use CGI.pm should stop working.. they are working just fine.. the %ENV hash is being populated as well.. yet plain as day in httpd.conf it says PerlSetupEnv Off what I'm asking is, why... ? John K Sterling wrote: check the guide: http://thingy.kcilink.com/modperlguide/performance/PerlSetupEnv_Off.html But %ENV population is expensive. Those who have moved to the Perl Apache API no longer need this extra %ENV population, and can gain by turning it Off. Scripts using the CGI.pm module require PerlSetupEnv On because that module relies on a properly populated CGI environment table. ___ JR Mayberry wrote: Perhaps I am a bit confused about how this should be working...but.. I have PerlSetupEnv set to Off in httpd.conf.. yet in this sample script running as an Apache::Registry script: #!/opt/bin/perl use Data::Dumper; my $r = Apache-request(); $r-send_http_header('text/plain'); print Dumper(\%ENV); its dumping out what appears to be a complete enviroment.. what gives, shouldnt this be empty? there are some other Apache::Registry scripts which havent been re-written to not use CGI.pm anymore, is it possible that 'use'ing CGI.pm;' is forcing this to be turned back on? -confused -- -- __ JR Mayberry e-Vend.net Corporation Programmer and Systems Administrator(888) 427-8743 x226 tel [EMAIL PROTECTED]http://www.e-vend.net The information in this message (including attachments) is confidential. If the reader of this message is not the intended recipient or an agent responsible for delivering it to the intended recipient, you are hereby notified that you have received this document in error and that any review, dissemination, distribution, or copying of this message is strictly prohibited. If you have received this communication in error, please notify us immediately by e-mail, and delete the original message. ***
Re: PerlSetupEnv Off not working
Perhaps the problem is that the page reads... PerlSetupEnv Off is another optimization you might consider. This directive requires mod_perl 1.25 or later. but I run mod_perl 1.24, but http://perl.apache.org/dist/ makes no reference to mod_perl 1.25 ? John K Sterling wrote: check the guide: http://thingy.kcilink.com/modperlguide/performance/PerlSetupEnv_Off.html But %ENV population is expensive. Those who have moved to the Perl Apache API no longer need this extra %ENV population, and can gain by turning it Off. Scripts using the CGI.pm module require PerlSetupEnv On because that module relies on a properly populated CGI environment table. ___ JR Mayberry wrote: Perhaps I am a bit confused about how this should be working...but.. I have PerlSetupEnv set to Off in httpd.conf.. yet in this sample script running as an Apache::Registry script: #!/opt/bin/perl use Data::Dumper; my $r = Apache-request(); $r-send_http_header('text/plain'); print Dumper(\%ENV); its dumping out what appears to be a complete enviroment.. what gives, shouldnt this be empty? there are some other Apache::Registry scripts which havent been re-written to not use CGI.pm anymore, is it possible that 'use'ing CGI.pm;' is forcing this to be turned back on? -confused -- -- __ JR Mayberry e-Vend.net Corporation Programmer and Systems Administrator(888) 427-8743 x226 tel [EMAIL PROTECTED]http://www.e-vend.net The information in this message (including attachments) is confidential. If the reader of this message is not the intended recipient or an agent responsible for delivering it to the intended recipient, you are hereby notified that you have received this document in error and that any review, dissemination, distribution, or copying of this message is strictly prohibited. If you have received this communication in error, please notify us immediately by e-mail, and delete the original message. ***
Re: PerlSetupEnv Off not working
i assume thats a typo, i think PerlSetupEnv has been in since '96 have you seen this bug report? http://marc.theaimsgroup.com/?l=apache-modperlm=95867712412668w=2 might have something to do with it. sterling JR Mayberry wrote: Perhaps the problem is that the page reads... PerlSetupEnv Off is another optimization you might consider. This directive requires mod_perl 1.25 or later. but I run mod_perl 1.24, but http://perl.apache.org/dist/ makes no reference to mod_perl 1.25 ? John K Sterling wrote: check the guide: http://thingy.kcilink.com/modperlguide/performance/PerlSetupEnv_Off.html But %ENV population is expensive. Those who have moved to the Perl Apache API no longer need this extra %ENV population, and can gain by turning it Off. Scripts using the CGI.pm module require PerlSetupEnv On because that module relies on a properly populated CGI environment table. ___ JR Mayberry wrote: Perhaps I am a bit confused about how this should be working...but.. I have PerlSetupEnv set to Off in httpd.conf.. yet in this sample script running as an Apache::Registry script: #!/opt/bin/perl use Data::Dumper; my $r = Apache-request(); $r-send_http_header('text/plain'); print Dumper(\%ENV); its dumping out what appears to be a complete enviroment.. what gives, shouldnt this be empty? there are some other Apache::Registry scripts which havent been re-written to not use CGI.pm anymore, is it possible that 'use'ing CGI.pm;' is forcing this to be turned back on? -confused -- -- __ JR Mayberry e-Vend.net Corporation Programmer and Systems Administrator(888) 427-8743 x226 tel [EMAIL PROTECTED]http://www.e-vend.net The information in this message (including attachments) is confidential. If the reader of this message is not the intended recipient or an agent responsible for delivering it to the intended recipient, you are hereby notified that you have received this document in error and that any review, dissemination, distribution, or copying of this message is strictly prohibited. If you have received this communication in error, please notify us immediately by e-mail, and delete the original message. ***
Apache::Request param() problem?
Quick summary: Pulling parameters from a POST method using Apache::Request, largely to make it easier to deal with multiple value variables. The problem occurs if I have two variables, differentiated only by case (eg. wanthelp=something and wantHelp=somethingelse). Given the about pseudo-values, when using apr-param('wanthelp') OR apr-param('wantHelp') I get the same response, namely an array of two values something and somethingelse for each. Unfortunately, I have no control over what the variable names will be nor how many parameters they will have, so I must handle all possible cases. Am I missing some parameter to make this case-sensitive? Is there a better way to do this than using Apache::Request? Thanks! -- James Sheridan-Peters HealthCite.com [EMAIL PROTECTED]
PerlChildInitHandler not being called
I looked in the archives for this problem and, while mentioned, not definitive solution was apparantly found. I did notice the handler get called once, but only once: total server shutowns and restarts don't make it get called. I'm using Apache 1.3.12, mod_perl 1.24_01, Perl 5.6 under Linux. - Paul
Re: haunting variable values ? nested subs : cookies
we were seeing something similiar with old/variant cookie data, turned out to be the difference between $r-headers_out-add('Set-Cookie'=$cookie); and $r-headers_out-set('Set-Cookie'=$cookie); you show your code for generating the cookie, but not setting it, so I have no way of knowing if this is the same issue... - mark Don Fike wrote: Hello, I have a fairly simple/straight forward scripts which displays a form. I set a cookie to store name and email for the submitting user just in case they return. Yet when I set the cookie it gets set for all, from anywhere, not just me on my desktop. Sometimes a previous cookie pops up. The results aren't entirely consistent. I am unsure if this is a mod_perl problem, a nested subroutine problem, or a cookie problem. There are actually 3 scripts and a lib file that either display the form, process it, or do other process' not directly related to the form or cookies. I am using; Perl 5.6 mod_perl 1.24 CGI.pm 2.71 I set the cookie by; my %user; $user{'username'} = $q-param('author'); $user{'useremail'} = $q-param('email'); my $cookie = $q-cookie(-name='user', -value=\%user, -path='/threads', -expires='+1y'); I retrieve the cookie by; my %user; %user = $q-cookie('user'); I thought I might have had the nested subroutine problem discussed in the guide and moved my subroutines to a library file. This didn't help, but I likely copy/pasted the problem into my new lib.pl file. I know my description is rather cryptic but if you recognize a problem please let me know. Thanks, --- Don Fike UTK/ICL [EMAIL PROTECTED] 865-974-0293 ---
[ANNOUNCE] Apache::ProxyRewrite 0.10
The uploaded file Apache-ProxyRewrite-0.10.tar.gz has entered CPAN as file: $CPAN/authors/id/C/CG/CGILMORE/Apache-ProxyRewrite-0.10.tar.gz size: 10759 bytes md5: eb5a80cb7ded3e41705382b371ae5015 Apache::ProxyRewrite acts as a reverse-proxy that will rewrite URLs embedded in HTML documents per apache configuration directives. This module was written to allow multiple backend services with discrete URLs to be presented as one service and to allow the proxy to do authentication on the client's behalf. See ProxyRewrite.pm pod for detailed documentation. Enjoy, Christian - Christian Gilmore Infrastructure Tools Team Lead Web Multimedia Development Tivoli Systems, Inc.
[JOB WANTED] Perl Contractor Available
Hello Perl People. I'm available for Perl contracting, either on-site in the Bay Area or telecommute. I have extensive experience with Perl, DBI (Oracle and mySQL), web development, i18N, Solaris/Linux system administration (DNS, sendmail, qmail, Apache, etc.) Some experience with mod_perl application development. My CPAN id is JBRIGGS and the SourceForge projects I work on are picu and poprelay. Just send me an email. Thanks, James. -- Perl, Unicode and i18N FAQ http://rf.net/~james/perli18n.html Silicon Valley Perl Mongers http://rf.net/~sv-pm-org
modperler's needed, and hello again!
Modperlers..., Hello, this is Shane Nay, I used to post quite a bit. (Hello Josh, Stas, Peren, Doug, and many others of course) BTW Stas, $contributors=~/Shane/Shane Nay/;, and big Thanks . Well I'm posting now, (and resubscribed :) because I need someone to fill a modperl developement position. Our company (AgendaComputing.com) makes handheld computers that run linux. All of our software is GPL, and the website/backend code can be GPL as well..., so it's a good opportunity to join a company that really believes in Free software. Not to mention have a boss that joined a lot of community discussion here before, and knows modperl/perl well, or at least thinks he does. You can checkout our developement mailing list at dev.agendacomputing.com under community-lists. As you can see from that site..., we've got our work cut out for us in putting together the web infrastructure to bring the developers together. In addition to being a strong modperl developer, we're looking for someone who has good community ties, here or elsewhere. Having developed DocBook formatted documentation in the past is a plus. Someone willing to travel on occasion is a plus too, maybe every other month. Having experience configuring Apache, and other Unix services (read cvs, ssh, postfix/qmail) would be a big plus as well. Someone willing to relocate to Irvine is a plus as well, but if your qualifications are strong that could be overlooked and telecommuting may be an option. (Even if you relocate to Irvine a sometimes in sometimes telecommuted in could be worked out) If you're interested please forward your resume and web portfolio to me at [EMAIL PROTECTED] Or if you just want to say hey..., that's okay with me too. Well..., while I was on my epic honeymoon, I got a job offer to work with Agenda full time (worked with them p/t before that), and then wound up becoming the VP of RD. So I've been sucked away from modperl developement, and into the fast moving waters of the linux kernel developement on the VR4181 processor, and management (Ugh). Thanks, Shane.
Extracting values from variable
I have a space quoted string ... like this: apple orange watermelon How can I extract "apple", "orange" and "watermelon" one by one into a variable say $str to be processed? Koh Kok Wei Web Developer Dream Tree (M) Sdn. Bhd. Level 59, Tower 2, Petronas Twin Towers Kuala Lumpur City Centre 50088 Kuala Lumpur MALAYSIA Mobile: +60122310095 Tel: +6033820667 E-Mail: [EMAIL PROTECTED] http://www.biodata.com Global Leader in Network and Communications Security
Re: Extracting values from variable
This kind of question would be better asked on a general Perl list, not the mod_perl list. But here's one quick solution: while ($text =~ /(\w+)/g) { $str = $1; ... } The Perl Cookbook, or Mastering Regular Expressions, or Effective Perl Programming are all good books to learn this kind of thing. [EMAIL PROTECTED] (Kok Wei) wrote: I have a space quoted string ... like this: apple orange watermelon How can I extract "apple", "orange" and "watermelon" one by one into a variable say $str to be processed? Koh Kok Wei Web Developer Dream Tree (M) Sdn. Bhd. Level 59, Tower 2, Petronas Twin Towers Kuala Lumpur City Centre 50088 Kuala Lumpur MALAYSIA Mobile: +60122310095 Tel: +6033820667 E-Mail: [EMAIL PROTECTED] http://www.biodata.com Global Leader in Network and Communications Security ------ Ken Williams Last Bastion of Euclidity [EMAIL PROTECTED]The Math Forum
Apache::AuthCookieDBI BEGIN problems...??
Well been racking my brain against this one for awhile now.. so I figured that I would reach-out for some help ;) First let me say I am ashamed ... I twitled with the shiny bits. the following code in the Apache::AuthCookieDBI module does not work properly (for me). -- code -- BEGIN { my @keyfile_vars = grep { $_ =~ /DBI_SecretKeyFile$/ } keys %{ Apache-server-dir_config() }; foreach my $keyfile_var ( @keyfile_vars ) { my $keyfile = Apache-server-dir_config( $keyfile_var ); my $auth_name = $keyfile_var; $auth_name =~ s/DBI_SecretKeyFile$//; unless ( open( KEY, "$keyfile" ) ) { Apache::log_error( "Could not open keyfile for $auth_name in file $keyfile" ); } else { $SECRET_KEYS{ $auth_name } = KEY; close KEY; } } ### MY DIRTY HACK my $auth_name = "WhatEver"; $SECRET_KEYS{ $auth_name } = "thisishtesecretkeyforthisserver"; ### END MY DIRTY HACK } -- end code -- Note that without MY DIRTY LITTLE HACK it does not set those two variables. I am/was pretty sure that this somehow relates to "StackedHandlers" but I built mod_perl statically with ALL_HOOKS=1 EVERYTHING=1 it is Apache/1.3.14 (Unix) mod_perl/1.24_01 configured So after I set MY DIRTY LITTLE HACK. Things chug right along i bind to the database I authenticate against the db. until I/the module tries to set_cookie in the form Set-Cookie: Apache::AuthCookieDBI_WhatEver=jeff:2001-01-02-23-07-10:2001-01-02-23-12-10:2f8e147086c88e6771ac6751b5a1f25d; path=/; domain=.jeff So that makes me wonder if Date::Calc is installed correctly. i.e. he module uses Date::Calc. also note that it installed fine. I figured that the cookie problem could be a side effect of the firt problem I mentioned. ahh yes my config file is here for anyone who is intrested Any clue's..?? Thanks, Jeff - | Gender Diff's | | THOUGHT FOR THE DAY: Any married man should forget his mistakes. | | There's no use in two people remembering the same thing. | | | | --Anonymous | - | Jeff Sheffield| | [EMAIL PROTECTED]| | AIM=JeffShef | -
Re: Apache::AuthCookieDBI BEGIN problems...??
ahh yes my config file is here for anyone who is intrested oopse http://www.jspot.org/jeff/temp/custom.after Thanks, Jeff - | Gender Diff's | | THOUGHT FOR THE DAY: Any married man should forget his mistakes. | | There's no use in two people remembering the same thing. | | | | --Anonymous | - | Jeff Sheffield| | [EMAIL PROTECTED]| | AIM=JeffShef | -
Re: prob with dir_config at server startup
the per_dir_configs (i.e. Location PerlSetVar) are not accessabled from the Apache::Server. They are only accessable from Apache::Request::dir_config. It makes sense if you think about it - a per_dir config can be different for each Location. If you need any config values in a PerlInitHandler, you need to specify them outside the location tags. sterling "T.J. Mather" wrote: I'm having a problem accessing PerlSetVar variables with Apache-server-dir_config at server startup. I'm using the lastest versions of mod_perl 1.24_01 and apache (1.3.14). The problem occurs when I use PerlSetVar inside a Directory, Location or Files section: in httpd.conf: Location / PerlSetVar PKIT_ROOT /home/tjmather/Apache-PageKit/eg /Location perl startup code: my $pkit_root = Apache-server-dir_config('PKIT_ROOT'); # $pkit_root = undef But if I remove the Location directive, then it works fine: in httpd.conf: PerlSetVar PKIT_ROOT /home/tjmather/Apache-PageKit/eg perl startup code: my $pkit_root = Apache-server-dir_config('PKIT_ROOT'); # $pkit_root = '/home/tjmather/Apache-PageKit/eg' Any ideas?
cvs commit: modperl-2.0/todo possible_new_features.txt
dougm 01/01/02 11:48:47 Modified:..cvsignore todo possible_new_features.txt Added: pod .cvsignore Log: foo Revision ChangesPath 1.2 +1 -0 modperl-2.0/.cvsignore Index: .cvsignore === RCS file: /home/cvs/modperl-2.0/.cvsignore,v retrieving revision 1.1 retrieving revision 1.2 diff -u -r1.1 -r1.2 --- .cvsignore2000/04/25 06:00:02 1.1 +++ .cvsignore2001/01/02 19:48:40 1.2 @@ -1,3 +1,4 @@ Makefile blib pm_to_blib +scraps 1.1 modperl-2.0/pod/.cvsignore Index: .cvsignore === *.html 1.2 +2 -0 modperl-2.0/todo/possible_new_features.txt Index: possible_new_features.txt === RCS file: /home/cvs/modperl-2.0/todo/possible_new_features.txt,v retrieving revision 1.1 retrieving revision 1.2 diff -u -r1.1 -r1.2 --- possible_new_features.txt 2001/01/02 19:03:07 1.1 +++ possible_new_features.txt 2001/01/02 19:48:45 1.2 @@ -41,6 +41,8 @@ cloning/destroying when needed (rather than waiting for a request to trigger) +- use subpools per-callback/handler (might trim some memory bloat) + api: ---
cvs commit: modperl-2.0/pod modperl_design.pod
dougm 01/01/02 11:53:13 Added: pod modperl_design.pod Log: design doc Revision ChangesPath 1.1 modperl-2.0/pod/modperl_design.pod Index: modperl_design.pod === =head1 NAME mod_perl_design - notes on the design and goals of mod_perl-2.0 =head1 SYNOPSIS perldoc mod_perl_design =head1 DESCRIPTION notes on the design and goals of mod_perl-2.0 =head1 The Interpreter Pool this logic is only enabled if Perl is built with -Dusethreads otherwise, mod_perl will behave just as 1.xx, using a single interpreter, which is only useful if you're using the prefork mpm. when the server is started, a Perl interpreter is constructed, parsing any code specified in the configuration, just as 1.xx does. this interpreter is refered to as the "parent" interpreter. then, for the number of PerlInterpStart configured, a (thread-safe) clone of the parent interpreter is made (via perl_clone()) and added to a pool of interpreters. this clone copies any writeable data (e.g. the symbol table) and shares the compiled syntax tree. from my measurements of a startup.pl including a few random modules: use CGI (); use POSIX (); use IO (); use SelfLoader (); use AutoLoader (); use B::Deparse (); use B::Terse (); use B (); use B::C (); the parent adds 6M size to the process, each clone adds less than half that size, ~2.3M, thanks to the shared syntax tree. at request time, if any Perl*Handlers are configured, an available interpreter is selected from the pool. as there is a request_rec per thread, a pointer is saved in either the conn_rec-pool or request_rec-pool, which will be used for the lifetime of that request. for handlers that are called when threads are not running (PerlChild{Init,Exit}Handler), the parent interpreter is used. several configuration parameters control the interpreter pool management: =over 4 =item PerlInterpStart happens at startup time, the number of intepreters to clone =item PerlInterpMax if all running interpreters are in use, mod_perl will clone new interpreters to handle the request, up until this number of interpreters is reached. when Max is reached, mod_perl will block (via COND_WAIT()) until one becomes available (signaled via COND_SIGNAL()) =item PerlInterpMinSpare the minimum number of available interpreters this parameter will clone interpreters up to Max, before a request comes in =item PerlInterpMaxSpare mod_perl will throttle down the number of interpreters to this number as those in use become available =item PerlInterpMaxRequests the maximum number of requests an interpreter should serve, the interpreter is destroyed when the number is reached and replaced with a fresh one. =back =head2 tipool the interpreter pool is implemented in terms of a "tipool" (thread item pool), a generic api which can be reused for other data such as database connections. =head2 Virtual Hosts the interpreter management has been implemented in a way such that each VirtualHost can have its own parent Perl interpreter and/or mip. it is also possible to disable mod_perl for a given virtual host. =head2 Future at the moment, the interpreter pool is just a proof-of-concept implementation, to test that requests can be handled concurrently. the link-list implementation will certainly be optimized. and, some of the interpreter pool management might be moved into it's own thread. but the concept of mapping an interpreter clone to a thread will likely remain. a "garbage collector", which could also run in it's own thread, examining the padlists of idle interpreters and deciding to release and/or report large strings, array/hash sizes, etc., that Perl is keeping around as an optimization. =head1 Glue Code and Callbacks the code for hooking mod_perl in the various phases, including Perl*Handler directives is generated by the ModPerl::Code module. when a mod_perl hook is called for a given phase, the glue code has an index into the array of handlers, so it knows to return DECLINED right away if no handlers are configured, without entering the Perl runtime as 1.xx did. the handlers are also now stored in an ap_array_header_t, which is might lighter and faster than using a Perl AV, as 1.xx did. and again, keeps us out of the Perl runtime until we're sure we need to be there. Perl*Handlers are now "compiled", that is, the various forms of: PerlHandler MyModule (defaults to MyModule::handler or MyModule-handler) PerlHandler MyModule-handler PerlHandler $MyObject-handler PerlHandler 'sub { print "foo\n" }' are only parsed once, unlike 1.xx which parsed everytime the handler was used. there will also be an option to