Re: Runaways
On Mon, 29 Jan 2001, Robert Landrum wrote: I have some very large httpd processes (35 MB) running our mod_perl are not freeing memory when httpd doing cleanup phase. Me too :). Use the MaxRequestPerChild directive in httpd.conf. After my investigations it seems to be only way to build a normal system. There are no 100% right worked ways, supplied with apache. mod_status can provide you some info, but... On Solaris 2.5.1, 7, 8 you can use /usr/proc/bin/pmap to build a map of the httpd process. application software. Every so often, one of the processes will grow infinitly large, consuming all available system resources. After 300 seconds the process dies (as specified in the config file), and the system usually returns to normal. Is there any way to determine what is eating up all the memory? I need to pinpoint this to a particular module. I've tried coredumping during the incident, but gdb has yet to tell me anything useful. I was actually playing around with the idea of hacking the perl source so that it will change $0 to whatever the current package name, but I don't know that this will translate back to mod perl correctly, as $0 is the name of the configuration from within mod perl. Has anyone had to deal with this sort of problem in the past? Robert Landrum Vasily Petrushin +7 (095) 2508363 http://www.interfax.ru mailto:[EMAIL PROTECTED]
Re: mod_perl and DSO
What would you say with shared core? The unix server can use DSO and the DSO servlet module works fine Francis - Original Message - From: "Jens-Uwe Mager" [EMAIL PROTECTED] To: "Francis" [EMAIL PROTECTED] Cc: [EMAIL PROTECTED] Sent: Monday, January 29, 2001 5:53 PM Subject: Re: mod_perl and DSO On Mon, Jan 29, 2001 at 05:26:46PM +0100, Francis wrote: I'm running Apache 1.3.12 on my unix server (RM400 Siemens) with Sinix 5.44. Perl 5.00404 is installed The DSO module for servlets is also installed and works fine. I try to install the DSO mod_perl 1.24 with ./configure --with-apxs=/usr/./apx follow by make and make install in the subdirectory apaci of mod_perl. when I try ./apachectl configtest I receive the error msg Syntax error in line 236 of /usr/httpd.conf: Cannot load /usr/../libexec/libperl.so into server: ld.so: /usr/./httpd: relocation error: symbol not found: Perl_incgv - the line 236 is : LoadModule perl_module libexec/libperl.so - libperl.so is correct and in the right place - apache works fine without the 236 line in httpd.conf I would suspect that on plain old S5R4 machines you must build perl with a shared core. -- Jens-Uwe Mager HELIOS Software GmbH Steinriede 3 30827 Garbsen Germany Phone: +49 5131 709320 FAX: +49 5131 709325 Internet: [EMAIL PROTECTED]
RE: Advice needed. (web app. performance)
What about this idea: open N 'ispell -a' processes for writing and reading at httpd start up, save their descriptors into an array in some Perl module and then mark decriptors in the table then as "busy" or "idle". But the question is how to share this dynamicly modified table among all httpd processes? .. / vlad
ApacheCon session selection complete (fwd)
FYI -- Forwarded message -- Date: Tue, 30 Jan 2001 06:42:55 -0500 From: Rodent of Unusual Size [EMAIL PROTECTED] To: ApacheCon Announcements [EMAIL PROTECTED] Subject: ApacheCon session selection complete We've finished the session selection process, and out of 165 submissions (!) we have chosen 74 sessions for ApacheCon 2001 in April. The session details and schedule will be available on the Web site within the next couple of days, at http://ApacheCon.Com/2001/US/html/sessions.html People who submitted proposals will be receiving detailed information about the status of their submissions either to-day or to-morrow. The registration price schedule will be on this site later to-day, at http://ApacheCon.Com/2001/US/html/registry.html and registration will be opening either to-day or to-morrow. A message with more details will be sent when registration opens. The BOF ('Birds of a Feather' ad-hoc sessions) submission form is now available; log on to the ApacheCon site at the following URL to access it: http://ApacheCon.Com/html/login.html When BOF scheduling is done a few days before (and during) the conference, only those BOFs whose submitters are actually registered will be put on the schedule. -- #kenP-)} Ken Coarhttp://Golux.Com/coar/ Apache Software Foundation http://www.apache.org/ "Apache Server for Dummies" http://Apache-Server.Com/ "Apache Server Unleashed" http://ApacheUnleashed.Com/ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Advice needed. (web app. performance)
On Tue, 30 Jan 2001, Vladislav Safronov wrote: Try Unix sockets What about this idea: open N 'ispell -a' processes for writing and reading at httpd start up, save their descriptors into an array in some Perl module and then mark decriptors in the table then as "busy" or "idle". But the question is how to share this dynamicly modified table among all httpd processes? .. / vlad Vasily Petrushin +7 (095) 2508363 http://www.interfax.ru mailto:[EMAIL PROTECTED]
Hard times with apache config
Hello, we use freebsd-4.2 and i tried to install an apache server with ssl, php4 and mod_perl compiled statically in (why? to keep some crufty php scripts going, and to be able to load embperl on server startup). My orientation was the excellent mod_perl documentation but .. perl Makefile.PL seem not to honor the APACHE_SRC=.../... switch. I was asked again and again ... I used the FreeBSD-Layout, but somewhere somehow there came a duplication of the apache path into existence. The httpd server wanted to read /usr/local/etc/apache/etc/apache/httpd.conf. When configuring with --show-layout it looked like it should. My solution was to edit the apaci script by hand? Is this a known issue, addressed in mod_perl-1.25? -- Fritz Heinrichmeyer mailto:[EMAIL PROTECTED] FernUniversitaet Hagen, LG ES, 58084 Hagen (Germany) tel:+49 2331/987-1166 fax:987-355 http://www-es.fernuni-hagen.de/~jfh
RE: [DIGEST] mod_perl digest 01/21/2001
-- mod_perl digest January 21, 2001 - January 27, 2001 -- Recent happenings in the mod_perl world... Features o mod_perl status o cvs patches o mailing list highlights o news o FAQ of the week o links mod_perl status o mod_perl - stable: 1.25 (released January 29, 2001) [1] - development: 1.25_01-dev [2] o Apache - stable: 1.3.17 (released January 29, 2001) [3] - development: 1.3.18-dev [4] o Perl - stable: 5.6 (released March 23, 2000) [5] - development: 5.7 [6] cvs patches o Use unsigned short rather than short for Apache::Server-port [7] o Apache::Server-loglevel can now be modified [8] o DSO support for hpux with native cc/lda [9] o Fix for the Config.pm overriding mechanism [10] o Disable port test in api.pl [11] o Two tweaks for 5.004_04 [12] [13] o avoid 'prototype mismatch' warnings in Apache::PerlRun::flush_namespace [14] [15] mailing list highlights o The wait is over - mod_perl 1.25 is here [16] o There is a bug in $r-args() that causes query strings like ?arg1arg2=val2 to improperly map when assigned to a hash [17] o Long thread of the week goes to the discussion of the merits of pseudo-hashes [18] o TCP5 Call for papers is drawing to a close [19] o Apparently, AOL is occasionally sending bad headers in the form of Content-Type: applicationontent-Type: [20] news o Apache 1.3.17 was just released [21]. New features of note: - Add a new LogFormat directive, %c, that will log connection status at the end of the response as follows: 'X' - connection aborted before the response completed '+' - connection may be kept-alive by the server '-' - connection will be closed by the server - Fix Content-Length calculation when doing Range header processing. This makes PDF byteserving work again - Make cgi-bin work as a regular directory when using mod_vhost_alias with no VirtualScriptAlias directives - Several mod_rewrite fixes, including variable look-ahead and nested RewriteMap lookups - More Windows and NetWare patches than you can shake a stick at see Changes [22] for a full list of new features and bug fixes FAQ of the week o I'm trying to make mod_perl with Apache 1.3.14 (or later), but see the error: "Apache Version 1.3.0 required, aborting..." Using mod_perl with Apache 1.3.14 or 1.3.17 requires an upgrade to at least mod_perl 1.24_01 (or some hacking around). Get the latest version from the mod_perl distribution page [23]. links o The Apache/Perl Integration Project [24] o mod_perl documentation [25] o mod_perl modules on CPAN [26] o mod_perl homepage [27] o mod_perl news and advocacy [28] o mod_perl list archives [29] [30] 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=98040666901678w=2 [8] http://marc.theaimsgroup.com/?l=apache-modperl-cvsm=98040860504352w=2 [9] http://marc.theaimsgroup.com/?l=apache-modperl-cvsm=98048908828988w=2 [10] http://marc.theaimsgroup.com/?l=apache-modperl-cvsm=98052738318946w=2 [11] http://marc.theaimsgroup.com/?l=apache-modperl-cvsm=98053430207313w=2 [12] http://marc.theaimsgroup.com/?l=apache-modperl-cvsm=98079192526172w=2 [13] http://marc.theaimsgroup.com/?l=apache-modperl-cvsm=98079785210916w=2 [14] http://marc.theaimsgroup.com/?l=apache-modperl-cvsm=98080509931383w=2 [15] http://marc.theaimsgroup.com/?l=apache-modperl-cvsm=98080685903506w=2 [16] http://forum.swarthmore.edu/epigone/modperl/swellimplol [17] http://forum.swarthmore.edu/epigone/modperl/quulendzerm [18] http://forum.swarthmore.edu/epigone/modperl/quehwhehdul [19] http://forum.swarthmore.edu/epigone/modperl/fartunspang [20] http://forum.swarthmore.edu/epigone/modperl/primpbilste [21] http://marc.theaimsgroup.com/?l=apache-announcem=98082142003681w=2 [22] http://www.apache.org/dist/CHANGES [23] http://perl.apache.org/dist/mod_perl-1.25.tar.gz [24] http://perl.apache.org [25] http://perl.apache.org/#docs [26] http://www.cpan.org/modules/by-module/Apache/ [27] http://www.modperl.com [28] http://www.take23.org [29] http://forum.swarthmore.edu/epigone/modperl/ [30] http://marc.theaimsgroup.com/?l=apache-modperlr=1w=2
[RFC] mod_perl Digest path...
sorry again for all the confusion with this morning's digest (I do code more carefully than I write, really I do...) this does present the opportune time to ask the list about the future of this digest... currently, the digest does not have a HTML home. Matt at take23.org has graciously agreed to host it and work on the XML stylesheets required for the site. This is a very good thing - but unfortunately, there is no easy way to derive a decent plain text version from an XML base... thus, the move to take23.org may mean that the digest no longer appears on the list in plaintext, but merely as a posting with a link to the current version... how does this strike everyone? --Geoff
Re: [RFC] mod_perl Digest path...
I think I personally wouldn't be that much informed as now. I'm too lazy surfer. Don't know bout the others though. But once a month I have to check that page then to be informed :P I think the new versions would show up in list letter's headings too. Tervisi, Antti how does this strike everyone?
Re: [RFC] mod_perl Digest path...
Geoffrey Young [EMAIL PROTECTED] writes: currently, the digest does not have a HTML home. Matt at take23.org has graciously agreed to host it and work on the XML stylesheets required for the site. This is a very good thing - but unfortunately, there is no easy way to derive a decent plain text version from an XML base... thus, the move to take23.org may mean that the digest no longer appears on the list in plaintext, but merely as a posting with a link to the current version... how does this strike everyone? What if... Instead of HTML, you write it in some simplified XML? Then Matt can transform it into HTML, and a simple script can make it plaintext for the mailing list, and maybe even automate the mailing? I, for one, enjoy receiving it in email. I'm sure there are plenty of us who would be glad to help with an XML to plaintext spitter-outter (very technical term) that would be suitable for an email version. Just a thought. Chip -- Chip Turner [EMAIL PROTECTED] ZFx, Inc. www.zfx.com PGP key available at wwwkeys.us.pgp.net
Re: [RFC] mod_perl Digest path...
My vote is to keep a plain text version available. I don't use an html-capable mail reader, so sending a link normally means "I'll save this and read it later when I have time", which often means I'll delete it three weeks later in cleaning out my 'READ' mail file... I like the text version because I can quickly scan it to see if there are any interesting topics that I missed during the week. My 2 cents... Steve On Tue, 30 Jan 2001, Geoffrey Young wrote: sorry again for all the confusion with this morning's digest (I do code more carefully than I write, really I do...) this does present the opportune time to ask the list about the future of this digest... currently, the digest does not have a HTML home. Matt at take23.org has graciously agreed to host it and work on the XML stylesheets required for the site. This is a very good thing - but unfortunately, there is no easy way to derive a decent plain text version from an XML base... thus, the move to take23.org may mean that the digest no longer appears on the list in plaintext, but merely as a posting with a link to the current version... how does this strike everyone? --Geoff =-=-=-=-=-=-=-=-=-=- My God! What have I done? -=-=-=-=-=-=-=-=-=-= Steve Reppucci [EMAIL PROTECTED] | Logical Choice Software http://logsoft.com/ |
Re: [RFC] mod_perl Digest path...
but unfortunately, there is no easy way to derive a decent plain text version from an XML base... Hmmm. converting one text format to another. Sounds like a job for perl ;-) Seriously - it should be possible to create a XSLT stylesheet that will output plain-text, then use XML::Sablotron or one of the other processors to generate the text from the XML. $0.02 Simon. __ This document should only be read by those persons to whom it is addressed and is not intended to be relied upon by any person without subsequent written confirmation of its contents. Accordingly, our company disclaim all responsibility and accept no liability (including in negligence) for the consequences for any person acting, or refraining from acting, on such information prior to the receipt by those persons of subsequent written confirmation. If you have received this E-mail message in error, please notify us immediately by telephone. Please also destroy and delete the message from your computer. Any form of reproduction, dissemination, copying, disclosure, modification, distribution and/or publication of this E-mail message is strictly prohibited.
Re: [RFC] mod_perl Digest path...
Hi Geoff, On Tue, 30 Jan 2001, Geoffrey Young wrote: this does present the opportune time to ask the list about the future of this digest... unfortunately, there is no easy way to derive a decent plain text version from an XML base... !!!??? That's just plain ridiculous. thus, the move to take23.org may mean that the digest no longer appears on the list in plaintext, but merely as a posting with a link to the current version... how does this strike everyone? YUCK!!! 73, Ged.
Re: [RFC] mod_perl Digest path...
On Tue, 30 Jan 2001, [EMAIL PROTECTED] wrote: but unfortunately, there is no easy way to derive a decent plain text version from an XML base... Hmmm. converting one text format to another. Sounds like a job for perl ;-) Seriously - it should be possible to create a XSLT stylesheet that will output plain-text, then use XML::Sablotron or one of the other processors to generate the text from the XML. Sadly thats not the case. XSLT is not well suited to the task of outputting text documents. It has no facilities for doing things like page widths, indenting, bullet points, etc, for plain text. I have tried this, with the source of the digests being in XHTML, but its harder than it first sounds. You really need to convert to a text format that does have all of these features, such as *roff... -- Matt/ /||** Director and CTO ** //||** AxKit.com Ltd ** ** XML Application Serving ** // ||** http://axkit.org ** ** XSLT, XPathScript, XSP ** // \\| // ** Personal Web Site: http://sergeant.org/ ** \\// //\\ // \\
Re: [RFC] mod_perl Digest path...
Sadly thats not the case. XSLT is not well suited to the task of outputting text documents. It has no facilities for doing things like page widths, indenting, bullet points, etc, for plain text. I have tried this, with the source of the digests being in XHTML, but its harder than it first sounds. You really need to convert to a text format that does have all of these features, such as *roff... Could XSLT output POD ? (or originate in pod use pod::xml ?) Then use Pod::Text to format it ? Simon. __ This document should only be read by those persons to whom it is addressed and is not intended to be relied upon by any person without subsequent written confirmation of its contents. Accordingly, our company disclaim all responsibility and accept no liability (including in negligence) for the consequences for any person acting, or refraining from acting, on such information prior to the receipt by those persons of subsequent written confirmation. If you have received this E-mail message in error, please notify us immediately by telephone. Please also destroy and delete the message from your computer. Any form of reproduction, dissemination, copying, disclosure, modification, distribution and/or publication of this E-mail message is strictly prohibited.
Anyone using virtual server for mod_perl hosts?
hi, due to some fairly complex issues (money, or lack thereof), I am considering turning a mod_perl server from co-location into a 'virtual server' service, like Verio offers. Far from asking if it is a good solution (I know it is not) I'd like to know if its feasible. I have been managing remote co-located servers for quite a while, so I am already used to the impotence of not being able to kick the box when it misbehaves. In fact, last time I got really angry at a box I got a my fist cut, hitting it. So remote boxen might turn out to be healthier for my temper ;) Is anyone using a 'virtual server' succesfully? Or have a horror story? Know of companies other than verio? Oh! and before anyone points it out, yes, it low -- low -- low traffic. The current server never gets more than 0.5 load average. Martin
Re: [RFC] mod_perl Digest path...
[ date ] 2001/01/30 | Tuesday | 01:50 PM [ author ] G.W. Haywood [EMAIL PROTECTED] unfortunately, there is no easy way to derive a decent plain text version from an XML base... !!!??? That's just plain ridiculous. I agree. If there's going to be an HTML version of it somewhere along the line, couldn't a plain text version be done by doing something like: w3m -dump -T text/html whatever.html plaintext XML - X?HTML - plaintext right? Am I missing something?
Re: [RFC] mod_perl Digest path...
* at 30/01 14:01 + [EMAIL PROTECTED] said: Sadly thats not the case. XSLT is not well suited to the task of outputting text documents. It has no facilities for doing things like page widths, indenting, bullet points, etc, for plain text. I have tried this, with the source of the digests being in XHTML, but its harder than it first sounds. You really need to convert to a text format that does have all of these features, such as *roff... Could XSLT output POD ? (or originate in pod use pod::xml ?) Then use Pod::Text to format it ? er, this is just some off the top of my head stuff but i seem to recall that axkit can use the template toolkit and that the template toolkit has assorted text formatting plugins so could something not be done via this? (i should say that i've not used axkit or the relevant plugins but i do recall seing something about using TT with axkit at YAPC::Europe last year) struan __ This document should only be read by those persons to whom it is addressed and is not intended to be relied upon by any person without subsequent written confirmation of its contents. Accordingly, our company disclaim all responsibility and accept no liability (including in negligence) for the consequences for any person acting, or refraining from acting, on such information prior to the receipt by those persons of subsequent written confirmation. If you have received this E-mail message in error, please notify us immediately by telephone. Please also destroy and delete the message from your computer. Any form of reproduction, dissemination, copying, disclosure, modification, distribution and/or publication of this E-mail message is strictly prohibited. -- Struan Donald mailto:[EMAIL PROTECTED] Code Flunky, 365 Plc. http://www.365corp.com/
Repost with typos corrected--Instance variable inheritance
"Christopher L. Everett" [EMAIL PROTECTED] writes: sub handler ($$) { my ($self, $q); my $r = Apache::Request-new($q); # send headers here print $self-name; $self is a string ("simian"), not an object ref; for this line to work, you need to make one by calling "new" somewhere, or guard against misuse via: print $self-name if ref $self; HTH -- Joe Schaefer
Re: Anyone using virtual server for mod_perl hosts?
On Tue, 30 Jan 2001, Martin Langhoff wrote: hi, due to some fairly complex issues (money, or lack thereof), I am considering turning a mod_perl server from co-location into a 'virtual server' service, like Verio offers. Check Berkman's stories about mod_perl hosting at http://apachetoday.com. There was some links to mod_perl hosting providers. Far from asking if it is a good solution (I know it is not) I'd like to know if its feasible. I have been managing remote co-located servers for quite a while, so I am already used to the impotence of not being able to kick the box when it misbehaves. In fact, last time I got really angry at a box I got a my fist cut, hitting it. So remote boxen might turn out to be healthier for my temper ;) Is anyone using a 'virtual server' succesfully? Or have a horror story? Know of companies other than verio? Oh! and before anyone points it out, yes, it low -- low -- low traffic. The current server never gets more than 0.5 load average. Martin Vasily Petrushin +7 (095) 2508363 http://www.interfax.ru mailto:[EMAIL PROTECTED]
Re: Anyone using virtual server for mod_perl hosts?
Bekman, I'm sorry. Excuse me, Stas... On Tue, 30 Jan 2001, Martin Langhoff wrote: hi, due to some fairly complex issues (money, or lack thereof), I am considering turning a mod_perl server from co-location into a 'virtual server' service, like Verio offers. Far from asking if it is a good solution (I know it is not) I'd like to know if its feasible. I have been managing remote co-located servers for quite a while, so I am already used to the impotence of not being able to kick the box when it misbehaves. In fact, last time I got really angry at a box I got a my fist cut, hitting it. So remote boxen might turn out to be healthier for my temper ;) Is anyone using a 'virtual server' succesfully? Or have a horror story? Know of companies other than verio? Oh! and before anyone points it out, yes, it low -- low -- low traffic. The current server never gets more than 0.5 load average. Martin Vasily Petrushin +7 (095) 2508363 http://www.interfax.ru mailto:[EMAIL PROTECTED]
Re: [RFC] mod_perl Digest path...
On Tue, 30 Jan 2001, John BEPPU wrote: [ date ] 2001/01/30 | Tuesday | 01:50 PM [ author ] G.W. Haywood [EMAIL PROTECTED] unfortunately, there is no easy way to derive a decent plain text version from an XML base... !!!??? That's just plain ridiculous. I agree. If there's going to be an HTML version of it somewhere along the line, couldn't a plain text version be done by doing something like: w3m -dump -T text/html whatever.html plaintext XML - X?HTML - plaintext right? Am I missing something? Not at all. I guess I should have qualified it with a "using just XML stylesheets". Both XSLT and XPathScript output the whitespace in a document verbatim, which is a real pain for a plain text version. Yes I can do either the above, or output POD, or output *roff. All of these are totally possible, just more work, and we were only opening up the possibility of having the digest as a link, not saying its going to happen. But its less likely to happen the harder it is to do. Mailing a link is easy, converting to a format that looks almost exactly like the current version Geoff sends out is a bit harder (yes, I can spawn lynx, which gets most of the way there, but its all coding that has to be done). I mean, we're all web developers right? If you don't have a browser running the majority of your day then something is seriously up (or you're out of work :-). And we want the digest more widely viewed than just this list - not everyone interested in mod_perl development subscribes here, and take23 is the right forum to host the digest (IMHO). If someone wants to do the work it takes to make Geoff's life easy for generating the digest in both HTML and plain text then please volunteer (and please don't volunteer unless you really mean it - we get lots of volunteers for take23 work that barely ever turn out to be people who can afford the time). But it has to be as easy as uploading one version, and the take23 CMS automatically sending out an email to the list. Anything else isn't worth it. And take23 uses XML, so bear that in mind (XHTML is the format we're happiest with). -- Matt/ /||** Director and CTO ** //||** AxKit.com Ltd ** ** XML Application Serving ** // ||** http://axkit.org ** ** XSLT, XPathScript, XSP ** // \\| // ** Personal Web Site: http://sergeant.org/ ** \\// //\\ // \\
Re: Repost with typos corrected--Instance variable inheritance
[EMAIL PROTECTED] (Joe Schaefer) wrote: "Christopher L. Everett" [EMAIL PROTECTED] writes: sub handler ($$) { my ($self, $q); my $r = Apache::Request-new($q); # send headers here print $self-name; $self is a string ("simian"), not an object ref; for this line to work, you need to make one by calling "new" somewhere, or guard against misuse via: print $self-name if ref $self; Technically there's nothing wrong with that, it'll call the name() method of the "simian" class. It may not be what you want to do, but it's legal. The error is that the name() method doesn't expect to be called as a class method, it's an object method. So as Joe points out, you could add the following line: sub handler ($$) { my ($self, $q); - $self = $self-new(); my $r = Apache::Request-new($q); # send headers here print $self-name; return OK; } ------ Ken Williams Last Bastion of Euclidity [EMAIL PROTECTED]The Math Forum
Re: Repost with typos corrected--Instance variable inheritance
On Tue, 30 Jan 2001, Ken Williams wrote: [EMAIL PROTECTED] (Joe Schaefer) wrote: "Christopher L. Everett" [EMAIL PROTECTED] writes: sub handler ($$) { my ($self, $q); my $r = Apache::Request-new($q); # send headers here print $self-name; $self is a string ("simian"), not an object ref; for this line to work, you need to make one by calling "new" somewhere, or guard against misuse via: print $self-name if ref $self; Technically there's nothing wrong with that, it'll call the name() method of the "simian" class. It may not be what you want to do, but it's legal. The error is that the name() method doesn't expect to be called as a class method, it's an object method. So as Joe points out, you could add the following line: sub handler ($$) { my ($self, $q); - $self = $self-new(); ??? 8-[ ] who is $self-new() ??? $self = PackageName-new(); my $r = Apache::Request-new($q); # send headers here print $self-name; return OK; } ------ Ken Williams Last Bastion of Euclidity [EMAIL PROTECTED]The Math Forum Vasily Petrushin +7 (095) 2508363 http://www.interfax.ru mailto:[EMAIL PROTECTED]
Re: [RFC] mod_perl Digest path...
At 13:54 30/01/2001 +, Matt Sergeant wrote: On Tue, 30 Jan 2001, [EMAIL PROTECTED] wrote: Seriously - it should be possible to create a XSLT stylesheet that will output plain-text, then use XML::Sablotron or one of the other processors to generate the text from the XML. Sadly thats not the case. XSLT is not well suited to the task of outputting text documents. It has no facilities for doing things like page widths, indenting, bullet points, etc, for plain text. I have tried this, with the source of the digests being in XHTML, but its harder than it first sounds. You really need to convert to a text format that does have all of these features, such as *roff... That's true, when XSLT outputs texts, what it's really doing is outputting a tree from which all non text nodes have disappeared. That can't give you much formatting unless you are very careful with your xsl:text. But then, filtering that through Text::Autoformat should yield something sensible, and probably good. -- robin b. "Oh no not again !" said the bowl of petunias
Re: [RFC] mod_perl Digest path...
On Tue, 30 Jan 2001, Robin Berjon wrote: At 13:54 30/01/2001 +, Matt Sergeant wrote: On Tue, 30 Jan 2001, [EMAIL PROTECTED] wrote: Seriously - it should be possible to create a XSLT stylesheet that will output plain-text, then use XML::Sablotron or one of the other processors to generate the text from the XML. Sadly thats not the case. XSLT is not well suited to the task of outputting text documents. It has no facilities for doing things like page widths, indenting, bullet points, etc, for plain text. I have tried this, with the source of the digests being in XHTML, but its harder than it first sounds. You really need to convert to a text format that does have all of these features, such as *roff... That's true, when XSLT outputs texts, what it's really doing is outputting a tree from which all non text nodes have disappeared. That can't give you much formatting unless you are very careful with your xsl:text. But then, filtering that through Text::Autoformat should yield something sensible, and probably good. Unfortunately my version of autoformat (just installed fresh from CPAN) doesn't seem to do a thing with the output I can produce (which is fairly close, but damned ugly in places, so I don't know what I'm doing wrong with it. I was just using: xpathscript style.xps filename.xml | perl -MText::Autoformat -e autoformat (the docs say this should work, but it doesn't reformat anything). -- Matt/ /||** Director and CTO ** //||** AxKit.com Ltd ** ** XML Application Serving ** // ||** http://axkit.org ** ** XSLT, XPathScript, XSP ** // \\| // ** Personal Web Site: http://sergeant.org/ ** \\// //\\ // \\
Re: [RFC] mod_perl Digest path...
On Tue, 30 Jan 2001, Robin Berjon wrote: At 13:54 30/01/2001 +, Matt Sergeant wrote: On Tue, 30 Jan 2001, [EMAIL PROTECTED] wrote: Seriously - it should be possible to create a XSLT stylesheet that will output plain-text, then use XML::Sablotron or one of the other processors to generate the text from the XML. Sadly thats not the case. XSLT is not well suited to the task of outputting text documents. It has no facilities for doing things like page widths, indenting, bullet points, etc, for plain text. I have tried this, with the source of the digests being in XHTML, but its harder than it first sounds. You really need to convert to a text format that does have all of these features, such as *roff... That's true, when XSLT outputs texts, what it's really doing is outputting a tree from which all non text nodes have disappeared. That can't give you much formatting unless you are very careful with your xsl:text. But then, filtering that through Text::Autoformat should yield something sensible, and probably good. Looks like I can get a lot closer with Pod::Text, the sad thing is that Pod::Text can't read from anything but a file. *sigh* -- Matt/ /||** Director and CTO ** //||** AxKit.com Ltd ** ** XML Application Serving ** // ||** http://axkit.org ** ** XSLT, XPathScript, XSP ** // \\| // ** Personal Web Site: http://sergeant.org/ ** \\// //\\ // \\
Re: [RFC] mod_perl Digest path...
Matt Sergeant [EMAIL PROTECTED] writes: On Tue, 30 Jan 2001, Robin Berjon wrote: At 13:54 30/01/2001 +, Matt Sergeant wrote: On Tue, 30 Jan 2001, [EMAIL PROTECTED] wrote: Seriously - it should be possible to create a XSLT stylesheet that will output plain-text, then use XML::Sablotron or one of the other processors to generate the text from the XML. Sadly thats not the case. XSLT is not well suited to the task of outputting text documents. It has no facilities for doing things like page widths, indenting, bullet points, etc, for plain text. I have tried this, with the source of the digests being in XHTML, but its harder than it first sounds. You really need to convert to a text format that does have all of these features, such as *roff... That's true, when XSLT outputs texts, what it's really doing is outputting a tree from which all non text nodes have disappeared. That can't give you much formatting unless you are very careful with your xsl:text. But then, filtering that through Text::Autoformat should yield something sensible, and probably good. Unfortunately my version of autoformat (just installed fresh from CPAN) doesn't seem to do a thing with the output I can produce (which is fairly close, but damned ugly in places, so I don't know what I'm doing wrong with it. I was just using: xpathscript style.xps filename.xml | perl -MText::Autoformat -e autoformat (the docs say this should work, but it doesn't reformat anything). That should just reformat the first paragraph it sees. Try ... | perl -MText::Autoformat -e 'autoformat *STDIN, {all = 1}' -- Piers
RE: [RFC] mod_perl Digest path...
Looks like I can get a lot closer with Pod::Text, the sad thing is that Pod::Text can't read from anything but a file. *sigh* That's what /proc/self/fd/0 in Linux is for. :-) $ ps | cat /proc/self/fd/0 PID TTY TIME CMD 16085 pts/600:00:00 bash 18434 pts/600:00:00 ps 18435 pts/600:00:00 cat This works as long as the reader does not need to seek in the file, which I doubt will be a problem if a perl module is doing the reading. You'll probably need to have Tod::Text run in a different process, but at least you can now have it as part of a pipe. David Harris President, DRH Internet Inc. [EMAIL PROTECTED] http://www.drh.net/
RE: [RFC] mod_perl Digest path...
On Tue, 30 Jan 2001, David Harris wrote: Looks like I can get a lot closer with Pod::Text, the sad thing is that Pod::Text can't read from anything but a file. *sigh* That's what /proc/self/fd/0 in Linux is for. :-) $ ps | cat /proc/self/fd/0 PID TTY TIME CMD 16085 pts/600:00:00 bash 18434 pts/600:00:00 ps 18435 pts/600:00:00 cat This works as long as the reader does not need to seek in the file, which I doubt will be a problem if a perl module is doing the reading. You'll probably need to have Tod::Text run in a different process, but at least you can now have it as part of a pipe. This is no help as I would have to fork to use this (if I'm reading it properly). I'd rather write to a locked file... :) -- Matt/ /||** Director and CTO ** //||** AxKit.com Ltd ** ** XML Application Serving ** // ||** http://axkit.org ** ** XSLT, XPathScript, XSP ** // \\| // ** Personal Web Site: http://sergeant.org/ ** \\// //\\ // \\
Passing data among handlers
Perhaps I've missed it, but is there a better way than the "notes" mechanism to pass data among handlers? The "notes" mechanism not only requires the notes to be scalars, but, apparantly, said scalars must also be simple strings, i.e., no binary data crammed into a scalar. Better ideas? Odds of enhancing the "notes" mechanism? - Paul
Repost: Anyone using virtual server for mod_perl hosts?
As many people understood I mean some kind of virtual host service, I would like to restate my question. There are companies (Verio at least) offering a 'virtual machine' running a virtualized OS. Verio is offering NetBSD and Solaris. They have a seriouly large iron where many virtual machines run, each virtual machine gets a share of CPU, HD and RAM resources, an at least an IP address. In there is a full OS, and you get to be root for about $150 a month. It's a cheap alternative to co-location, a middle ground between a good virtual hosting service and owning a box. You can run your own MTA, compile whatever the hell you want, etc, although they offer a bunch of services out-of-the-box and have a lot of useful --if annoying-- cron jobs rotating your logs, monitoring the temperature of your daemons, feeding the dog and whatnot. Of course, you get to share resources with a bunch of other customers. It seems a great environment to set up a low traffic / highly customized server, like apache+mod_perl. Now, I know and understand the services they offer, but I have never actually used one with mod_perl. Now, has anyone tried this services? Do I have to worry about anything? Why didn't Stas list them in his article? -- they don't appear in the Guide either -- Do they have a fundamental or practical flaw I can't see? Martin
RE: Passing data among handlers
-Original Message- From: Paul J. Lucas [mailto:[EMAIL PROTECTED]] Sent: Tuesday, January 30, 2001 12:55 PM To: [EMAIL PROTECTED] Subject: Passing data among handlers Perhaps I've missed it, but is there a better way than the "notes" mechanism to pass data among handlers? The "notes" mechanism not only requires the notes to be scalars, but, apparantly, said scalars must also be simple strings, i.e., no binary data crammed into a scalar. try pnotes() - it's documented in man Apache --Geoff Better ideas? Odds of enhancing the "notes" mechanism? - Paul
Re: Passing data among handlers
Paul J. Lucas ([EMAIL PROTECTED]) said something to this effect on 01/30/2001: Perhaps I've missed it, but is there a better way than the "notes" mechanism to pass data among handlers? The "notes" mechanism not only requires the notes to be scalars, but, apparantly, said scalars must also be simple strings, i.e., no binary data crammed into a scalar. Better ideas? Odds of enhancing the "notes" mechanism? Paul, Use pnotes rather that notes; it let's you pass arbitrary Perl data structures around. The only caveat about pnotes is that you can't share data with non-Perl handlers like you can with notes. (darren) -- ...but what is ideology but the rationalisation of a vested interest?
Development Environment
I was wondering if anyone has successfully setup a development environment to allow for multiple development copies of modules used within Mason components. Also, to have the appropriate changes to the modules shown within the development environment. Thanks, Stathy Touloumis Coder if ( eval{ $you = require Perl } ) { $you = '?3r1 H@c|3r' } Edventions 8800 Bronx Ave Skokie, IL 60077 www.edventions.com [EMAIL PROTECTED]
Re: Repost: Anyone using virtual server for mod_perl hosts?
On Tue, 30 Jan 2001, Martin Langhoff wrote: There are companies (Verio at least) offering a 'virtual machine' running a virtualized OS. Verio is offering NetBSD and Solaris. They have a seriouly large iron where many virtual machines run, each virtual machine gets a share of CPU, HD and RAM resources, an at least an IP address. Woah.. I had never heard of this. Have you actually been on a box? I'm calling them to see if a demo is available. My guess would be that no matter how well they slice it, you're still sharing hardware, and if some guy is running 100 java servlets on the 'real' box that you're sharing, you're gonna have to fight for time. It's only an extra $60 or so to get a 'real' machine somewhere.. It depends, like everything else, on your needs. I'll let you know if they let me on a box. :) -- Blue Lang, Unix Voodoo Priesthttp://www.gator.net/~blue 202 Ashe Ave, Apt 3, Raleigh, NC. 919 835 1540 "A computer is a state machine. Threads are for people who can't program state machines." - Alan Cox, From Larry McVoy's quote page
Re: Passing data among handlers
I've never tried this, but you could store things into main using one handler and retrieve them with another, provided that you cleaned up afterward. If, for any reason you failed to cleanup, the server would leak memory... not that it doesn't already. Robert Landrum Paul J. Lucas ([EMAIL PROTECTED]) said something to this effect on 01/30/2001: Perhaps I've missed it, but is there a better way than the "notes" mechanism to pass data among handlers? The "notes" mechanism not only requires the notes to be scalars, but, apparantly, said scalars must also be simple strings, i.e., no binary data crammed into a scalar. Better ideas? Odds of enhancing the "notes" mechanism? Paul,
[OT] Design Patterns in mod_perl apps?
I am studying mod_perl and the GoF Desing Patterns book in parallel and had a few questions I would like to throw to the list. 1. Is there anyone who is using GoF design patterns (eg. Chain of Responsibility for handlers) in their mod_perl apps? 2. Is the overhead of OO Perl acceptable for mod_perl apps, generally speaking? 3. Are there any new patterns useful for mod_perl apps? 4. Am I wasting my time with OO and design patterns if the goal was writing a mod_perl app? Thank you. bakki -- _ _ .-. |M|S| Bakki Kudva |D|_|a|y| Navaco |o|m|n|s|\420 Pasadena Drive |c|e|a|t| \\ Erie, PA 16505-1037 |u|n|g|e| \\ http://www.navaco.com/ | |T|e|m| \ ph: 814-833-2592 "" fax:603-947-5747 e-Docs
Re: [OT] Design Patterns in mod_perl apps?
On Tue, 30 Jan 2001, Bakki Kudva wrote: Date: Tue, 30 Jan 2001 14:13:14 -0500 From: Bakki Kudva [EMAIL PROTECTED] To: [EMAIL PROTECTED] Subject: [OT] Design Patterns in mod_perl apps? I am studying mod_perl and the GoF Desing Patterns book in parallel and had a few questions I would like to throw to the list. 1. Is there anyone who is using GoF design patterns (eg. Chain of Responsibility for handlers) in their mod_perl apps? Well, I don't want to sound stupid, but I don't know what you're talking about. That's one of the hazards of having a degree in English and not CS, I guess? :) 2. Is the overhead of OO Perl acceptable for mod_perl apps, generally speaking? Sure. 3. Are there any new patterns useful for mod_perl apps? I'm not sure what was old or what constitutes new. I tend to write a lot of vanilla handlers. I've looked into Mason and AxKit and such, and they're fantastic, but just shifting $r and returning OK seems to work really well most of the time. 4. Am I wasting my time with OO and design patterns if the goal was writing a mod_perl app? Absolutely not. If an OO design is appropriate, then use it. When I've wanted an object, I've created it. I've even used OO methodology to write base classes for handlers and deriving from them for other handlers. Just do what feels right and enjoy yourself. ky
Re: Passing data among handlers
We created our own "request" object that gets passed to components that might need it. We were concerned about pnotes becoming a big, hard-to-debug global area. = Barry Hoggard http://www.hoggard.org __ Get personalized email addresses from Yahoo! Mail - only $35 a year! http://personal.mail.yahoo.com/
Logging to apache from perl
Hello, i was wondering if anyone could help me. I want to create a username and password when a user enters my site, then pass these values to apache to authenticate. Then i could have the REMOTE_USER variable available throught the users stay at my site. Is there a way to pass these values to apache without having to pop up the login window? Is the Apache::AuthAny module supposed to do this? My aim is to have the variable Remote_User available to my scripts without having to put the info in a login box. Thanks
Re: [OT] Design Patterns in mod_perl apps?
"Ken Y. Clark" wrote: 1. Is there anyone who is using GoF design patterns (eg. Chain of Responsibility for handlers) in their mod_perl apps? Well, I don't want to sound stupid, but I don't know what you're talking about. That's one of the hazards of having a degree in English and not CS, I guess? :) Oops! Sorry. The book is 'Design Patterns' by Erich Gamma, et al and the four authors are known as the Gang of Four in OO circles I believe. Design Patterns "capture solutions that have developed and evolved over time". The main theme is to promote CODE REUSE via decoupling of classes. The book talks about 'message flow' in your app vs. 'data flow' which makes classes dependent on each other and reduce their REUSE potential. I am finding it fascinating. bakki -- _ _ .-. |M|S| Bakki Kudva |D|_|a|y| Navaco |o|m|n|s|\420 Pasadena Drive |c|e|a|t| \\ Erie, PA 16505-1037 |u|n|g|e| \\ http://www.navaco.com/ | |T|e|m| \ ph: 814-833-2592 "" fax:603-947-5747 e-Docs
Re: Repost: Anyone using virtual server for mod_perl hosts?
Blue Lang wrote: Woah.. I had never heard of this. Have you actually been on a box? I'm calling them to see if a demo is available. I have been on such a box, once. Unluckily, I wasn't root, so I could not do much there. Of course, if someone is eating up resources, I'll have to fight them... spawn a few mod_perl processes in core, and I guess every other virtual machine will be running from swap ;) m
Re: Repost: Anyone using virtual server for mod_perl hosts?
On a visit to Alaska (the Perl Whirl) we visited the Alaska Department of Technology or something similar (I honestly don't remember) where they were running an IBM S390 with partitions for NT, Linux, and a few other operating systems. The S390 appearently runs some type of software that allows you to set limits on your partitions, so no matter what, you always have some percentage of the CPU at your disposal. This is not the case with the Sun 1. With that machine, you must explicity set which processors you want partitioned to your virtual box. With a 16 processor Sun 1, you could set up four, four processor Sun virtual machines, all sharing the same hard drives and external adapters (NIC cards and serial ports). Large systems like this are dying, as they generally require much more knowledge than simply establishing a server farm of the same capabilities. It's much easier to higher people to set up 50 boxes (linux, NT, BSD, Solaris) than it is to find people that can configure an S390 or Sun 1. Rob Blue Lang wrote: Woah.. I had never heard of this. Have you actually been on a box? I'm calling them to see if a demo is available. I have been on such a box, once. Unluckily, I wasn't root, so I could not do much there. Of course, if someone is eating up resources, I'll have to fight them... spawn a few mod_perl processes in core, and I guess every other virtual machine will be running from swap ;) m
Cannot make mod_perl on *@!* RH Linux :(
Hi everyone (long time no see) I am working on a client's machine with RedHat Linux. I'm trying to build Apache/mod_perl/mod_ssl from the sources, but become stuck when trying to make in the mod_perl directory. The error is: [root@wm mod_perl-1.25]# make (cd ../apache_1.3.17 PERL5LIB=/tmp/mod_perl-1.25/lib make) make[1]: Entering directory `/tmp/apache_1.3.17' === src make[2]: Entering directory `/tmp/apache_1.3.17' make[3]: Entering directory `/tmp/apache_1.3.17/src' make[3]: *** No rule to make target `all'. Stop. make[3]: Leaving directory `/tmp/apache_1.3.17/src' make[2]: *** [build-std] Error 2 make[2]: Leaving directory `/tmp/apache_1.3.17' make[1]: *** [build] Error 2 make[1]: Leaving directory `/tmp/apache_1.3.17' make: *** [apaci_httpd] Error 2 The configuration had gone according to expectations except for: [root@wm mod_perl-1.25]# perl Makefile.PL USE_APACI=1 EVERYTHING=1 DO_HTTPD=1 APACHE_PREFIX=/usr/local/apachessl APACHE_SRC=../apache_1.3.17/src SSL_BASE=SYSTEM APACI_ARGS='--enable-module=ssl,--enable-module=expires,--enable-module=rewrite' [ ... ] Configuring for Apache, Version 1.3.17 + using installation path layout: Apache (config.layout) + activated perl module (modules/perl/libperl.a) Creating Makefile Creating Configuration.apaci in src Error: Cannot find SSL header files in any of the following dirs: Error: . /usr/include /usr/include/ssl/ /usr/local/include /usr/local/include/ssl [ ... ] + adding selected modules o rewrite_module uses ConfigStart/End disabling DBM support for mod_rewrite (perhaps you need to add -ldbm, -lndbm or -lgdbm to EXTRA_LIBS) [ ... ] I read in the INSTALL docs that the first error should not occur if openssl is already built and SSL_BASE is set to SYSTEM ... but there it is ... ? And I read on this list's archives that the second error (about lgdbm) may be caused by using Linux' RPM Perl, so I just built a new Perl from source ... I also read to see if Apache will make on it's own, and indeed it does. But then I can't make in the mod_perl tree with the error given at the top. Please help! Thanks, Nick My Perl: [root@wm lib]# perl -V Summary of my perl5 (revision 5.0 version 6 subversion 0) configuration: Platform: osname=linux, osvers=2.2.16-22, archname=i686-linux uname='linux wm 2.2.16-22 #1 tue aug 22 16:49:06 edt 2000 i686 unknown ' config_args='' hint=recommended, useposix=true, d_sigaction=define usethreads=undef use5005threads=undef useithreads=undef usemultiplicity=undef useperlio=undef d_sfio=undef uselargefiles=define use64bitint=undef use64bitall=undef uselongdouble=undef usesocks=undef Compiler: cc='gcc', optimize='-O2', gccversion=2.96 2731 (Red Hat Linux 7.0) cppflags='-fno-strict-aliasing' ccflags ='-fno-strict-aliasing -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64' stdchar='char', d_stdstdio=define, usevfork=false intsize=4, longsize=4, ptrsize=4, doublesize=8 d_longlong=define, longlongsize=8, d_longdbl=define, longdblsize=12 ivtype='long', ivsize=4, nvtype='double', nvsize=8, Off_t='off_t', lseeksize=8 alignbytes=4, usemymalloc=n, prototype=define Linker and Libraries: ld='gcc', ldflags =' -L/usr/local/lib' libpth=/usr/local/lib /lib /usr/lib libs=-lnsl -lgdbm -ldl -lm -lc -lcrypt libc=/lib/libc-2.1.92.so, so=so, useshrplib=false, libperl=libperl.a Dynamic Linking: dlsrc=dl_dlopen.xs, dlext=so, d_dlsymun=undef, ccdlflags='-rdynamic' cccdlflags='-fpic', lddlflags='-shared -L/usr/local/lib' Characteristics of this binary (from libperl): Compile-time options: USE_LARGE_FILES Built under linux Compiled at Jan 30 2001 10:41:19 @INC: /usr/local/lib/perl5/5.6.0/i686-linux /usr/local/lib/perl5/5.6.0 /usr/local/lib/perl5/site_perl/5.6.0/i686-linux /usr/local/lib/perl5/site_perl/5.6.0 /usr/local/lib/perl5/site_perl
RE: Cannot make mod_perl on *@!* RH Linux :(
-Original Message- From: Nick Tonkin [mailto:[EMAIL PROTECTED]] Sent: Tuesday, January 30, 2001 3:09 PM To: [EMAIL PROTECTED] Subject: Cannot make mod_perl on *@!* RH Linux :( Hi everyone (long time no see) I am working on a client's machine with RedHat Linux. I'm trying to build Apache/mod_perl/mod_ssl from the sources, but become stuck when trying to make in the mod_perl directory. many have repored problems under RH7.0 - try downgrading gcc to the 6.2 dist and see if that helps (haven't tried myself but others have IIRC)... --Geoff
Re: Cannot make mod_perl on *@!* RH Linux :(
On Tue, 30 Jan 2001, Nick Tonkin wrote: I read in the INSTALL docs that the first error should not occur if openssl is already built and SSL_BASE is set to SYSTEM ... but there it is ... ? if openssl is installed in the default location, don't bother with SSL_BASE. if not, that needs to be a path, e.g. SSL_BASE=/usr/local/ssl mod_perl's notion of SSL_BASE is not n'sync with mod_ssl's, so i don't think `SYSTEM' will work. i just built mod_perl-1.25+apache_1.3.17+mod_ssl-2.8.0-1.3.17+openssl-0.9.6 rh-7.0 (w/ gcc/glibc upgrades) and perl-current: % perl Makefile.PL USE_APACI=1 EVERYTHING=1 DO_HTTPD=1 \ APACI_ARGS='--enable-module=ssl,--enable-module=expires,--enable-module=rewrite' all tests pass. And I read on this list's archives that the second error (about lgdbm) may be caused by using Linux' RPM Perl, so I just built a new Perl from source ... that's not an error, just a warning that some dbm feature of mod_rewrite is disabled.
Re: Cannot make mod_perl on *@!* RH Linux :(
Error: Cannot find SSL header files in any of the following dirs: Error: . /usr/include /usr/include/ssl/ /usr/local/include /usr/local/include/ssl Have you tried symlinking /usr/include/ssl to /usr/include/openssl? Bill
RE: Cannot make mod_perl on *@!* RH Linux :(
-Original Message- From: Nick Tonkin [mailto:[EMAIL PROTECTED]] Sent: Tuesday, January 30, 2001 3:39 PM To: Geoffrey Young Cc: 'Nick Tonkin'; [EMAIL PROTECTED] Subject: RE: Cannot make mod_perl on *@!* RH Linux :( Gaah ... there is no gcc RPM in the RH 6.2 archive ... !? I think its the egcs stuff now... [geoff@spinnaker downloads]$ rpm -qa | grep egcs compat-egcs-5.2-1.0.3a.1 egcs-1.1.2-30 there may be others I can't remember... HTH --Geoff
Re: Logging to apache from perl
harilaos ([EMAIL PROTECTED]) said something to this effect on 01/30/2001: I want to create a username and password when a user enters my site, then pass these values to apache to authenticate. Then i could have the REMOTE_USER variable available throught the users stay at my site. You want to create them? Do you mean create a new session for each user? You might want to look into Apache::Session for this; it has a customizable session key generator. Here is a simple example, generating a simple session id. Run this as a PerlAuthenHandler: package Apache::SillyAuthen; use Apache::Constants qw(OK); use MD5; sub handler { my $r = shift; # Make a random "username". This can be a call to any # function, etc, that can generate a username my $session = MD5-hexhash($r-get_remote_host . time . {}); # Set the username in the conn_rec $r-connection-user($session); # Set the REMOTE_USER env variable $r-subprocess_env('REMOTE_USER', $session); # Be sure to tell Apache that the authentication handler did # its thing! return OK; } Is that what you mean? (darren) -- It's not that things are getting worse, it's just that news reporting is getting better.
Re: Repost with typos corrected--Instance variable inheritance
[EMAIL PROTECTED] (Vasily Petrushin) wrote: On Tue, 30 Jan 2001, Ken Williams wrote: sub handler ($$) { my ($self, $q); - $self = $self-new(); ??? 8-[ ] who is $self-new() ??? $self = PackageName-new(); This is a Perl question and not a mod_perl question, so I don't want to get into a big discussion here, but I meant what I wrote. Try running the following program to see what I mean: == package Fooey; sub method { my $self = shift; - $self = $self-new; } sub new { my $class = shift; return bless {}, $class; } package main; $class = 'Fooey'; - $object = $class-method; print "\$object is an object, see: $object\n"; == The lines with the arrows demonstrate the technique you didn't think would work. ------ Ken Williams Last Bastion of Euclidity [EMAIL PROTECTED]The Math Forum
Perl / DBI Job - Telecommute - Full Time
We have a ground floor opening for a perl programmer for a TELECOMMUTING situation for web/wireless/telecom system development. Requirements: Strong Perl 5 experience SQL database knowledge Experience: CGI is a big plus Unix/Linux is a plus mod_perl apache servers are a plus DBI database experience is a big plus The company is a startup focusing on the transportation industry. The position is for direct employment and stock options. The company management has had great success launching and selling web sites in the past (last 3 companies sold for about $85 million) We have done a lot, but have many fun projects remaining like XML interfaces, WML/WAP, Interactive Voice Response (IVR), FAX gateways, Linux, and many interesting business processes to automate. Please respond with: resume $salary requirements example web sites if available sample perl code Thank you, Greg http://www.CargoTel.com/
Re: Passing data among handlers
On: Tue, 30 Jan 2001 09:54:42 PST "Paul J. Lucas" wrote: Perhaps I've missed it, but is there a better way than the "notes" mechanism to pass data among handlers? The "notes" mechanism not only requires the notes to be scalars, but, apparantly, said scalars must also be simple strings, i.e., no binary data crammed into a scalar. Better ideas? Odds of enhancing the "notes" mechanism? - Paul Try the "pnotes" mechanism. Very similar to "notes", but allows for complex data structures to be passed. For a while, it was an undocumented feature, but afaik is included in more recent dists (I'm running 1.24). --kip
Apache - Perl - Oracle
Help me please ... I want connect to DB Oracle by emperl but i don't . The results ... dont show me errors, dont show anything in variable (ej [ +$campo1+]) My scritp is: [! #Variables de entorno use DBI; !] [- $db_user = 'xxx'; #DB_USER; $db_passwd = 'yyy'; #DB_PASSWORD; $db_id = 'ECOMM'; #SID; $db_driver = "dbi:Oracle:"; $fields = '*'; #Campos de la tabla para el select; $tabla = 'proveed'; #nombre de la tabla; $where = ''; #clausula del where para el select; -] html head title /title [- #Para que EmbPerl no escapee las comillas $escmode = 0 -] meta HTTP-EQUIV="Expires" CONTENT="" /head body bgcolor="#FF" leftmargin="0" link=FF vlink=FF [- #Armado de la query #connect to database $dbh = DBI-connect($db_driver . $db_id,$db_user,$db_passwd,{ AutoCommit = 0 }); #prepare the sql select $sth = $dbh - prepare ("SELECT $fields FROM $tabla"); #execute the query $sth - execute; ($campo1, $campo2, $campon) = $sth-fetchrow_array; $sth-finish; $dbh-disconnect(); -] Corremos con DEBUG p dbh: [+ $dbh +]br sth: [+ $sth +]br Campo1: [+ $campo1 +]br Campo2: [+ $campo2 +]br Campon: [+ $campon +]br /body /html My configuration is Row Var Content 0 SERVER_SOFTWARE Apache/1.3.12 (Unix) mod_perl/1.22 mod_ssl/2.6.2 OpenSSL/0.9.5 1 DOCUMENT_ROOT /app/webs/acag/html 2 GATEWAY_INTERFACE CGI-Perl/1.1 3 ORACLE_PATH /app/oracle/product/8.1.6/bin:/app/oracle/product/8.1.6/obackup/bin:/opt/bin:/bin:/usr/bin 4 REMOTE_ADDR 10.101.3.147 5 REQUEST_METHOD GET 6 SESSION_FILE_LOCK 1 7 QUERY_STRING 8 HTTP_ACCEPT application/vnd.ms-excel, application/msword, application/vnd.ms-powerpoint, image/gif, image/x-xbitmap, image/jpeg, image/pjpeg, */* 9 ORACLE_BASE /app/oracle 10 REMOTE_PORT 3459 11 SERVER_ADDR 10.1.4.210 12 HTTP_ACCEPT_LANGUAGE es 13 MOD_PERL mod_perl/1.22 14 ORA_NLS32 /app/oracle/product/8.1.6/ocommon/nls/admin/data 15 nokeepalive 1 16 HTTPS on 17 ORA_NLS33 /app/oracle/product/8.1.6/ocommon/nls/admin/data 18 SCRIPT_FILENAME /app/webs/acag/html/min/trash/ambiente.epl 19 SERVER_NAME wwwserver1.telecompersonal.com.ar 20 SERVER_PORT 443 21 PATH_TRANSLATED /app/webs/acag/html/min/trash/ambiente.epl 22 ORACLE_HOME /app/oracle/product/8.1.6 23 SERVER_ADMIN [EMAIL PROTECTED] 24 SERVER_SIGNATURE ADDRESSApache/1.3.12 Server at wwwserver1.telecompersonal.com.ar Port 443/ADDRESS 25 SERVER_PROTOCOL HTTP/1.0 26 HTTP_USER_AGENT Mozilla/4.0 (compatible; MSIE 4.01; Windows NT) 27 PATH /sbin:/usr/sbin:/usr/bin:/usr/ccs/bin:/usr/bin/X11:/usr/local 28 ssl-unclean-shutdown 1 29 HTTP_CONNECTION Keep-Alive 30 SCRIPT_NAME /min/trash/ambiente.epl 31 ORACLE_SID ECOMM 32 SESSION_FILE_DIRECTORY /app/webs/acag/html/acag/sessions 33 REQUEST_URI /min/trash/ambiente.epl 34 HTTP_COOKIE num=banco000; SITESERVER=ID=3fda4ee64dc8ad5c13552b8412dae598; RMID=c82d480a3a6f0fd0 35 HTTP_HOST wwwserver1.telecompersonal.com.ar What is wrong ? PLEASE ... Thanks a lot; Aldo Luis Orsini... Buenos Aires Argentina
Re: Logging to apache from perl
Sure, you could do this, but it sounds horribly insecure... In httpd.conf: Location /secure PerlAuthenHandler MyAuthHandler /Location In MyAuthHandler: sub handler { my $r = shift; $r-connection-user('USERNAME'); return OK; } Regards, Christian On Tue, 30 Jan 2001, harilaos wrote: Hello, i was wondering if anyone could help me. I want to create a username and password when a user enters my site, then pass these values to apache to authenticate. Then i could have the REMOTE_USER variable available throught the users stay at my site. Is there a way to pass these values to apache without having to pop up the login window? Is the Apache::AuthAny module supposed to do this? My aim is to have the variable Remote_User available to my scripts without having to put the info in a login box. Thanks
RE: Cannot make mod_perl on *@!* RH Linux :(
Gaah ... there is no gcc RPM in the RH 6.2 archive ... !? ~~~ Nick Tonkin On Tue, 30 Jan 2001, Geoffrey Young wrote: -Original Message- From: Nick Tonkin [mailto:[EMAIL PROTECTED]] Sent: Tuesday, January 30, 2001 3:09 PM To: [EMAIL PROTECTED] Subject: Cannot make mod_perl on *@!* RH Linux :( Hi everyone (long time no see) I am working on a client's machine with RedHat Linux. I'm trying to build Apache/mod_perl/mod_ssl from the sources, but become stuck when trying to make in the mod_perl directory. many have repored problems under RH7.0 - try downgrading gcc to the 6.2 dist and see if that helps (haven't tried myself but others have IIRC)... --Geoff
Re: Cannot make mod_perl on *@!* RH Linux :(
On Tue, 30 Jan 2001, Doug MacEachern wrote: On Tue, 30 Jan 2001, Nick Tonkin wrote: I read in the INSTALL docs that the first error should not occur if openssl is already built and SSL_BASE is set to SYSTEM ... but there it is ... ? if openssl is installed in the default location, don't bother with SSL_BASE. if not, that needs to be a path, e.g. SSL_BASE=/usr/local/ssl mod_perl's notion of SSL_BASE is not n'sync with mod_ssl's, so i don't think `SYSTEM' will work. i just built mod_perl-1.25+apache_1.3.17+mod_ssl-2.8.0-1.3.17+openssl-0.9.6 rh-7.0 (w/ gcc/glibc upgrades) and perl-current: % perl Makefile.PL USE_APACI=1 EVERYTHING=1 DO_HTTPD=1 \ APACI_ARGS='--enable-module=ssl,--enable-module=expires,--enable-module=rewrite' all tests pass. When I run the perl Makefile.PL command like that (without the SSL_BASE directive) I get: Error: Cannot find SSL header files in any of the following dirs: Error: . /usr/include /usr/include/ssl/ /usr/local/include /usr/local/include/ssl So I do find / -name ssl -print and get: /tmp/apache_1.3.17/src/modules/ssl /usr/share/ssl so I do perl Makefile.PL with SSL_BASE=/usr/share/ssl and get a different error: Error: Cannot find SSL binaries under /usr/share/ssl ... ? Can anyone tell me what are the binaries it is looking for, so I could look for them? Thanks, Nick
Re: Passing data among handlers
I have a slightly different twist on this question. We run Registry scripts on our site for debugging purposes. I would love to have a module for saving variables/data structures on a per-request basis (like the current Apache notes), but internally using pnotes under mod_perl, and some other mechanism (package vars like I'm using now?) under everything else. The purpose of this being so that I could have a nice interface for per-request data that I could pass between different (non-OO) modules. This sounds vaguely familiar to what you did Barry. Can you elaborate a little? Barry Hoggard wrote: We created our own "request" object that gets passed to components that might need it. We were concerned about pnotes becoming a big, hard-to-debug global area. = Barry Hoggard http://www.hoggard.org -- Drew Taylor Software Engineer OpenAir.com - Making Business a Breeze! http://www.openair.com/
Re: Perl / DBI Job - Telecommute - Full Time
A post office box in FL? CargoTel, Inc. PO Box 660572 Oviedo, FL 32766 Doesn't sound very professional... "Greg Balfanz, CargoTel" wrote: We have a ground floor opening for a perl programmer for a TELECOMMUTING situation for web/wireless/telecom system development. Thank you, Greg http://www.CargoTel.com/
This list... formatted headerS?
Why doesn't this list use formatted headers, e.g. Subject: [mod-perl] Would be great for filtering.. / wells // [EMAIL PROTECTED] " i saved latin. what did you ever do? "
Re: This list... formatted headerS?
On Tue, 30 Jan 2001, wells wrote: Why doesn't this list use formatted headers, e.g. Subject: [mod-perl] Would be great for filtering.. Because everyone copes just fine with To|CC for this list, and we don't fancy missing off half of the real subject in our mailers. (the worst example I've seen to date of this is the group firsttuesdayedinburgh that I'm a member of - you can imagine how little of the subject I get to see with that!). -- Matt/ /||** Director and CTO ** //||** AxKit.com Ltd ** ** XML Application Serving ** // ||** http://axkit.org ** ** XSLT, XPathScript, XSP ** // \\| // ** Personal Web Site: http://sergeant.org/ ** \\// //\\ // \\
Re: Passing data among handlers
I'm not sure what we're doing is very applicable. Ours is meant to be used in HTML::Mason, so that the object is passed as an argument to any mason components that need it. I wanted to have a definitive list of methods, rather that let people just stick things into pnotes whenever they felt like it. So we're not really using pnotes at all. --- Drew Taylor [EMAIL PROTECTED] wrote: I have a slightly different twist on this question. We run Registry scripts on our site for debugging purposes. I would love to have a module for saving variables/data structures on a per-request basis (like the current Apache notes), but internally using pnotes under mod_perl, and some other mechanism (package vars like I'm using now?) under everything else. The purpose of this being so that I could have a nice interface for per-request data that I could pass between different (non-OO) modules. This sounds vaguely familiar to what you did Barry. Can you elaborate a little? = Barry Hoggard http://www.hoggard.org __ Get personalized email addresses from Yahoo! Mail - only $35 a year! http://personal.mail.yahoo.com/
Correct LWP package to test mod_perl
All, Which is the correct LWP package to download from CPAN for doing the make test phase during mod_perl installation. I note there are 2 LWP packages with the LWP::UserAgent piece: lcwa-1.0.0 and libwww-perl-5.50 Thanks for the advice. AS
Object-XML serialization [was Re: AxKit Users?]
Castor (for Java, from www.exolab.com), uses an actual XML Schema for this. The advantage is that you can leverage off the fairly rich existing set of defined datatypes. It would be nice to see "xml marshalling" (as they call it) integrated into an existing Perl object-relational framework like Tangram. OTOH, Tangram isn't very well optimized for mod_perl work in general--currently the object cache must be completely flushed after each request, etc. I think an open-source mod_perl-oriented O/R system with XML support would be extremely useful. I would be interesting in hearing opinions on whether extending Tangram and its ilk is viable. Either way, I will probably look into working on this in the near future, let me know if you're interested. --Chris On Tue, 30 Jan 2001, Matt Sergeant wrote: On Tue, 30 Jan 2001, Robin Berjon wrote: Well OK then, lets look at a way to dump current objects to XML, or interface to what you've got. I think that could be useful to a lot of people (myself included). Yes that would be indeed very interesting. It can't be totally automagic *and* be useful in the context that I (and I guess others) need, which is to dump an object into a vocabulary that makes sense wrt the app. The way I see it is that it's more or less schemata the other way round: given an infoset (more or less) and stuff to fill it with, and produce a document. Maybe a small language defining that would be both possible and good. In fact it could be an XML vocabulary, similar to TREX, something like: px:perl_to_xml xmlns:px="urn:to-be-decided" employees px:array employee px:hash key="name" namepx:scalar//name /px:hash px:hash key="department" departmentpx:scalar//department /px:hash /employee /px:array /employees /px:perl_to_xml
Re: Passing data among handlers
Robert Landrum [EMAIL PROTECTED] writes: I've never tried this, but you could store things into main using one handler and retrieve them with another, provided that you cleaned up afterward. If, for any reason you failed to cleanup, the server would leak memory... not that it doesn't already. It doesn't have to leak memory. If you're careful. I've had long lived processes doing non trivial stuff that've reached a maximum size and stayed there 'til Maxhits. (And that's not just individual server processes, but all the servers for that application.) -- Piers
slightly off-topic
I hate to post this here because it's clearly the wrong forum, but I haven't been able to find adequate documentation elsewhere on suEXEC. I'd like our users to be able to create CGI scripts in a public_cgi directory beneath their home directory and have the server execute those, as the owner, automatically. Has anyone done this or does anyone have pointers to an example of this? There's plenty of dire warnings against end-user CGI, but we don't have a choice in this environment. I'm looking for a, "you ignored our warnings and went ahead and did something stupid, now here's an example to make it work," kind of thing. Thanks! Wyman Miles Senior Systems Administrator, Rice University, Texas. (713) 348-5827, e-mail:[EMAIL PROTECTED], pager:[EMAIL PROTECTED]
Re: [OT] Design Patterns in mod_perl apps?
At 02:13 PM 1/30/01 -0500, Bakki Kudva wrote: I am studying mod_perl and the GoF Desing Patterns book in parallel and had a few questions I would like to throw to the list. 1. Is there anyone who is using GoF design patterns (eg. Chain of Responsibility for handlers) in their mod_perl apps? Yes. The most common is filtering content. There are a lot of mod_perl specific filters. If you look at the latter half of the on-line book at http://www.extropia.com/ExtropiaObjects/ and read the module chapters after and including the "Architecture" chapter you will see a sidebar in each chapter devoted to identifying design patterns that were used in that set of related modules. eg we use CoR in filters that are specific to handling content in our apps. We use (depending on how you view it) CoR or flyweight for dealing with stuff like data handlers (which are essentially filters for *incoming* content) 2. Is the overhead of OO Perl acceptable for mod_perl apps, generally speaking? Yes. Very few people really need to eek out all the speed in world. Most people just want fast apps, they don't need the fastest apps. That's one reason why PHP and Microsoft ASP is so popular... they're fast or rather fast enough without being hard. Mod_perl could be a lot faster than PHP but it's more of a learning curve for people who don't know Perl well. 3. Are there any new patterns useful for mod_perl apps? Lots. But I think you mean Web apps not mod_perl apps. Web Apps abound with idioms and design patterns. There are many which have been identified since the GoF book such as Session which I think nearly all large web apps use. :) 4. Am I wasting my time with OO and design patterns if the goal was writing a mod_perl app? I guess it depends on what you mean by a mod_perl app. If you mean a web app that runs on top of mod_perl, then you should use good OO because I suspect you'll want to expand that app and do things later with it which means the cost of maintenance is an issue not just the speed. If, however, you are writing some custom auth handler or something like that, then the efficacy of sticking to OO is less because (A) Yes, you could lose some performance in some cases, and (B) Because the auth handler is likely to be so tiny that OO would not make sense. OO is better for larger programs so that they can be broken down more easily. My personal experience is that web programs tend to fit the bill for OO if they go beyond simple 1-off logic such as form processing. I think OO is overkill if all you would have is just one object because the program is so simple. Later, Gunther PS Caveat: Don't go overboard on design patterns. GoF book was written with typical apps in mind. Web apps were not in their view scope at the time. Web apps do operate differently to regular apps and the design patterns or idioms you might wish to use may be different. Since as the GoF book puts it, all patterns have their advantages and also their consequences. Those consequences may be OK for a regular app but not for a web app. There have been tons of articles and books on Design Patterns since GoF book was out. It's good to absorb GoF, but don't use it to hammer everything because you've read something new and cool. Asking your questions certainly shows you seem to understand that anyway, so I am probably preaching to the choir. :)
Re: slightly off-topic
On Tue, 30 Jan 2001, Wyman Eric Miles wrote: I hate to post this here because it's clearly the wrong forum, but I haven't been able to find adequate documentation elsewhere on suEXEC. http://httpd.apache.org/docs/suexec.html also, have you looked at cgiwrap? we used it when i worked for an ISP, and it worked out pretty well. -- Blue Lang, Unix Voodoo Priesthttp://www.gator.net/~blue 202 Ashe Ave, Apt 3, Raleigh, NC. 919 835 1540 "A computer is a state machine. Threads are for people who can't program state machines." - Alan Cox, From Larry McVoy's quote page
Re: Object-XML serialization [was Re: AxKit Users?]
At 15:29 30/01/2001 -0800, [EMAIL PROTECTED] wrote: It would be nice to see "xml marshalling" (as they call it) integrated into an existing Perl object-relational framework like Tangram. OTOH, Tangram isn't very well optimized for mod_perl work in general--currently the object cache must be completely flushed after each request, etc. That is only half true. When running 5.6 (ie when you have weakrefs) Tangram takes advantage of it to avoid circular refs. Depending on the number of distinct objects that you load it could still be a good idea to $storage-unload in your cleanup handler, but that wouldn't necessarily be the general case. And anyway, when I mention XML I'm talking about Tangram 2. I haven't tested it yet, but I'll soon have a chance to. I'll probably report to the modperl list when this happens. A number of things have changed there. I've also found Jean-Louis Leroy to be very supportive, he even came to meet me to ask me questions about what modperl users of Tangram needed (if you have a list of issues, pass it on to me, I'll summarize and discuss it with him). I'd expect Tangram to move forward quite fast in the times to come. I think an open-source mod_perl-oriented O/R system with XML support would be extremely useful. I would be interesting in hearing opinions on whether extending Tangram and its ilk is viable. Either way, I will probably look into working on this in the near future, let me know if you're interested. Extending Tangram is viable. It will become even more so shortly. I'm definitely interested if you decide to work on this. -- robin b. Smoking is one of the leading causes of statistics.
Re: Perl / DBI Job - Telecommute - Full Time
Hi Buddy, On Tue, 30 Jan 2001, Buddy Lee Haystack wrote: A post office box in FL? CargoTel, Inc. PO Box 660572 Oviedo, FL 32766 Doesn't sound very professional... With $85M I guess he doesn't worry too much about that. 'Course if I had $85M I think I'd go on holiday for a while. 73, Ged.
Re: This list... formatted headerS?
Hi there, On Tue, 30 Jan 2001, wells wrote: Why doesn't this list use formatted headers, e.g. Subject: [mod-perl] Would be great for filtering.. Argh. Three months ago I asked for comments on this document. I got precisely one. Thanks again, Gunther! -- From [EMAIL PROTECTED] Sun Nov 5 15:32:06 2000 Date: Sun, 5 Nov 2000 15:32:05 + (GMT) From: "G.W. Haywood" [EMAIL PROTECTED] To: Ask Bjoern Hansen [EMAIL PROTECTED] cc: [EMAIL PROTECTED] Subject: Re: [ADMIN] Keep those @$%#$ quotes down (was: dynamic vs. mostly static data) In-Reply-To: [EMAIL PROTECTED] Message-ID: [EMAIL PROTECTED] MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Status: O X-Status: Hi all, On Sun, 5 Nov 2000, Ask Bjoern Hansen wrote: Sending a 3.5KB message to write two misspelled lines are a %@$%$ waste. Those 3.5KB goes to ~1500 people. Your outburst (with which I have to agree, although maybe we might talk about banner ads later:) prompted me to publish a document that Stas and I have been working on, if sporadically, for quite a while. It's available by anonymous ftp: ftp.jubileegroup.co.uk/pub/mod_perl/admin/admin.txt -- 73, Ged.
Re: Correct LWP package to test mod_perl
Hi there, On Tue, 30 Jan 2001, Sinclair, Alan (CORP, GEAccess) wrote: Which is the correct LWP package to download from CPAN for doing the make test phase during mod_perl installation. I note there are 2 LWP packages with the LWP::UserAgent piece: lcwa-1.0.0 and libwww-perl-5.50 You want libwww-perl 73, Ged.
Re: Repost: Anyone using virtual server for mod_perl hosts?
Hi there, On Tue, 30 Jan 2001, Blue Lang wrote: There are companies (Verio at least) offering a 'virtual machine' running a virtualized OS. Verio is offering NetBSD and Solaris. They have a seriouly large iron where many virtual machines run, each virtual machine gets a share of CPU, HD and RAM resources, an at least an IP address. Woah.. I had never heard of this. Have you actually been on a box? I'm calling them to see if a demo is available. There's also VMware. I think that's what it's called. Josh? 73, Ged.
Re: Perl / DBI Job - Telecommute - Full Time
I guess so, but I find it a bit difficult to imagine why someone successful enough to sell 3 sites for a total of $85M uses a PO Box; pays to list the domain name for only 1 year; is located in an area that is 98% rural where the median housing value is under $90,000; doesn't list an actual company address anywhere on the site, and lists himself as the administrative contact for the site. Shouldn't he have one of his toadies at least handle the administrative contact for the DNS name? I would... I must be a bit too jaded... "G.W. Haywood" wrote: Hi Buddy, On Tue, 30 Jan 2001, Buddy Lee Haystack wrote: A post office box in FL? CargoTel, Inc. PO Box 660572 Oviedo, FL 32766 Doesn't sound very professional... With $85M I guess he doesn't worry too much about that. 'Course if I had $85M I think I'd go on holiday for a while. 73, Ged. -- ***NOTE*** The information in this message (including attachments) is confidential, and protected by copyright. If the reader of this message is not the intended recipient, you are hereby notified that any review, dissemination, distribution, or copying of this message is strictly prohibited. ** www.RentZone.org
Re: This list... formatted headerS?
wells wrote: RE:Subject: [mod-perl] An absolutely marvelous idea... I have thousands of messages in my system from just a short time online. Most other lists of which I am a member have a tag in the message that allows me to sort them and then do a mass delete based on the subject. I haven't figured out yet how to do this with the mod_perl emails, except by authors. The above suggestion would make my email management life much easier. Splendid idea, and If not this, then what? Andrew Lietzow (Who is hoping that the release of 1.25 will finally let me compile ... and run!)
Re: This list... formatted headerS?
At 00:04 31/01/2001 +, G.W. Haywood wrote: Argh. Three months ago I asked for comments on this document. I think it's a very good document. I'd add a few things, mostly for tagged subjects (which imho should be used for in-list disambiguation for high traffic lists such as this one, not for anything else). [RULES] this is what tags your document when it is posted to the list every month so that people that know the list well can filter it out. It will get posted to the list every month will it not ? :) [Q] this is better imho than QUESTION [VOT] or [VERY OT] or something like that this is a great group to ask questions to, there are a lot of very volatile, very helpful people here. mod_perl people seem to know perl better than other perlians. Given that, it's hard to resist asking some Perl questions that you know will probably not yield an interesting answer on other list, even though you know that they are not truly mod_perl questions. For instance, a customer of mine recently asked me to create online games for his site. Those games will be running under mod_perl (that's the only link) but my problem is that I don't know what the best solution to implement chess, checkers, backgammon, and friends in Perl is. It's hard to resist asking this list, because I'm pretty sure it's the only place where I can get an answer... No this isn't a question in disguise ;) Anyway, people regularly post about stuff that isn't hardcore mod_perl, and a fair number of people on the list seem to be interested nevertheless. So maybe those questions should be somehow channeled (with the downside that having a tag for them is a bit too close to inviting them). I got precisely one. You should read ftp://ftp.jubileegroup.co.uk/pub/mod_perl/admin/admin.txt section 5.2.5: "Sometimes you will not get a reply. Try again after a few days. Sometimes the replies you get will be very short. Please do not worry about that. People are very busy, that's all." See ? It's already working -- robin b. "Science is like sex: sometimes something useful comes out, but that is not the reason we are doing it." -- R. Feynman
Re: Development Environment
Hi there, On Tue, 30 Jan 2001, Stathy Touloumis wrote: I was wondering if anyone has successfully setup a development environment to allow for multiple development copies of modules used within Mason components. Also, to have the appropriate changes to the modules shown within the development environment. Is there some reason you don't want to run several independent instances of Apache? 73, Ged.
Re: Apache - Perl - Oracle
Hi there, On Tue, 30 Jan 2001, Aldo Luis Orsini wrote: Help me please ... I want connect to DB Oracle by emperl but i don't . Have you tried the embperl mailing list? The address should be in the documentation you already have. If not I think you'll find a link to it at perl.apache.org. 73, Ged.
Re: Hard times with apache config
Hi there, On Tue, 30 Jan 2001, Fritz Heinrichmeyer wrote: [snip] perl Makefile.PL seem not to honor the APACHE_SRC=.../... switch. [snip] The httpd server wanted to read /usr/local/etc/apache/etc/apache/httpd.conf. You could try running 'perl Makefile.PL' from /usr/local/mod_perl with Apache in /usr/local/apache and either don't use APACHE_SRC at all or set it to ../apache/src Works fine for me. 73, Ged.
(Correction) Re: Object-XML serialization [was Re: AxKit Users?]
On Tue, 30 Jan 2001 [EMAIL PROTECTED] wrote: Castor (for Java, from www.exolab.com), uses an actual XML Schema for this. The advantage is that you can leverage off the fairly rich existing set of defined datatypes. Sorry, it's www.exolab.org, don't you hate that? --Chris
Re: Logging to apache from perl
Hello, thanks for the code below. I have put the following into access.conf Location /cgi-bin PerlAuthenHandler Apache::SillyAuthen; /Location I copied your code into my modules Apache directory. and in cgi-bin i have a script to print all environment variables but $remote_user=$ENV{'REMOTE_USER'}; is empty. am i doing anything wrong? Also it is for tracking users across my site. So far i am doing it with hidden fields, putting session_id in url. I thought having a variable following the user without putting all the above would be easier. darren chamberlain wrote: harilaos ([EMAIL PROTECTED]) said something to this effect on 01/30/2001: I want to create a username and password when a user enters my site, then pass these values to apache to authenticate. Then i could have the REMOTE_USER variable available throught the users stay at my site. You want to create them? Do you mean create a new session for each user? You might want to look into Apache::Session for this; it has a customizable session key generator. Here is a simple example, generating a simple session id. Run this as a PerlAuthenHandler: package Apache::SillyAuthen; use Apache::Constants qw(OK); use MD5; sub handler { my $r = shift; # Make a random "username". This can be a call to any # function, etc, that can generate a username my $session = MD5-hexhash($r-get_remote_host . time . {}); # Set the username in the conn_rec $r-connection-user($session); # Set the REMOTE_USER env variable $r-subprocess_env('REMOTE_USER', $session); # Be sure to tell Apache that the authentication handler did # its thing! return OK; } Is that what you mean? (darren) -- It's not that things are getting worse, it's just that news reporting is getting better.
Re: Object-XML serialization [was Re: AxKit Users?]
On Tue, 30 Jan 2001 [EMAIL PROTECTED] wrote: It would be nice to see "xml marshalling" (as they call it) integrated into an existing Perl object-relational framework like Tangram. OTOH, Tangram isn't very well optimized for mod_perl work in general--currently the object cache must be completely flushed after each request, etc. Alzabo (which is somewhat the opposite of Tangram) is designed with mod_perl in mind. XML serialization will be coming real soon now (as soon as Barrie Slaymaker finishes work on DBML). -dave /*== www.urth.org We await the New Sun ==*/
Re: Object-XML serialization [was Re: AxKit Users?]
At 19:58 30/01/2001 -0600, Dave Rolsky wrote: On Tue, 30 Jan 2001 [EMAIL PROTECTED] wrote: It would be nice to see "xml marshalling" (as they call it) integrated into an existing Perl object-relational framework like Tangram. OTOH, Tangram isn't very well optimized for mod_perl work in general--currently the object cache must be completely flushed after each request, etc. Alzabo (which is somewhat the opposite of Tangram) is designed with mod_perl in mind. XML serialization will be coming real soon now (as soon as Barrie Slaymaker finishes work on DBML). Ah, the eternal hesitation... Alzagram any time soon ? -- robin b. Smoking is one of the leading causes of statistics.
Re: Object-XML serialization [was Re: AxKit Users?]
On Wed, 31 Jan 2001, Robin Berjon wrote: Alzabo (which is somewhat the opposite of Tangram) is designed with mod_perl in mind. XML serialization will be coming real soon now (as soon as Barrie Slaymaker finishes work on DBML). Ah, the eternal hesitation... Alzagram any time soon ? Well, they do largely the opposite thing. Tangram maps objects onto databases and Alzabo maps databases onto objects. Admittedly, Alzabo has some features that let you do some (thought not close to all) of what Tangram does but they're really different things. -dave /*== www.urth.org We await the New Sun ==*/
Apache::ASP::Lite - CGI::ASP::Lite ( Please )
Ross, I believe I already expressed this, but would like to revisit that I think Apache::ASP::Lite is not appropriately named, and detracts from the current Apache::ASP namespace, which I maintain. I believe Apache::ASP::Lite should be named CGI::ASP::Lite because it creates ASP objects for use in perl CGI scripting. Further, unlike most Apache::* modules, it does not run under mod_perl which is what the Apache::* namespace is for. It is built for the CGI model of execution, which Apache does in fact do, but the Apache::* namespace is misleading in this regard. Further, there may be a namespace collision one day as Apache::ASP currently relies on a variety of sub Apache::ASP::* modules to do its dirty work, such as: grep ^package src/ASP.pm package Apache::ASP; package Apache::ASP::STDERR; package Apache::ASP::GlobalASA; package Apache::ASP::Request; package Apache::ASP::Response; package Apache::ASP::Server; package Apache::ASP::Application; package Apache::ASP::Session; package Apache::ASP::State; package Apache::ASP::CGI; package Apache::ASP::Collection; package Apache::ASP::CollectionItem; package Apache::ASP::Load; What if you wanted to create your own objects as you extend the framework, or I create a Apache::ASP::Lite for use in Apache::ASP ( very possible ). Again, I beg you to pick another namespace for your work. Note that it will likely be used by others if more appropriately named in the CGI::* namespace. Thanks, Josh
Re: Logging to apache from perl
On Wed, Jan 31, 2001 at 01:18:45AM +, harilaos wrote: Hello, thanks for the code below. I have put the following into access.conf Location /cgi-bin PerlAuthenHandler Apache::SillyAuthen; /Location I copied your code into my modules Apache directory. and in cgi-bin i have a script to print all environment variables but $remote_user=$ENV{'REMOTE_USER'}; is empty. am i doing anything wrong? Also it is for tracking users across my site. So far i am doing it with hidden fields, putting session_id in url. I thought having a variable following the user without putting all the above would be easier. maybe I didn't completely understand what you are trying to achieve, but before spending too much time on sorting out the technical details of how to emulate a regular authentication process, I'd rather stick to the established techniques of user-tracking like (a) munging session-ids into URLs (b) cookies (c) hidden fields (when using forms). Actually, I don't think that the "REMOTE_USER technique" would work, if you never let the browser know, that a certain location needs authentication (and once you let it know, it'll pop up that dialog box). Normally, the browser "remembers" that a location needs authentication after having filled in the dialog box the first time. Upon subsequent requests to the same location, the authentication info automatically gets resend by the browser. It's not clear to me, how you intend to emulate that mechanism purely server-side. Let me know if I misunderstood something... Erdmut darren chamberlain wrote: harilaos ([EMAIL PROTECTED]) said something to this effect on 01/30/2001: I want to create a username and password when a user enters my site, then pass these values to apache to authenticate. Then i could have the REMOTE_USER variable available throught the users stay at my site. You want to create them? Do you mean create a new session for each user? You might want to look into Apache::Session for this; it has a customizable session key generator. Here is a simple example, generating a simple session id. Run this as a PerlAuthenHandler: package Apache::SillyAuthen; use Apache::Constants qw(OK); use MD5; sub handler { my $r = shift; # Make a random "username". This can be a call to any # function, etc, that can generate a username my $session = MD5-hexhash($r-get_remote_host . time . {}); # Set the username in the conn_rec $r-connection-user($session); # Set the REMOTE_USER env variable $r-subprocess_env('REMOTE_USER', $session); # Be sure to tell Apache that the authentication handler did # its thing! return OK; } Is that what you mean? (darren) -- It's not that things are getting worse, it's just that news reporting is getting better. -- Erdmut Pfeifer science+computing gmbh -- Bugs come in through open windows. Keep Windows shut! --