RE: Concurrenty access to a log file!!!
If you use Apache's logging facilities (say for level debug). Apache will handle the concurrency/serializing for you. You might also look at using syslog -Original Message- From: Edmar Edilton da Silva [mailto:[EMAIL PROTECTED]] Sent: Friday, December 08, 2000 2:46 PM To: [EMAIL PROTECTED] Subject: Concurrenty access to a log file!!! Hi all, I have installed on my machine the mod_perl module and exists a lots perl scripts running under mod_perl. I am doing some tests and I need that all call to these perl scripts write in a log file. How can there are a lots scripts running to the same time, I need to control the processes of write. Please, can anyone give me any hint about it? Is there any doc on the Internet that I can use? Thanks for all help... Edmar Edilton da Silva Bacharel em Ciência da Computacão - UFV Mestrando em Ciência da Computacão - UNICAMP - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: STDERR
dup STDOUT to STDERR -Original Message- From: Aleksandr Vladimirskiy [mailto:[EMAIL PROTECTED]] Sent: Friday, December 08, 2000 5:16 PM To: [EMAIL PROTECTED] Subject: STDERR Hi, I am writing a module that launches a perl script. I would like the user to see the error cenerated by the script in the browser. So far I either get the errors sent to the apache error_log or the browser respons that the document contained no data. Please help! Alex - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Concurrenty access to a log file!!!
There's not Apache::: API for hooking into logging? AFAIK (which isn't to say much) it seems children pass logging information back to the initial process in some queue, et voila? And that 4k when likely be dependent on the kernel filehandle buffer. Which yes, is 4k on your typical x86... -Original Message- From: Stas Bekman [mailto:[EMAIL PROTECTED]] Sent: Friday, December 08, 2000 3:51 PM To: Jerrad Pierce Cc: mod_perl list Subject: RE: Concurrenty access to a log file!!! On Fri, 8 Dec 2000, Jerrad Pierce wrote: If you use Apache's logging facilities (say for level debug). Apache will handle the concurrency/serializing for you. If I remember correctly only if the size of a single warn/print(STDERR,...) 4k, if you are talking about manually logging thru STDERR. _ Stas Bekman JAm_pH -- Just Another mod_perl Hacker http://stason.org/ mod_perl Guide http://perl.apache.org/guide mailto:[EMAIL PROTECTED] http://apachetoday.com http://logilune.com/ http://singlesheaven.com http://perl.apache.org http://perlmonth.com/ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
[OT] mod_motd
Am I losing my mind or is there a mod_motd for Apache floating around? I haven't been able to find it anywhere, but I'm sure I've seen it. (Checked Freshmeat, search engines, and Apache module repository) Thanks - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: mod_perl advocacy project resurrection
It's also dog slow. Has too many requirements (why should I *have* to install their Python on win32 if I'm a perl developer? or vice versa) Not terribly useful (very little syntax highlighting, little tabbing support). And the fact that it assumes you have perl 5.6, and whines when you don't. Though there is no requiremenet for such. -Original Message- From: Robin Berjon [mailto:[EMAIL PROTECTED]] Sent: Wednesday, December 06, 2000 4:41 PM To: brian moseley Cc: Matthew Kennedy; mod_perl list Subject: Re: mod_perl advocacy project resurrection At 12:39 06/12/2000 -0800, brian moseley wrote: ActiveState has built an Perl/Python IDE out of Mozilla: http://www.activestate.com/Products/Komodo/index.html too bad it's windows only :/ That's bound to change. I think AS will release it on all platforms where Moz/Perl/Python run when it's finished. The current release is very unstable anyway. -- robin b. All paid jobs absorb and degrade the mind. -- Aristotle - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: WebDAV support in mod_perl
That's the one that (used to be)|is slow... -Original Message- From: Aaron Johnson [mailto:[EMAIL PROTECTED]] Sent: Wednesday, November 29, 2000 9:26 PM To: [EMAIL PROTECTED] Cc: [EMAIL PROTECTED] Subject: Re: WebDAV support in mod_perl Is the HTTP::DAV module of any use? I just ran across it in TPJ. http://theoryx5.uwinnipeg.ca/CPAN/data/HTTP-DAV/DAV.html Aaron Joao Pedro Goncalves wrote: Hi, is there any current project going on for using the WebDAV protocol in mod_perl, something like Apache::WebDAV? I am familiar with the mod_dav efforts however they seem to be oriented to filesystem repositories and i would like to use WebDAV in a more dynamic environment such as repositories being in a database, or for supporting new stuff like Outlook HTTPmail, that uses WebDAV to connect to Hotmail. If not, is there any people out there interested in starting one? Core features of the WebDAV protocol already have several CPAN modules that would help its development, such as locking and XML processing. Thanks in advance, Joao Pedro -- João Pedro Gonçalves www.sapo.pt - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: WebDAV support in mod_perl
Interesting idea. Hadn't though of it. Can't say I'd be able to commit much, more of a lurker. But you have my moral support! One thing though. last time I used the DAV module it was deathly slow. That may have been fixed... Another thought, is if you add in file support, that you could heed User and Group directives when writing files (mod_dav does, and will not). -Original Message- From: Joao Pedro Goncalves [mailto:[EMAIL PROTECTED]] Sent: Wednesday, November 29, 2000 11:22 AM To: [EMAIL PROTECTED] Subject: WebDAV support in mod_perl Hi, is there any current project going on for using the WebDAV protocol in mod_perl, something like Apache::WebDAV? I am familiar with the mod_dav efforts however they seem to be oriented to filesystem repositories and i would like to use WebDAV in a more dynamic environment such as repositories being in a database, or for supporting new stuff like Outlook HTTPmail, that uses WebDAV to connect to Hotmail. If not, is there any people out there interested in starting one? Core features of the WebDAV protocol already have several CPAN modules that would help its development, such as locking and XML processing. Thanks in advance, Joao Pedro -- João Pedro Gonçalves www.sapo.pt - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: security suggestion
Perhaps you ought to gfind a way to use Safe; then? -Original Message- From: Richard L. Goerwitz [mailto:[EMAIL PROTECTED]] Sent: Thursday, November 16, 2000 9:09 AM To: mod_perl list Subject: security suggestion At Doug's suggestion I'm moving a brief conversation we've had in private to this list so others can get involved. I've been following out the security implications of mod_perl here at Brown University, and from what I can see, enabling it gives people the same basic access privileges that ExecCGI does. How does it do this? Well, for one thing, you can inject arbitrary Perl code at any stage in the Apache request cycle by using a literal PerlWhateverHandler 'sub { ... }' in an htaccess file. You can also specify PerlWhateverHandler Some::Arbitrary::Path::To::An::Arbitrary::Module.pm I've been thinking that, since giving users the ability to do these things is essentially like giving them ExecCGI privileges, that these things should only be allowed where the ExecCGI option is turned on. There's also the problem, if a person can ExecCGI, that they can then use Apache (), and then access all dir_config, notes, and other settings. At times it may be useful for a systems administrator to create private dir_config variables that run-of-the-mill CGI scripts simply can't see. These are two separate issues, of course. The more pressing one, I think, is the first, namely that we need to tie the ability to use arbitrary Perl subroutines and arbitrary Perl modules (i.e., modules in non-system paths) to the ExecCGI option. I realize that forcing us all to turn ExecCGI on for directories where we want to use arbitrary Perl subroutines would be a bit of a pain at this point. So for the current 1.24_0x series I'd suggest adding some new "paranoid" compile-time option that would deny arbitrary subs and modules in non-system paths unless ExecCGI is enabled. Another idea that I haven't really thought through would be to create some new PerlLiteralSubs On|Off directive that could not be overridden once turned on. For the future, though, it might be useful to tie arbitrary subs and the ability to use Perl modules to ExecCGI. ExecCGI-like privileges something a sysadmin should always have to decide to do. My sense is that they should never be turned on implicitly, e.g., by simply adding and enabling a module. Does this make sense to anyone else? -- Richard Goerwitz [EMAIL PROTECTED]
RE: dynamic vs. mostly static data
Yeah that was it But you could probably even use Memoize for somehting like this? -Original Message- From: Peter Haworth [mailto:[EMAIL PROTECTED]] Sent: Friday, November 03, 2000 12:43 PM To: Jerrad Pierce; 'Neil Conway'; ModPerl List Subject: RE: dynamic vs. mostly static data It might have been my Cache::Mmap module, which is ideal for this kind of thing. It depends on what your data looks like though, of course. On Thu, 2 Nov 2000 16:48:24 -0500 , Jerrad Pierce said: There is a query caching module someone posted here redently... Or was it proposed and beta-ish? Another thing you might consider doing is having a cron job do your periodic (10 min.) fetch and store it as a file somewhere... Then use SSI or some more mod_perl-ish means of including this static content... -Original Message- From: Neil Conway [mailto:[EMAIL PROTECTED]] Sent: Thursday, November 02, 2000 4:45 PM To: ModPerl List Subject: dynamic vs. mostly static data I'm writing a web app in mod_perl, using a PostgreSQL database backend and HTML::Template. In looking for ways to optimize performance, I noticed that although my code is doing several (say, 4-5) database queries per handler/webpage, a large part of the data (~2 queries) is mostly static (it will change perhaps once per week, or once per month). It's obviously inefficient to run these queries on the database for every single request. How can I 'cache' this data so that all Apache children can access it quickly? Is there a way to automatically update this cache periodically (say every 10 minutes)? Also, this solution should work on any reasonably modern UNIX system (Win32 is not important for now). I couldn't find this anywhere, but if someone tells me where, I'd be happy to RTFM. Ask me if you need more info. -- Peter Haworth [EMAIL PROTECTED] "Writing for a penny a word is ridiculous. If a man really wants to make a million dollars, the best way would be to start his own religion." -- L. Ron Hubbard
RE: dynamic vs. mostly static data
There is a query caching module someone posted here redently... Or was it proposed and beta-ish? Another thing you might consider doing is having a cron job do your periodic (10 min.) fetch and store it as a file somewhere... Then use SSI or some more mod_perl-ish means of including this static content... -Original Message- From: Neil Conway [mailto:[EMAIL PROTECTED]] Sent: Thursday, November 02, 2000 4:45 PM To: ModPerl List Subject: dynamic vs. mostly static data I'm writing a web app in mod_perl, using a PostgreSQL database backend and HTML::Template. In looking for ways to optimize performance, I noticed that although my code is doing several (say, 4-5) database queries per handler/webpage, a large part of the data (~2 queries) is mostly static (it will change perhaps once per week, or once per month). It's obviously inefficient to run these queries on the database for every single request. How can I 'cache' this data so that all Apache children can access it quickly? Is there a way to automatically update this cache periodically (say every 10 minutes)? Also, this solution should work on any reasonably modern UNIX system (Win32 is not important for now). I couldn't find this anywhere, but if someone tells me where, I'd be happy to RTFM. Ask me if you need more info. TIA, Neil -- Neil Conway [EMAIL PROTECTED] Get my GnuPG key from: http://klamath.dyndns.org/mykey.asc Encrypted mail welcomed "The superior man understands what is right; the inferior man understands what will sell." -- Confucius
RE: Apache::Session - kludgy workaround?
Reading the directions ;-) Apache::Session doesn't do any deep checking, if a top level doesn't value doesn't change it may not detect the change. This is why your workaround works... The offically recommend workaround (I believe) is to keep a timestamp as a top level value in the hash... -Original Message- From: Ian Mahuron [mailto:[EMAIL PROTECTED]] Sent: Wednesday, October 04, 2000 2:48 PM To: ml: mod_perl Subject: Apache::Session - kludgy workaround? If I repeatedly write to: $session{foo}{bar} I find that I have to do something like: $session{smack}++; to get it to write when the hash is untied. Is there a better way to do this? TIA ian
OT: use problem (need interpolation)
Is there anyway to fool perl into letting you do a: use Foo ($bar, 'baz', 'quux'); ?? Foo is only getting 'baz' and 'quux', the value of $bar is lost in the ether. I have tried many ways of trying to sneak it past but none seems to work... Thanks
RE: OT: use problem (need interpolation)
Thanks... as It turns out I had to use both a BEGIN{} to set the variables and an eval{} around the use (don't ask, it's some rather ugly stuff...). autouse wasn't quite whta I needed (the module I'm using contains no functions, just a big hash) -Original Message- From: David Mitchell [mailto:[EMAIL PROTECTED]] Sent: Thursday, September 28, 2000 10:53 AM To: [EMAIL PROTECTED] Cc: [EMAIL PROTECTED] Subject: Re: OT: use problem (need interpolation) From: Jerrad Pierce [EMAIL PROTECTED] Is there anyway to fool perl into letting you do a: use Foo ($bar, 'baz', 'quux'); 'use' lines are executed very early on during script loading: use Foo x y z is roughly equivalent to BEGIN { require Foo; import Foo x y z } so $bar is likely to be undefined unless you also set it in a BEGIN section, eg BEGIN { $bar = } use Foo ($bar, 'baz', 'quux'); or use 'require' instead of 'use' if you can tolerate the module being loaded late, eg $bar = ; require Foo; import Foo ($bar, 'baz', 'quux'); * Dave Mitchell, Operations Manager, * Fretwell-Downing Facilities Ltd, UK. [EMAIL PROTECTED] * Tel: +44 114 281 6113.The usual disclaimers * * Standards (n). Battle insignia or tribal totems
RE: open - does not work
No... that opens a handle to ehir INPUT output is open(OUT, "magic_open |"); Or you could just slurp in a string with $_ = `normal_open`; -Original Message- From: Vsevolod Ilyushchenko [mailto:[EMAIL PROTECTED]] Sent: Thursday, September 28, 2000 5:17 PM To: Doug MacEachern Cc: [EMAIL PROTECTED] Subject: Re: open "-" does not work Why does this script give no output under mod_perl, but works fine from the command line: #!/usr/bin/perl -w use CGI; print CGI-header(); open (AAA, "-"); because the C level stdout is not hooked up to the client. you can do this as an alternative: if ($ENV{MOD_PERL}) { tie *AAA, 'Apache'; } else { open (AAA, "-"); } Doug, Thanks, this works. However, it also gives me the following error: Can't locate object method "FETCH" via package "Apache" at /usr/lib/perl5/site_perl/5.005/i386-linux/Apache/PerlRun.pm line 310. Besides, what is the incantation to be able to open pipes to programs and capture their output: open (AAA, "|some_program"); Simon -- _ | x | Simon (Vsevolod ILyushchenko) [EMAIL PROTECTED] | y = e | |_| http://www.simonf.com [EMAIL PROTECTED] Disclaimer: This is not me. This is just my mailer talking to your mailer...
RE: Why it prompt Multiple time for Authentication ???
This was covered previously, perhaps it should be covered in a FAQ? If your NT PDC is slow, occasionally an authentication attempt will take too long, and return a status, which the module mistakenly regards as an error and reprompts for authentication information -Original Message- From: Sambit Nanda [mailto:[EMAIL PROTECTED]] Sent: Monday, September 25, 2000 11:51 AM To: [EMAIL PROTECTED] Subject: Why it prompt Multiple time for Authentication ??? Hi perl Experts Here is the problem : 1. I am using Apache 1.3.11 + openssl + mod _ssl + mod _perl + mod_php on my web server 2. I have the Module Installed call "Authen::Smb" for Authentication with Win NT PDC from Apache . Problem : I do not understand Some time My web server ask for Password repeated time for each session and some time it won't. I mean once u login and go to next page or location of the seem application it ask again the password. and some time it works very fine. What can be the Error. Why it happening so Funny.. ?? 3. Is Multiple PDC Authentication Module with Apache released or Not ?? I need a kind attention of Joshu Gerth on this issue.. Any help would be appreciated Thanks Sambit Nanda Unix Admin __ Do You Yahoo!? Send instant messages get email alerts with Yahoo! Messenger. http://im.yahoo.com/
RE: How can I tell if Apache::ASP is available?
Yes. --begin hello.asp %= "Hello World" % --end hello.asp -Original Message- From: Jason [mailto:[EMAIL PROTECTED]] Sent: Wednesday, September 13, 2000 3:04 PM To: 'Jerrad Pierce' Cc: [EMAIL PROTECTED] Subject: RE: How can I tell if Apache::ASP is available? Thanks .. I typed this: [root admin]# perl use Apache::ASP; print "Hello World\n"; then pressed Ctrl-D, and it output: Hello World [root admin]# So, I assuming that means it's working. When I type lwp-request command, I get this: Connection: close Date: Wed, 13 Sep 2000 19:11:26 GMT Accept-Ranges: bytes Server: Apache/1.3.12 Cobalt (Unix) mod_ssl/2.6.4 OpenSSL/0.9.5a PHP/4.0.1pl2 mo d_auth_pam/1.0a FrontPage/4.0.4.3 mod_perl/1.24 Which I believe means that mod_perl 1.24 is installed. So by that rational, can someone on our server now program with mod_perl and Apache::ASP?? -Original Message- From: Jerrad Pierce [mailto:[EMAIL PROTECTED]] Sent: Wednesday, September 13, 2000 2:56 PM To: Jason Ables; [EMAIL PROTECTED] Subject: RE: How can I tell if Apache::ASP is available? prompt# perl use Apache::ASP; print "Hello World\n"; ^D If you get no errors it's there -Original Message- From: Jason [mailto:[EMAIL PROTECTED]] Sent: Wednesday, September 13, 2000 2:28 PM To: [EMAIL PROTECTED] Subject: How can I tell if Apache::ASP is available? This is the output of my httpd -l command .. how can I tell if Apache::ASP is available? [admin admin]$ httpd -l bash: httpd: command not found [admin admin]$ /usr/sbin/httpd -l Compiled-in modules: http_core.c mod_so.c mod_perl.c suexec: disabled; invalid wrapper /usr/sbin/suexec [admin admin]$
RE: [OT?] Cross domain cookie/ticket access
Cookies cannot be shared across domains (except the supercookie, due to a bug in IE and Netscape? See http://cookiecentral.com for more info) Cookies are bound to either a domain (domain.com) or a FQDN host.domain.com Netscape sees everything as a FQDN if you select originating server only. This means host1.domain.com cannot see host2.domain.com's cookies. And in all cases (except super promiscuous cookie) host1.domain.com cannot see host1.domain2.com's cookies... -Original Message- From: darren chamberlain [mailto:[EMAIL PROTECTED]] Sent: Friday, September 08, 2000 10:24 AM To: Joe Pearson Cc: [EMAIL PROTECTED] Subject: Re: [OT?] Cross domain cookie/ticket access Joe Pearson ([EMAIL PROTECTED]) said something to this effect: I thought you could set a cookie for a different domain - you just can't read a different domain's cookie. So you could simply set 3 cookies when the user authenticates. You sure can -- otherwise Navigator wouldn't have the "Only accept cookies originating from the same server as the page being viewed" option. Set-Cookie: foo=my%20foot%20hurts; domain=.apache.org; path=/; expires=*mumble* (darren) -- Any technology indistinguishable from magic is insufficiently advanced.
RE: init in Apache::ASP
No. But you can create subroutines and call them... Or setup an include which defines various things to be subsitiuted... -Original Message- From: Issam W. Alameh [mailto:[EMAIL PROTECTED]] Sent: Friday, September 08, 2000 1:35 PM To: Modperl list Subject: init in Apache::ASP Hello All, Can I put my asp code at the end of my html page, but let it execute before showing the html??? I want to have something like Hello %=$name% % $name="something"; % Can this show Hello something Regards Issam
RE: multilanguage site
Try this: http://webtechniques.com/archives/2000/09/yunker/ and perhaps this: http://webtechniques.com/archives/2000/09/lagon/ -Original Message- From: Matt Sergeant [mailto:[EMAIL PROTECTED]] Sent: Tuesday, August 29, 2000 9:16 AM To: Francesco Pasqualini Cc: [EMAIL PROTECTED] Subject: Re: multilanguage site On Tue, 29 Aug 2000, Francesco Pasqualini wrote: can someone suggest me the best way to build a multilanguage web site (english, french, ..). I'm using Apache + mod_perl + Apache::asp (for applications) Can be usefull XML/XSL whit AxKit ? Is there any example/guideline ? This month's Web Techniques is all about this (albeit in a framework independant manner). I suggest you try as hard as you can to get a copy as it covers way more than I could possibly type here. Also look up content negotiation in the Apache docs. -- Matt/ Fastnet Software Ltd. High Performance Web Specialists Providing mod_perl, XML, Sybase and Oracle solutions Email for training and consultancy availability. http://sergeant.org | AxKit: http://axkit.org
Apache::Config
Is it just me or has there been discussionof something along the lines of Apache::Config here before? Where might I accquire it? I could not find it on CPAN...
VB parser
So what happened to the VB parser? Is it going forward?
RE: Adding values to Session file
Not with so little information... Afew ideas though: I assume you are speaking of Apache::Session? Are you adding values lower than the top level? The man page clearly states no deep checking is done to determine if modifications have been made... Have you tried explicitly untie'ing? -Original Message-From: Differentiated Software Solutions Pvt. Ltd [mailto:[EMAIL PROTECTED]]Sent: Friday, August 18, 2000 9:04 AMTo: [EMAIL PROTECTED]Subject: Adding values to Session file Hi, We have a site where we create a session file on login and tie some values. After a few page visits we want to add more values to the session file again using tie. We find that only the first set of values get added. Subsequent values do not get added to this file. Can somebody tell us what the problem is ?? Regards, Murali Differentiated Software Solutions Pvt. Ltd.176, Ground Floor, 6th Main,2nd Block, RT NagarBangalore - 560032Phone : 91 80 3431470www.diffs-india.com
RE: canned footers
This already exists, can't get more canned than that. checkout mod_layout here: http://www.tangent.org/mod_layout/ Granted it's not a perl module, but it works and is rather customizable... -Original Message- From: Alex Menendez [mailto:[EMAIL PROTECTED]] Sent: Wednesday, August 16, 2000 1:26 PM To: [EMAIL PROTECTED] Subject: canned footers hello, all I am trying to write a module that generates a canned footer for all html and cgi pages on my site. the html part is pretty easy and I have already implemented it. However, I am currently having trouble adding it to standalone cgi scripts that are not parsed by the server. I have tried a number of variations with mod_perl subrequests but none of them seem to work right. I also thought about reading the scripts contents in the module and using eval. However, that seems a little cumbersome. Have any of you implemented such thing before? Any ideas? -amen
RE: Proxy setup w/ SSL
F5 makes load balancers -Original Message- From: ___cliff rayman___ [mailto:[EMAIL PROTECTED]] Sent: Wednesday, August 09, 2000 1:18 PM To: modperl Subject: Re: Proxy setup w/ SSL siberian wrote: . In the F5 world KeepAlives destroy rules based load sorry - but what's an F5 box? -- ___cliff [EMAIL PROTECTED]http://www.genwax.com/
RE: was Re: template kit..... - now session handling
2) The name change should happen. However, there is already a Persistent:: set of classes, that is somewhat similar to Apache::Session. For example, it implements LDAP, MySQL, Oracle, Sybase, mSQL, and File storage. These classes use all object calls e.g. $persistent-add_attribute(). So the chief difference seems to be the flexibility of the tied interface of Apache::Session (also mine is faster :) So how does Persistent::TiedHash sound? Hooray! 3) The Apache::Session name whould be used for a module that actually manages the interaction between mod_perl and the browser. The only problem I can see is that this module would have to start out at 2.0 or something, to avoid confusing CPAN. ALternately, it could be called Apache::SessionManager instead. It could also be called Apache::Persistant ?
RE: Templating System
Yes, a cookie-munging facility would be nice -Original Message- From: Drew Taylor To: David Hodgkinson Cc: [EMAIL PROTECTED] Sent: 7/28/2000 10:25 AM Subject: Re: Templating System David Hodgkinson wrote: Drew Taylor [EMAIL PROTECTED] writes: While I would love to have the session management form goodies of the other template systems, our production people are not ready for it (yet). Keep up the excellent work on these other frameworks - I might get to use them one day. :-) There's no reason why you can't use Apache::Session from within some code backing a TT script. True. Except for the fact that I have already spent the time to do my own session tracking in my own custom sort of way. :-) I guess what I would like most is a framework that did everything (session management via cookies or URL [automagically], forms prefilling, etc) for me. Having done it myself once, I know that the problem is larger than it sounds and why re-implement the wheel? For this reason, I am very interested in Embperl 2.0 and Apache::ASP. -- Drew Taylor Vialogix Communications, Inc. 501 N. College Street Charlotte, NC 28202 704 370 0550 http://www.vialogix.com/
RE: Templating system
So quit whining ask him to allow LGPL. I've found most GPL authors are more than willing to allow LGPL... -Original Message- From: Matt Sergeant [mailto:[EMAIL PROTECTED]] Sent: Thursday, July 27, 2000 1:22 PM To: Paul J. Lucas Cc: [EMAIL PROTECTED] Subject: Re: Templating system On Thu, 27 Jul 2000, Paul J. Lucas wrote: On Thu, 27 Jul 2000, Matt Sergeant wrote: http://www.best.com/~pjl/software/html_tree/ Aside from the GPL, it does looks nice. What's wrong with the GPL? It's open-source and free of cost. What more do you want? The ability to build commercial applications. -- Matt/ Fastnet Software Ltd. High Performance Web Specialists Providing mod_perl, XML, Sybase and Oracle solutions Email for training and consultancy availability. http://sergeant.org | AxKit: http://axkit.org
RE: mod_eprl or PHP
With all due respect, what the hell are you smoking? PHP is an ENTIRELY different beast from perl, or mod_perl. http://php.net has absolutely nothing to do with Larry Wall -Original Message- From: Erich L. Markert [mailto:[EMAIL PROTECTED]] Sent: Wednesday, July 26, 2000 12:41 PM To: [EMAIL PROTECTED] Subject: Re: mod_eprl or PHP This is also comparing apples and oranges since PHP requires mod_perl... A better comparison would be HTMLEmbperl vs. PHP Or mod_perl vs. java server pages, ASP, etc...
RE: save as
It's being sent as a content-type that the web-server/browser doesn't know how to handle -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] Sent: Tuesday, July 25, 2000 5:37 PM To: [EMAIL PROTECTED] Subject: save as Hello folks, This may be a weak question, but I have to ask it anyway. I have a script running under mod_perl. It works fine, but every once in a while the browser/\"web server\" offers to save the script instead of executing it. Any ideas ? Thanks! Arshavir
RE: Why mod_perl does not like File::Recurse module?
But nobody is typically a rather priveleged account... -Original Message- From: Perrin Harkins [mailto:[EMAIL PROTECTED]] Sent: Tuesday, July 11, 2000 2:45 PM To: Alexei V. Barantsev Cc: [EMAIL PROTECTED] Subject: Re: Why mod_perl does not like File::Recurse module? On 11 Jul 2000, Alexei V. Barantsev wrote: From command line all is ok HTML LANG="en-US"HEADTITLEUntitled Document/TITLE /HEADBODYPFile::Copy::copydir ok/P PFile::Recurse::recurse ok/P/BODY/HTML In mod_perl I have the the different result HTML LANG="en-US"HEADTITLEUntitled Document/TITLE /HEADBODYPFile::Copy::copydir ok/P PFile::Recurse::recurse failed/P/BODY/HTML Why mod_perl does not like File::Recurse module??? Probably permissions. Under mod_perl you are running as "nobody". - Perrin
RE: What is *.xs file?
Umm this list is for perl as a module in apache not modules for perl... However, .xs is a special blend of C for writing perl modules try man perlxs -Original Message- From: Sam Xie [mailto:[EMAIL PROTECTED]] Sent: Wednesday, July 05, 2000 6:06 PM To: [EMAIL PROTECTED] Subject: What is *.xs file? Hi! There, I am learning to write a perl module. I saw someone's AFS.pm module, in which, he wrote a AFS.xs file in C. I don'e know what .xs extension means and how to write it? If someone knows it, it will be gratefull to help me to understand it! Thanks! Sam
Apache::Session
Has anybody started/interested in an imnplementation using DBD::RAM?
RE: mod_perl vs. FastCGI
There was a recent article in WebTechniques comparing the two http://www.webtechniques.com/archives/2000/05/infrrevu/ -Original Message- From: Scott Thomason [mailto:[EMAIL PROTECTED]] Sent: Wednesday, June 21, 2000 4:56 PM To: [EMAIL PROTECTED] Subject: re: mod_perl vs. FastCGI You said: Most people on this list probably have already determined that mod_perl is better for their own needs. That`s why I`m here, at least. But "better" is a very subjective term, and you need to define your parameters. What are your goals, what are your constraints, what is your experience, etc., are all questions you need to answer before you can decide whether one technology is more suitable for you to use on a given project than any other technology. OK, my goal is simple: I want my Perl scripts to run lightening fast, ideally without bloating the memory requirements of my webserver. I'm a good Perl developer. I've used mod_perl a little in the past, and spent many agonizing hours cleaning up one-shot CGI scripts so they would work (and on some, I just plain gave up and let them run slow). Last project, I gave FastCGI a whirl (via mod_fastcgi and CGI::Fast) and was delightfully surprised to find there was no headache involved, only benefit. Which got me to wondering, why all the buzz over Apache::Registry if FastCGI offers the same speed without the server bloat or coding restrictions? So, given that, here's the question again: why would you choose Apache::Registry over FastCGI? I want to be a believer... ---scott
RE: Help writting a module for Apache.
Apache::Authen? As for your method, 401 username password stuff is always accessible via: $ENV{AUTHORIZATION} o _ /|/ | Jerrad Pierce \ | __|_ _| /||/ http://pthbb.org . | _| | \|| _.-~-._.-~-._.-~-._@" _|\_|___|___| -Original Message- From: Ariel Manzur [mailto:[EMAIL PROTECTED]] Sent: Monday, May 29, 2000 09:09 To: [EMAIL PROTECTED] Subject: Help writting a module for Apache. Hi.. I need Apache to do this: always ask for basic authentication, and then accept any conbination of username/password as correct, and set an enviroment variable with the password sent on the request, so I can retrieve that on a CGI script, and do the real authentication there. I couldn't find a way to do that with the 'standard' apache modules, so I have to write one, and I have some questions: - is that any module that alredy does that? :) - Can anyone point me to a "real life" example, or guide, on how to write and install a module using mod_perl? I use perl a lot, but I could find "easy" documentation on how to write modules (I don't want to read a _huge_ man page for this simple task) Can anyone help? Thanks!! Bye.. Ariel.
RE: sendMail in cgi program
This is not for CGI however, the problem is simple. EOF must be at the beginning of the line, no white space in front of it o _ /|/ | Jerrad Pierce \ | __|_ _| /||/ http://pthbb.org . | _| | \|| _.-~-._.-~-._.-~-._@" _|\_|___|___| -Original Message- From: amy [mailto:[EMAIL PROTECTED]] Sent: Monday, June 12, 2000 15:55 To: [EMAIL PROTECTED] Subject: sendMail in cgi program if I run the same procedure on a separate file, email works, once I put the proc in the cgi file, I got the following error. in error_log : Can't find string terminator "EOF" anywhere before EOF at /usr/local/bin/apache/cgi-bin/lib.pl line 484. sub sendEmail { open (Sendmail, "|/usr/lib/sendmail -oi -t ") or die "Can't fork for sendmail: $!\n"; 484 print Sendmail "EOF"; From: Bugs amy\@longsys.com To: amy amy\@longsys.com Subject: Test Create test create EOF close(Sendmail); } Please help. Thank You.
RE: Apache, Mod_Perl and Custom Access/Authentication
A server issues Set-Cookie: a client replies with Cookie: o _ /|/ | Jerrad Pierce \ | __|_ _| /||/ http://pthbb.org . | _| | \|| _.-~-._.-~-._.-~-._@" _|\_|___|___| -Original Message- From: Drew Taylor [mailto:[EMAIL PROTECTED]] Sent: Thursday, June 08, 2000 18:11 To: Paul Cc: modperl Subject: Re: Apache, Mod_Perl and Custom Access/Authentication Paul wrote: Drew wrote: Going by your previous example, you should use $cookie = $r-header_in('Set-Cookie'); Quick reality check here -- I'm easy to confuse. =o) Shouldn't that be $cookie = $r-header_in('Cookie') to get cookies the browser sends, and then something like $r-headers_out-add('Set-Cookie' = "$name=$val") to place new ones? I'm pretty sure I'm right on this one. ;-) $r-headers_in|out are getting/setting actual HTTP headers. Last I checked, the HTTP spec says you use 'Set-Cookie' for cookies. Of course, I am frequently wrong as well, but I don't think I am in this case. -- Drew Taylor Vialogix Communications, Inc. 501 N. College Street Charlotte, NC 28202 704 370 0550 http://www.vialogix.com/
RE: [performance/benchmark] printing techniques
What about heredoc with the magical @{} technique for interpolating functions? or Text::iPerl ? I'd be interested in knwing how they stack up o _ /|/ | Jerrad Pierce \ | __|_ _| /||/ http://pthbb.org . | _| | \|| _.-~-._.-~-._.-~-._@" _|\_|___|___|
RE: Data structure question
you can use sort, of the values are hashes or indexes: foreach ( sort { $a-{name} cmp $b-{name} keys %hash ) or foreach ( sort { $a-[0] cmp $b-[0] keys %hash ) o _ /|/ | Jerrad Pierce \ | __|_ _| /||/ http://pthbb.org . | _| | \|| _.-~-._.-~-._.-~-._@" _|\_|___|___| -Original Message- From: Drew Taylor [mailto:[EMAIL PROTECTED]] Sent: Tuesday, June 06, 2000 14:56 To: Ken Miller Cc: modperl Subject: Re: Data structure question Ken Miller wrote: Well, if the keys are unique, you could just return a hashref, and then access it using sorted keys: foreach( sort keys %$HR ) { ## insert useful stuff here } If only I could just use sort. :-) The order could be completely arbitrary, based on search parameters, individual rankings, etc. Are there any de-referenceing issues (performance wise) that would make this less efficient than the 2 structures? TIA for any pointers. My guess was that whatever overhead there was with de-referencing, it would more than make up for it in the memory usage. And since I'm running mod_perl with perl's malloc(), the extra memory doesn't get returned until the child exists. Probably not, except your method takes more mems, since you're returning an extra array. 'Course, the sort takes mems as well, but not as much as the extra array. And, there is the overhead of sorting the keys. I think an array of hashref's is probably the best bet. Then you can use the DBs sort, and just build the array on the fly, once. For the site I'm working on, I return a reference to a ResultSet object which through the next() method returns the next row in the result set: That is a very neat idea. From a logical point of view, I like it. However, in my case that would be unnecessary overkill. I'll file it away for future use. :-) -- Drew Taylor Vialogix Communications, Inc. 501 N. College Street Charlotte, NC 28202 704 370 0550 http://www.vialogix.com/
RE: cleaning old Apache::Session's
I think he means that the session is removed from the server, but the sesion ID (cookie) was not set to expire... o _ /|/ | Jerrad Pierce \ | __|_ _| /||/ http://pthbb.org . | _| | \|| _.-~-._.-~-._.-~-._@" _|\_|___|___| -Original Message- From: Niral Trivedi [mailto:[EMAIL PROTECTED]] Sent: Friday, June 02, 2000 10:09 To: Tobias Hoellrich Cc: Adam Cassar; [EMAIL PROTECTED] Subject: Re: cleaning old Apache::Session's Tobias, What do you exactly mean by line 'Internally the session will expire after 30 minutes.'??? Is it something internal to Apache::Session or you have it programmed on custom basis or what??? Niral Tobias Hoellrich wrote: At 09:26 AM 6/2/00 +1000, Adam Cassar wrote: I was wondering how people are clearing out old Apache::Session's No timestamp is used on the fields used by Apache::Session, so how do we clear the old sessions? I am not talking about the delete() method to remove a session, as that presumes that a user will always leave your site via pre-defined access points. Adam, nobody stops you from adding a timestamp :-) mysql describe sessions; +---+---+--+-+-+---+ | Field | Type | Null | Key | Default | Extra | +---+---+--+-+-+---+ | id| varchar(16) | | MUL | | | | modtime | timestamp(14) | YES | | NULL| | | a_session | blob | YES | | NULL| | +---+---+--+-+-+---+ 3 rows in set (0.00 sec) For every access to a session entry mysql will automatically set the first timestamp field in a row to the current time. We run a cronjob every 15 minutes, which does a: #!/bin/sh /usr/local/mysql/bin/mysql -px -u sessions EOSQL delete from sessions where time_to_sec(now()) - time_to_sec(modtime) 60*60; EOSQL to clear any session entry older than one hour. Internally the session wil expire after 30 minutes. Hope this helps Tobias
Apache::Session::File
Anybody know why Apcahe::Session::Lock::File.pm uses lock FILES instead of flocking the file? It seems to be causing problems with rapdifre access... o _ /|/ | Jerrad Pierce \ | __|_ _| /||/ http://pthbb.org . | _| | \|| _.-~-._.-~-._.-~-._@" _|\_|___|___|
RE: Apache::Session::File
My bad, it does seem to be using flock, but it still seems to be the consistent point of failure.. and I am untieing immediately after use o _ /|/ | Jerrad Pierce \ | __|_ _| /||/ http://pthbb.org . | _| | \|| _.-~-._.-~-._.-~-._@" _|\_|___|___| -Original Message- From: Jerrad Pierce [mailto:[EMAIL PROTECTED]] Sent: Friday, June 02, 2000 12:43 To: '[EMAIL PROTECTED]' Subject: Apache::Session::File Anybody know why Apcahe::Session::Lock::File.pm uses lock FILES instead of flocking the file? It seems to be causing problems with rapdifre access... o _ /|/ | Jerrad Pierce \ | __|_ _| /||/ http://pthbb.org . | _| | \|| _.-~-._.-~-._.-~-._@" _|\_|___|___|
RE: Wierd problem with redirect
I'm running into an odd redirect ptoblem myself, I'm issuing: HTTP/1.1 302 Moved Temporarily\n\r Date: Tue 30 May 2000 18:18:07 GMT\n\r Server: Apache/1.311\n\r Set-Cookie: SESSION_ID=4177a0c9ae2b278decd6038901b28a2a; path=/; expires=Thu, 1-Jan-70 00:20:00 GMT;\n\r Location: /\n\r And the browser gets the cookie, but it does not redirect... It displayes the Locaiton as the document content o _ /|/ | Jerrad Pierce \ | __|_ _| /||/ http://pthbb.org . | _| | \|| _.-~-._.-~-._.-~-._@" _|\_|___|___|
RE: Wierd problem with redirect
Yeah, and I got it towork, turns out I needed an absolute path too. I saw that answer but since the reasn that was given is because it's in Apache, it didn't seem to apply. I guess the real reason is brower's are just too brain dead to handle it... o _ /|/ | Jerrad Pierce \ | __|_ _| /||/ http://pthbb.org . | _| | \|| _.-~-._.-~-._.-~-._@" _|\_|___|___| -Original Message- From: ___cliff rayman___ [mailto:[EMAIL PROTECTED]] Sent: Tuesday, May 30, 2000 17:31 To: Wim Kerkhoff; [EMAIL PROTECTED] Subject: Re: Wierd problem with redirect actually \n\r\ is really how it is supposed to be. i am sure you will find it in the RFC's. most browsers seem to be okay with \n's only. -- ___cliff [EMAIL PROTECTED] Wim Kerkhoff wrote: On 30-May-2000 Jerrad Pierce wrote: I'm running into an odd redirect ptoblem myself, I'm issuing: HTTP/1.1 302 Moved Temporarily\n\r Date: Tue 30 May 2000 18:18:07 GMT\n\r Server: Apache/1.311\n\r Set-Cookie: SESSION_ID=4177a0c9ae2b278decd6038901b28a2a; path=/; expires=Thu, 1-Jan-70 00:20:00 GMT;\n\r Location: /\n\r And the browser gets the cookie, but it does not redirect... It displayes the Locaiton as the document content Why are you tacking the \r onto each line? You don't need to do that, AFAIK. After the last line in the header, you always need to put a double newline, ie, change your last line to: Location: /\n\n Regards, Wim Kerkhoff, Software Engineer NetMaster Networking Solutions [EMAIL PROTECTED]
RE: Consolidated Log Files
http://www.virtualschool.edu/lang/perl/CuteTricksPerlApache.html#Logging_to_ syslog o _ /|/ | Jerrad Pierce \ | __|_ _| /||/ http://pthbb.org . | _| | \|| _.-~-._.-~-._.-~-._@" _|\_|___|___|
php And Apache::ASP
Are php3 and ASP mutually exclusive? I enabled mod_perl and mod_php3 (the defaults that come in the RH6.1 distrib) and installed Apache::ASP, and while either or work, if I enable both the server spontaneously combusts. (It will touch the log files if they do not exist, and then disappear). Before I installed Devel::Symdump I would get this in error.log: [Thu Apr 27 06:14:07 2000] [error] [asp] [2726] cannot load Apache::Symbol for UndefRoutine: Can't locate Devel/Symdump.pm in @INC (@INC contains: /usr/lib/perl5/5.00503/i386-linux /usr/lib/perl5/5.00503 /usr/lib/perl5/site_perl/5.005/i386-linux /usr/lib/perl5/site_perl/5.005 . /etc/httpd/ /etc/httpd/lib/perl) at /usr/lib/perl5/site_perl/5.005/i386-linux/Apache/Symbol.pm line 10. -- BEGIN failed--compilation aborted at /usr/lib/perl5/site_perl/5.005/i386-linux/Apache/Symbol.pm line 10. -- BEGIN failed--compilation aborted at (eval 11) line 2. -- thanks! o _ /|/ | Jerrad Pierce \ | __|_ _| /||/ http://pthbb.org . | _| | \|| _.-~-._.-~-._.-~-._@" _|\_|___|___|