segmentation fault when using custom config module
Relevant info: Apache: 1.3.12 mod_perl: 1.24 Perl: 5.00503 gcc 2.95.1 on Linus 2.2.18pre19 I created a module that contains custom configs with the following code: package HTML::Mason::Dispatcher; use ExtUtils::MakeMaker; use Apache::ExtUtils; use Apache::src; my @directives = ( { name = 'MasonCompRoot', errmsg = 'The directory that is the Mason component root', args_how = 'TAKE1', req_override = 'RSRC_CONF', }, { name = 'MasonDataDir', errmsg = 'The Mason data directory', args_how = 'TAKE1', req_override = 'RSRC_CONF', }, { name = 'MasonArgsMethod', errmsg = 'The method used to process arguments (CGI.pm or mod_perl)', args_how = 'TAKE1', req_override = 'RSRC_CONF', }, ); local $^W; Apache::ExtUtils::command_table(\@directives); WriteMakefile( NAME= 'HTML::Mason::Dispatcher', VERSION_FROM = 'Dispatcher.pm', INC = Apache::src-new-inc, ); The Dispatcher.pm files contains the following code: package HTML::Mason::Dispatcher; use strict; use Apache::ModuleConfig (); use DynaLoader (); use HTML::Mason; use vars qw($VERSION $AH @ISA); $VERSION = '0.01'; @ISA = qw(DynaLoader); use constant DEBUG = 1; __PACKAGE__-bootstrap($VERSION) if $ENV{MOD_PERL}; sub MasonCompRoot ($$$) { my ($cfg, $params, $comp_root) = @_; $cfg-{Mason}{comp_root} = $comp_root; } sub MasonDataDir ($$$) { my ($cfg, $params, $data_dir) = @_; $cfg-{Mason}{data_dir} = $data_dir; } sub MasonArgsMethod ($$$) { my ($cfg, $params, $method) = @_; unless ( $method eq 'CGI' || $method eq 'mod_perl' ) { die "Invalid MasonArgsMethod param: $method\n"; } eval "use HTML::Mason::ApacheHandler ( args_method = '$method' )"; die $@ if $@; } sub handler { eval "use HTML::Mason::ApacheHandler;" unless $HTML::Mason::ApacheHandler::VERSION; my $r = shift; unless ($AH) { my $cfg = Apache::ModuleConfig-get($r); my $interp = HTML::Mason::Interp-new( parser = HTML::Mason::Parser-new, comp_root = $cfg-{Mason}{comp_root}, data_dir = $cfg-{Mason}{data_dir} ); $AH = HTML::Mason::ApacheHandler( interp = $interp ); } return $AH-handle_request($r); } -- My config file contains the following: Perl use lib '/home/autarch/mason-CVS/mason/dist/lib'; /Perl PerlModule HTML::Mason::Dispatcher MasonCompRoot /usr/local/apache/htdocs MasonDataDir /usr/local/apache_mp/mason MasonArgsMethod mod_perl FilesMatch "\.mhtml$" SetHandler perl-script PerlHandler HTML::Mason::Dispatcher /FilesMatch --- Anyway, the configuration directives piece works fine. I added warn statements in the relevant functions and it confirmed that were indeed being called with the correct values. However, when I make a request to a URL that would call the handler method, I get a segmentation fault. I recompiled mod_perl with tracing and set MOD_PERL_TRACE=all. The trace was pretty uninteresting. Here's what I got when starting the server: perl_parse args: '-w' '/dev/null' ...allocating perl interpreter...ok constructing perl interpreter...ok ok running perl interpreter...ok mod_perl: 0 END blocks encountered during server startup loading perl module 'Apache'...loading perl module 'Apache::Constants::Exports'...ok ok loading perl module 'Tie::IxHash'...ok perl_section: /Files perl_section: /Directory perl_section: /Files perl_section: /Directory perl_section: /VirtualHost perl_section: /Location perl_section: /Location loading perl module 'Apache'...ok PerlModule: arg='HTML::Mason::Dispatcher' loading perl module 'HTML::Mason::Dispatcher'...ok bootstrapping Perl sections: arg=HTML::Mason::Dispatcher, keys=10 loading perl module 'Apache'...ok loading perl module 'Tie::IxHash'...ok perl_section: /Files perl_section: /Directory perl_section: /Files perl_section: /Directory perl_section: /VirtualHost perl_section: /Location perl_section: /Location mod_perl: delete $INC{'HTML/Mason/Dispatcher.pm'} (klen=24) blessing cmd_parms=(0xbab4) blessing cmd_parms=(0xbab4) blessing cmd_parms=(0xbab4) init `PerlHandler' stack perl_cmd_push_handlers: @PerlHandler, 'HTML::Mason::Dispatcher' pushing `HTML::Mason::Dispatcher' into `PerlHandler' handlers And here's what's in the error_log file: `PerlRestartHandler' push_handlers() stack is empty PerlRestartHandler handlers returned -1 [Wed Nov 29 02:40:08 2000] [notice] Apache/1.3.12 (Unix) mod_perl/1.24 configured --
Re: segmentation fault when using custom config module
On Wed, 29 Nov 2000, Dave Rolsky wrote: my $cfg = Apache::ModuleConfig-get($r); Try: my $cfg = Apache::ModuleConfig-get($r, __PACKAGE__); -- Matt/ /||** Director and CTO ** //||** AxKit.com Ltd ** ** XML Application Serving ** // ||** http://axkit.org ** ** XSLT, XPathScript, XSP ** // \\| // ** Personal Web Site: http://sergeant.org/ ** \\// //\\ // \\ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Should I use CGI.pm?
On Tue, 28 Nov 2000, quagly wrote: I am working my way through the eagle book. I have not used CGI.pm before. It is used in many (most?) of the examples. Is it worth learning to use it? I am not clear whether the authors are using it because the think it is the best way to go, or because they already know it ( or created it )and it is convenient. I have not done CGI programming before, but have some experience with java servlets. It there a compelling reason I should learn it ( other than that it would help me to understand the book? ) It's much simpler than you think -- Lincoln Stein is the one who wrote and maintains CGI.pm :) (he is the co-author) It's a very good module, but it's quite bloated. So if you need to process forms and you are under mod_perl Apache::Request is the one to go with. Thanks, ~quagly - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] _ Stas Bekman JAm_pH -- Just Another mod_perl Hacker http://stason.org/ mod_perl Guide http://perl.apache.org/guide mailto:[EMAIL PROTECTED] http://apachetoday.com http://jazzvalley.com http://singlesheaven.com http://perl.apache.org http://perlmonth.com/ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Should I use CGI.pm?
except it's a little buggy ! (Apache::Request) I have been obliged to return to CGI.pm, coz libapreq cannot handle correctly the multipart enctype, as for file upload What about the 0.32 ? I'm a bit underskilled to patch and compile such a tool, but If someone can help me, I will be pleased to start the process. tmb - Original Message - From: "Stas Bekman" [EMAIL PROTECTED] To: "quagly" [EMAIL PROTECTED] Cc: "mod_perl list" [EMAIL PROTECTED] Sent: Wednesday, November 29, 2000 11:41 AM Subject: Re: Should I use CGI.pm? On Tue, 28 Nov 2000, quagly wrote: I am working my way through the eagle book. I have not used CGI.pm before. It is used in many (most?) of the examples. Is it worth learning to use it? I am not clear whether the authors are using it because the think it is the best way to go, or because they already know it ( or created it )and it is convenient. I have not done CGI programming before, but have some experience with java servlets. It there a compelling reason I should learn it ( other than that it would help me to understand the book? ) It's much simpler than you think -- Lincoln Stein is the one who wrote and maintains CGI.pm :) (he is the co-author) It's a very good module, but it's quite bloated. So if you need to process forms and you are under mod_perl Apache::Request is the one to go with. Thanks, ~quagly - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] _ Stas Bekman JAm_pH -- Just Another mod_perl Hacker http://stason.org/ mod_perl Guide http://perl.apache.org/guide mailto:[EMAIL PROTECTED] http://apachetoday.com http://jazzvalley.com http://singlesheaven.com http://perl.apache.org http://perlmonth.com/ - 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: Apache::SSI design questions
At 11:47 PM 11/28/00 -0600, Ken Williams wrote: 1) Is it preferred to use POSIX::strftime() for time formatting, or Date::Format::strftime()? One solution would be to dynamically load one or the other module according to which one is available, but I'd rather not do that. Hi Ken, Why not Apache::Util::ht_time()? Bill Moseley mailto:[EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Apache::SSI design questions
On Wed, 29 Nov 2000, Bill Moseley wrote: At 11:47 PM 11/28/00 -0600, Ken Williams wrote: 1) Is it preferred to use POSIX::strftime() for time formatting, or Date::Format::strftime()? One solution would be to dynamically load one or the other module according to which one is available, but I'd rather not do that. Hi Ken, Why not Apache::Util::ht_time()? Or if you need to run outside of mod_perl, Time::Object::strftime (which doesn't load all of POSIX.pm, but is done in XS, so is faster/lighter than Date::Format). -- Matt/ /||** Director and CTO ** //||** AxKit.com Ltd ** ** XML Application Serving ** // ||** http://axkit.org ** ** XSLT, XPathScript, XSP ** // \\| // ** Personal Web Site: http://sergeant.org/ ** \\// //\\ // \\ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Problem with mod_perl module!!!
Hi there, On Wed, 29 Nov 2000, Edmar Edilton da Silva wrote: How can I know if a perl script is being ran under mod_perl? http://perl.apache.org/guide 73, Ged. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
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]
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: Apache config control using Perl?
-Original Message- From: Ben Heuer [mailto:[EMAIL PROTECTED]] Sent: Thursday, November 30, 2000 2:35 AM To: modperl Subject: Apache config control using Perl? Hello: [snip] 2. How can I customise the line that gets added to the logs/error.log file? write a PerlLogHandler and complete control is within your reach... see www.modperl.com for the Eagle book, complete with examples :) HTH --Geoff Can I use somesort of the CustomLog for this? I need to prefix every line wiht the name of my website, and to customize the error messages. Can this be done? I would appreciate any help. Thanks! Ben - 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]
2 servers based on .htaccess authentication
We are finally planning to "do the right thing" and have a light weight and heavy weight server. Our problem is that our (immediate) users set up the protections for each directory with .htaccess files - and they use PerlAuthzHandler and PerlAuthenHandlers - so to decide if a file can be delivered requires modperl. So the solution I have come up with is to proxyPass any request requiring authentication to the modperl server. Any existing solution is welcome! The approach I am trying though is: - write an authentication module (in C) to add to the light weight server. All it does is bunce the request to the heavy server. This is figuring if apache invokes this module authentication is being attemtped. Problem: something is still seeing and complaining about the PerlAuthenHandler stuff. I have pulled (I believe) all the other authentation and authorization modules - why and which apache aspect might be doing this??? A concern: in my module I do a REDIRECT to the heavy weight. Doesn't this go back to the browser? How do I do a proxyPass in C like the rewrite setup does so well?? THanks, Bob Waldstein [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: WebDAV support in mod_perl
Yes, I've contemplated either: 1) implementing the DAV protocols entirely in Perl for mod_perl 2) gluing in XS into mod_dav -- IIRC mod_dav has hooks for non-filesystem respositories; it'd be great just to expose that API to mod_perl (haven't cracked open that code yet though) Issues: what will be required to implement DeltaV (I need concurrent checkouts and versioning) as well? What's up with the expat-lite in Apache conflicting with XML::Parser's expat? Given a clear picture of these options and issues, I'd be more than pleased to bang out a good Apache::WebDAV code base implementation. -Ian Today, Joao Pedro Goncalves [EMAIL PROTECTED] frothed and gesticulated about...: 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] -- Salon Internet http://www.salon.com/ Manager, Software and Systems "Livin' La Vida Unix!" Ian Kallen [EMAIL PROTECTED] / AIM: iankallen / Fax: (415) 354-3326 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: segmentation fault when using custom config module
On Wed, 29 Nov 2000, Matt Sergeant wrote: On Wed, 29 Nov 2000, Dave Rolsky wrote: my $cfg = Apache::ModuleConfig-get($r); Try: my $cfg = Apache::ModuleConfig-get($r, __PACKAGE__); I should have said that its segfaulting before it ever gets into the handler sub. I changed handler to: sub handler { warn "HANDLER\n"; } and it still segfaulted. -dave /*== www.urth.org We await the New Sun ==*/ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Apache Session and Lock files
Hi everyone, After tying a hash variable to a session, and writing to it, I would like to undef my hash variable just to make sure that the session lock file is deleted. However, when I do this, then any changes I make to the session hash don't get saved. If I don't undef the session hash, then the session data remains but I end up eventually with lots of lock files in my tmp directory. Has anyone run across this and come up with a solution. I set Commit = 1 on my Tie command, and I commit changes to my database, but the data still disappears if I undefine the hash. Thanks in advance... - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Apache::MP3 Problem?
I think your "Order" directive is wrong. order should be lower case, as should be allow and all. Give that a whirl. Tom On Tue, Nov 28, 2000 at 08:11:06PM -0500, Sean Keplinger wrote: The Apache::MP3 module allows you to stream MP3 files from your webserver -- it's a pretty spiffy little interface. Everything appears to be working fine, but when I try to stream an MP3, I get the following error in my error_log: [Tue Nov 28 20:01:54 2000] [error] [client x.x.x.x] need AuthName: /mp3/songname.m3u Is it requesting that I set up a .htaccess file for that directory, or is something potentially misconfigured in the Location directive? My access.conf is as follows: Location /mp3 SetHandler perl-script PerlHandler Apache::MP3::Sorted PerlSetVar SortFieldsAlbum,Title,-Duration PerlSetVar FieldsTitle,Artist,Album,Duration PerlSetVar CacheDir /usr/tmp/mp3_cache Order deny,allow Allow from All /Location - 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
I am very interested in any developments in this area. I currently am doing dav stuff in Java for macromedia.com and would be interested in porting it to my first love: Perl! please let me know of any developments. I am willing to help, if you need it. cheers, -amen On Wed, 29 Nov 2000, Ian Kallen wrote: Yes, I've contemplated either: 1) implementing the DAV protocols entirely in Perl for mod_perl 2) gluing in XS into mod_dav -- IIRC mod_dav has hooks for non-filesystem respositories; it'd be great just to expose that API to mod_perl (haven't cracked open that code yet though) Issues: what will be required to implement DeltaV (I need concurrent checkouts and versioning) as well? What's up with the expat-lite in Apache conflicting with XML::Parser's expat? Given a clear picture of these options and issues, I'd be more than pleased to bang out a good Apache::WebDAV code base implementation. -Ian Today, Joao Pedro Goncalves [EMAIL PROTECTED] frothed and gesticulated about...: 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] -- Salon Internethttp://www.salon.com/ Manager, Software and Systems "Livin' La Vida Unix!" Ian Kallen [EMAIL PROTECTED] / AIM: iankallen / Fax: (415) 354-3326 - 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: 2 servers based on .htaccess authentication
If you are using shared repositories for the front-end and heavy server you can modify the filename used for .htaccess in the apache config file. (See the AccessFileName entry) So, you could put the config for the heavy server in .htaccess_heavy and the front-end config in .htaccess. On Wed, Nov 29, 2000 at 12:05:14PM -0500, [EMAIL PROTECTED] wrote: We are finally planning to "do the right thing" and have a light weight and heavy weight server. Our problem is that our (immediate) users set up the protections for each directory with .htaccess files - and they use PerlAuthzHandler and PerlAuthenHandlers - so to decide if a file can be delivered requires modperl. So the solution I have come up with is to proxyPass any request requiring authentication to the modperl server. Any existing solution is welcome! The approach I am trying though is: - write an authentication module (in C) to add to the light weight server. All it does is bunce the request to the heavy server. This is figuring if apache invokes this module authentication is being attemtped. Problem: something is still seeing and complaining about the PerlAuthenHandler stuff. I have pulled (I believe) all the other authentation and authorization modules - why and which apache aspect might be doing this??? A concern: in my module I do a REDIRECT to the heavy weight. Doesn't this go back to the browser? How do I do a proxyPass in C like the rewrite setup does so well?? THanks, Bob Waldstein [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Paul Lindner [EMAIL PROTECTED] Red Hat Inc. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: WebDAV support in mod_perl
On Wed, 29 Nov 2000, Ian Kallen wrote: Yes, I've contemplated either: 1) implementing the DAV protocols entirely in Perl for mod_perl 2) gluing in XS into mod_dav -- IIRC mod_dav has hooks for non-filesystem respositories; it'd be great just to expose that API to mod_perl (haven't cracked open that code yet though) Issues: what will be required to implement DeltaV (I need concurrent checkouts and versioning) as well? Depends what you base it on. CVS or subversion or something? Greg Stein was saying that DeltaV isn't finalised anyway, so you'd be writing clients too! What's up with the expat-lite in Apache conflicting with XML::Parser's expat? Just compile Apache with RULE_EXPAT=no, and if you want to compile mod_dav with the shared expat on expat.sourceforge.net then use the patches in http://axkit.org/download/ -- Matt/ /||** Director and CTO ** //||** AxKit.com Ltd ** ** XML Application Serving ** // ||** http://axkit.org ** ** XSLT, XPathScript, XSP ** // \\| // ** Personal Web Site: http://sergeant.org/ ** \\// //\\ // \\ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
This is so cool.
I've written mod_perl handlers for a few different phases, but I've never really worried about speed increases for plain content. I recently migrated from a cgi script in my cgi-bin that handles content to a Apache::Registry script that does the same thing. On my puny 150MHz Pentium, 96MBytes RAM machine, I was getting about 4.5 requests answered per second with a normal cgi script. After moving it to Apache::Registry and moving into the /perl/ directory, I can easily get 13-18 requests answered per second. That isn't too bad. Once I get this translated into a complete mod_perl handler, I will probably see an enormous increase. Thanks for listening. Jon -- J. J. Horner [EMAIL PROTECTED] "The people who vote decide nothing. The people who count the vote decide everything." - Josef Stalin "The tree of liberty must be watered periodically with the blood of tyrants and patriots alike. ... Resistance to tyrants is obedience to God." - Thomas Jefferson - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: WebDAV support in mod_perl
On Wed, Nov 29, 2000 at 09:20:49AM -0800, Ian Kallen wrote: Yes, I've contemplated either: 1) implementing the DAV protocols entirely in Perl for mod_perl 2) gluing in XS into mod_dav -- IIRC mod_dav has hooks for non-filesystem respositories; it'd be great just to expose that API to mod_perl (haven't cracked open that code yet though) Yes, mod_dav has a pluggable backend. Since Perl can be embedded (i.e. apps can call into it to exec code), then you could implement a mod_dav backend in Perl. That would save you a bunch of time over trying to do all the protocol work. The mod_dav in Apache 2.0 has a better dynamic-load plugin/backend story, but mod_dav 1.0 (which is built for Apache 1.3) still has all the same features/functionality for backends. Issues: what will be required to implement DeltaV (I need concurrent checkouts and versioning) as well? All of this is being developed within the mod_dav as part of Apache 2.0. Through the plugin mechanism, we'll be using Subversion (SVN) (http://subversion.tigris.org/) as the backend. SVN will be using DeltaV as the network protocol, and Apache 2.0 as the network server. There is also some DeltaV work going on in the CVS version of mod_dav, with much of the same backend interfaces and code. I wouldn't call any of the mod_dav DeltaV work "cooked" though. I'm going to be testing the Apache 2.0 this week and next, for Milestone 2 of Subversion which occurs at the end of next week. M2 will be a very limited DeltaV server... but that does include checkout and versioning :-) What's up with the expat-lite in Apache conflicting with XML::Parser's expat? The intent is to find time to upgrade Apache to use Expat 1.95.0 and axe the expat-lite stuff. It should work fine (and part of the Expat 1.95 release was specifically to fix the Apache/mod_perl Expat conflict), but time/priority just hasn't happened yet. It should over the next couple weeks, as we're trying to nail down an Apache 2.0 beta and we want to resolve that problem. Given a clear picture of these options and issues, I'd be more than pleased to bang out a good Apache::WebDAV code base implementation. -Ian Today, Joao Pedro Goncalves [EMAIL PROTECTED] frothed and gesticulated about...: Hi, is there any current project going on for using the WebDAV protocol in mod_perl, something like Apache::WebDAV? There is client side work at http://www.webdav.org/perldav/ 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. Oracle has built a backend for mod_dav which stores all of the content and properties into an Oracle database. It should be appearing on the Oracle Technical Network "real soon now". So... mod_dav can do it, but yes: it would be C coding rather than Perl :-) Cheers, -g -- Greg Stein, http://www.lyra.org/ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: sending receiving cookies through the light front end
"CLE" == Christopher L Everett [EMAIL PROTECTED] writes: CLE 2) If 1 above is "yes", since the cookie was intended for a CLE.baz.org server, won't the perl.foo.org Apache drop the CLEcookie in the bit-bucket? The client (IE, Netscape) won't send a cookie for .baz.org to the perl.foo.org host; also, it probably won't let you to set such a cookie unless you are a *.baz.org host. -- =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= Vivek Khera, Ph.D.Khera Communications, Inc. Internet: [EMAIL PROTECTED] Rockville, MD +1-240-453-8497 AIM: vivekkhera Y!: vivek_khera http://www.khera.org/~vivek/ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: 2 servers based on .htaccess authentication
So, you could put the config for the heavy server in .htaccess_heavy and the front-end config in .htaccess. Sorry - didn't make myself clear. The protection on the files are the same - just too complex for the front-end to understand (since use modperl). So if there is any authentication needed I want the front-end to give up and let the heavy server handle it. So even in the model you describe all I want the front-end .htaccess to do is to cause a proxyPass - can that be done is my question / problem. thanks, Bob Waldstein [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: 2 servers based on .htaccess authentication
Or if you want to share some directives but not others, you can use IfModule mod_perl.c or IfDefined SomeSymbol sections to block one server from reading those portions of the config files. [EMAIL PROTECTED] (Paul Lindner) wrote: If you are using shared repositories for the front-end and heavy server you can modify the filename used for .htaccess in the apache config file. (See the AccessFileName entry) So, you could put the config for the heavy server in .htaccess_heavy and the front-end config in .htaccess. On Wed, Nov 29, 2000 at 12:05:14PM -0500, [EMAIL PROTECTED] wrote: We are finally planning to "do the right thing" and have a light weight and heavy weight server. Our problem is that our (immediate) users set up the protections for each directory with .htaccess files - and they use PerlAuthzHandler and PerlAuthenHandlers - so to decide if a file can be delivered requires modperl. So the solution I have come up with is to proxyPass any request requiring authentication to the modperl server. Any existing solution is welcome! The approach I am trying though is: - write an authentication module (in C) to add to the light weight server. All it does is bunce the request to the heavy server. This is figuring if apache invokes this module authentication is being attemtped. Problem: something is still seeing and complaining about the PerlAuthenHandler stuff. I have pulled (I believe) all the other authentation and authorization modules - why and which apache aspect might be doing this??? A concern: in my module I do a REDIRECT to the heavy weight. Doesn't this go back to the browser? How do I do a proxyPass in C like the rewrite setup does so well?? THanks, Bob Waldstein [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Paul Lindner [EMAIL PROTECTED] Red Hat Inc. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] ------ Ken Williams Last Bastion of Euclidity [EMAIL PROTECTED]The Math Forum - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: sending receiving cookies through the light front end
http://www.cookiecentral.com/faq/#4.7 is a good link the rest is informative as well but this particular section is on limitations including the point vivek made about cross domain cookies , which is not possible - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Apache Session and Lock files
On Wed, 29 Nov 2000, cbell wrote: After tying a hash variable to a session, and writing to it, I would like to undef my hash variable just to make sure that the session lock file is deleted. However, when I do this, then any changes I make to the session hash don't get saved. Well, yeah. When you undef it, you destroy the session. You don't even have a hash to write to anymore. It will save what you had, but you'll have to go and open it again if you want to use it. You shouldn't need to do this anyway, since I think Apache::Session does an immediate save when you create a new session. Whay are you worried about the lock files? Have you had a problem with them lingering? Incidentally, if you're using a database for storage you don't need to do additional locking. Just use NullLocker. - Perrin - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: sending receiving cookies through the light front end
Vivek Khera wrote: "CLE" == Christopher L Everett [EMAIL PROTECTED] writes: CLE 2) If 1 above is "yes", since the cookie was intended for a CLE.baz.org server, won't the perl.foo.org Apache drop the CLEcookie in the bit-bucket? The client (IE, Netscape) won't send a cookie for .baz.org to the perl.foo.org host; also, it probably won't let you to set such a cookie unless you are a *.baz.org host. This is the way I have it now: 1) set up IP aliases for the loopback adapter like so: ifconfig lo:0 192.168.0.1 netmask 255.255.255.0 ifconfig lo:1 192.168.0.2 netmask 255.255.255.0 ifconfig lo:2 192.168.0.3 netmask 255.255.255.0 2) added entries to the hosts file like this 192.168.0.1 perl.foo.org 192.168.0.2 perl.bar.org 192.168.0.3 perl.baz.org 3) modified the virtual hosts in the httpd-lite.conf to look like this VirtualHost 123.123.123.123 ServerName www.foo.org ProxyPass/nit/ httpd://perl.foo.org/nit/ ProxyPassReverse /nit/ httpd://perl.foo.org/nit/ # and whatever else I need /VirtualHost 4) modified the httpd-perl.conf to have virtual hosts like this VirtualHost 192.168.0.1 ServerName perl.foo.org ProxyPass/nit/ httpd://perl.foo.org/nit/ ProxyPassReverse /nit/ httpd://perl.foo.org/nit/ # and whatever else I need /VirtualHost Now, mod_perl and the front end are both in the same domain, so the cookie should go through, right? But it doesn't. --Christopher - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: sending receiving cookies through the light front end
"Christopher L. Everett" wrote: This is the way I have it now: 1) set up IP aliases for the loopback adapter like so: ifconfig lo:0 192.168.0.1 netmask 255.255.255.0 ifconfig lo:1 192.168.0.2 netmask 255.255.255.0 ifconfig lo:2 192.168.0.3 netmask 255.255.255.0 2) added entries to the hosts file like this 192.168.0.1 perl.foo.org 192.168.0.2 perl.bar.org 192.168.0.3 perl.baz.org 3) modified the virtual hosts in the httpd-lite.conf to look like this VirtualHost 123.123.123.123 ServerName www.foo.org ProxyPass/nit/ httpd://perl.foo.org/nit/ ProxyPassReverse /nit/ httpd://perl.foo.org/nit/ # and whatever else I need /VirtualHost 4) modified the httpd-perl.conf to have virtual hosts like this VirtualHost 192.168.0.1 ServerName perl.foo.org ProxyPass/nit/ httpd://perl.foo.org/nit/ ProxyPassReverse /nit/ httpd://perl.foo.org/nit/ # and whatever else I need /VirtualHost Now, mod_perl and the front end are both in the same domain, so the cookie should go through, right? But it doesn't. Ahhh, but it does work. Changed Apache::Cookie-fetch($r) to Apache::Cookie-parse and all was well. What a relief, five days of agony vindicated (kind of). - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Changing a file's UID from within an Apache module?
I am creating a mod_perl Apache module. The last functionality that I need to implement is the ability to set the UID of the files and directories which are created and modified by the Apache module to something other than Apache's child UID. For example, if when I built Apache 1.3.14 on Linux 2.2.17, I used: APACI_ARGS=--server-uid=300,--server-gid=300 Later, my module creates a file "myfile.html". I want to change the file's UID from 300 to 3000, from within the Apache module. I was going to set the file permissions to 750 and keep the Apache GID. The directory permissions could be set to 770 in order to let the Apache module create, modify, and delete files within the directories. In this way each file would provide exclusive (modify and create) access rights in a shared user environment. Any ideas about the best way to change the permissions and UID? - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
no such file or directory
Hi People I have this mysterious problem of my mod_perl scripts giving errors like no such file or directory when I know for a fact that files and directory are there. The files are berkeley db file. The problems first show up in the midst of doing multiple recompiling and reinstallation of mod_perl and apache. They mysteriously disappeared after repeatedly invoking the scripts. However today I attempted changed one of my supposedly obselete dbmopen functions to tie functions and they came right back. So I immediately reinstall the old version. The problems is still there All I did was change dbmopen %A,'file',0644 to use DB_File; tie %A,'file.db' They work fine on the command line. I have mod_perl 1.24_01 apache 1.3.14 linux 2.2.17. I can post more info if necessary Thanks - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
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]
Re: 2 servers based on .htaccess authentication
As long as you can garantee that the URI of the resource is not accessible multiple ways you could use a Location/ directive on the relative path. Trouble with this is my problem arises out of a (deliberate) lack of central control. That is, I have thousands of directories, and the web administrators are allowed to protect them as they please, using .htaccess files. So I cannot maintain any centralized list (as in a apache config file). Actually as I continue to think on it my solution seems reasonable - just haven't figured out yet which part of the light-weight server is complaining about incomprehensible commands in the .htaccess - thought apache would let my module see it before complaining. Hm - maybe I have to go earlier in the cycle so I can say: if (.htaccess control) proxyPass time to get back out the eagle book... bob [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Wanted: Modperl/Mason consultant:
Hello. We have an Apache/Modperl/Mason/Oracle system and no programmers experienced with the front end environment. (details available on request). We are the Oracle programmer/DBA and Unix admin guys and fumble around in the Perl as needed. Slowly coming up to speed on Perl. The Apche server is Solaris Intel, the Oracle database (7.3.4) may be on Solaris or Windows NT. Our conclusion is that we need some adult supervision to get over some of the rough spots as we develop proficiency in this tool set. We are further handicapped by the reality that we each only have a few hours a week to devote to the Web side of our application. I don't even have time to stay current with the modperl mailing list. The types of problems you would help us with include. -- On a new Apache server we were bringing up, our program would not write a file. It took us two days to decide to look at the permissions on the directory in question and give everybody write privilege. You would have asked the question very early on. -- Whilst working on a tedious but routine fix, in a moment of paranoia I managed to convince myself that changes to the /usr/local/lib/perl tree were not getting picked up by Apache unless I rebooted the host machine. You would have calmed me down and suggested that I look deeper into my database logic. -- We have a nasty problem where sessions seem to refuse to die unless the client browser exits. Still don't know where the problem is. -- You will take us to the magical world of modperl debugging. It will be like Disney World, only better. I'm sure of it. Requirements -- Very proficient with Modperl and Mason. Experience with CGI a plus. -- Focus. The abrupt departure of the Web team left a lot of "gotta do's" in the application system. You'll need to overlook those and focus on the problem at hand. -- We would probably need less than 5 hours a week of your time. We have flexible hours. -- Sense of humor: we'll be pretty punchy by the time we need your services. -- You will have to execute a non-disclosure/non-compete agreement drawn up by our ubiquitous legal staff. If this is of interest to you, please forward a resume and rate to me at [EMAIL PROTECTED] Thanks robert monical [EMAIL PROTECTED] "Letter writing is the only device for combining solitude and good company." Lord Byron - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Wanted: Modperl/Mason consultant:
On Wed, 29 Nov 2000, Robert Monical wrote: Hi Robert, I don't have a lot of experience with mason, but I know mod_perl, Apache and Perl very very well. I've built a majority of the ValueClick banner serving system; all built in Perl and using mod_perl for the frontend engine. It's currently serving more than 75 million impressions a day. My rate is $120 per hour and I am generally available to "go in action" with a few hours warning. My email reponse time will typical be very short too. Let me know if you have any questions. - ask We have an Apache/Modperl/Mason/Oracle system and no programmers experienced with the front end environment. (details available on request). We are the Oracle programmer/DBA and Unix admin guys and fumble around in the Perl as needed. Slowly coming up to speed on Perl. The Apche server is Solaris Intel, the Oracle database (7.3.4) may be on Solaris or Windows NT. Our conclusion is that we need some adult supervision to get over some of the rough spots as we develop proficiency in this tool set. We are further handicapped by the reality that we each only have a few hours a week to devote to the Web side of our application. I don't even have time to stay current with the modperl mailing list. The types of problems you would help us with include. -- On a new Apache server we were bringing up, our program would not write a file. It took us two days to decide to look at the permissions on the directory in question and give everybody write privilege. You would have asked the question very early on. -- Whilst working on a tedious but routine fix, in a moment of paranoia I managed to convince myself that changes to the /usr/local/lib/perl tree were not getting picked up by Apache unless I rebooted the host machine. You would have calmed me down and suggested that I look deeper into my database logic. -- We have a nasty problem where sessions seem to refuse to die unless the client browser exits. Still don't know where the problem is. -- You will take us to the magical world of modperl debugging. It will be like Disney World, only better. I'm sure of it. Requirements -- Very proficient with Modperl and Mason. Experience with CGI a plus. -- Focus. The abrupt departure of the Web team left a lot of "gotta do's" in the application system. You'll need to overlook those and focus on the problem at hand. -- We would probably need less than 5 hours a week of your time. We have flexible hours. -- Sense of humor: we'll be pretty punchy by the time we need your services. -- You will have to execute a non-disclosure/non-compete agreement drawn up by our ubiquitous legal staff. If this is of interest to you, please forward a resume and rate to me at [EMAIL PROTECTED] Thanks robert monical [EMAIL PROTECTED] "Letter writing is the only device for combining solitude and good company." Lord Byron -- ask bjoern hansen - http://www.netcetera.dk/~ask/ more than 70M impressions per day, http://valueclick.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Wanted: Modperl/Mason consultant:
where are you located?? Michael Robinton BizSystems 4600 El Camino Real - Suite 206B Los Altos, CA 94022 650 947-3351 [EMAIL PROTECTED] On Wed, 29 Nov 2000, Robert Monical wrote: Hello. We have an Apache/Modperl/Mason/Oracle system and no programmers experienced with the front end environment. (details available on request). We are the Oracle programmer/DBA and Unix admin guys and fumble around in the Perl as needed. Slowly coming up to speed on Perl. The Apche server is Solaris Intel, the Oracle database (7.3.4) may be on Solaris or Windows NT. Our conclusion is that we need some adult supervision to get over some of the rough spots as we develop proficiency in this tool set. We are further handicapped by the reality that we each only have a few hours a week to devote to the Web side of our application. I don't even have time to stay current with the modperl mailing list. The types of problems you would help us with include. -- On a new Apache server we were bringing up, our program would not write a file. It took us two days to decide to look at the permissions on the directory in question and give everybody write privilege. You would have asked the question very early on. -- Whilst working on a tedious but routine fix, in a moment of paranoia I managed to convince myself that changes to the /usr/local/lib/perl tree were not getting picked up by Apache unless I rebooted the host machine. You would have calmed me down and suggested that I look deeper into my database logic. -- We have a nasty problem where sessions seem to refuse to die unless the client browser exits. Still don't know where the problem is. -- You will take us to the magical world of modperl debugging. It will be like Disney World, only better. I'm sure of it. Requirements -- Very proficient with Modperl and Mason. Experience with CGI a plus. -- Focus. The abrupt departure of the Web team left a lot of "gotta do's" in the application system. You'll need to overlook those and focus on the problem at hand. -- We would probably need less than 5 hours a week of your time. We have flexible hours. -- Sense of humor: we'll be pretty punchy by the time we need your services. -- You will have to execute a non-disclosure/non-compete agreement drawn up by our ubiquitous legal staff. If this is of interest to you, please forward a resume and rate to me at [EMAIL PROTECTED] Thanks robert monical [EMAIL PROTECTED] "Letter writing is the only device for combining solitude and good company." Lord Byron - 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: Wanted: Modperl/Mason consultant:
On Wed, 29 Nov 2000, Ask Bjoern Hansen wrote: ahh. that should obviously not have been spamming the poor list. In particular not with the "nice" quoting. A "doh!" as Randal pointed out. sorry. - ask (goes back to his corner and hides). -- ask bjoern hansen - http://www.netcetera.dk/~ask/ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Problem with mod_perl module!!!
On Wed, 29 Nov 2000, Edmar Edilton da Silva wrote: I have a problem with the Apache::DBI and mod_perl modules that don't work together, before I thought that the problem was in the Apache::DBI. But, now I know that the problem is in the mod_perl because it also doesn't work when I try loading the CGI.pm module in the "startup.pl file". The conclusion is that when I don't load any module in the "startup.pl" file the perl scripts are ran correctly, but when I load some module the child processes (httpds) of the apache are not created. Thus, when a script is requested the server returns a message saying that the connection was refused. Sounds like your server didn't even start. Are you sure you compiled mod_perl into apache correctly? Check http://perl.apache.org/guide/ for instructions on how to figure that out. - ask -- ask bjoern hansen - http://ask.netcetera.dk/ more than 70M impressions per day, http://valueclick.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Using MHonArc inside of mod_perl
On Mon, 27 Nov 2000, Aaron Johnson wrote: I am trying to get the MHonArc package to work in conjunction with an in house module. When MHonArc (http://www.mhonarc.org) is run and told to process a single file instead of a directoy full of files, it sends the output to STDOUT which inside of mod_perl in this case is the browser. I am using the process_input() function as outlined in the MHonArc mailing list archives. I need to save the output to a variable. [...] What are you trying to do? It sounds an awful like you're doing whatever it is the wrong way. :) My brain is running in powersave mode, so maybe I am missing something, but why can't you just use $foo = qx[mhonarc ...] or open FOO, "mhonarc ...|"? ... if you really want to call mhonarc for each request. :) - ask -- ask bjoern hansen - http://ask.netcetera.dk/ more than 70M impressions per day, http://valueclick.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
cgi script vs mod_perl script
I have a script that uses some hash magic to set some variables. It works well in normal mode, but when I put it in my /perl directory, it stops working well. The full script is included. In the script, I set up a hash of variables-subroutines so that when someone sets a variable, it calles a specific subroutine using $hash{$value}-() It doesn't seem to work. Any ideas? -- J. J. Horner [EMAIL PROTECTED] "The people who vote decide nothing. The people who count the vote decide everything." - Josef Stalin "The tree of liberty must be watered periodically with the blood of tyrants and patriots alike. ... Resistance to tyrants is obedience to God." - Thomas Jefferson #!/usr/bin/perl -wT use strict; use CGI qw(:all); #use LWP::Simple; use Apache::Registry; use lib "/data/2jnetworks/lib"; require 'jjnetworks.pl'; my $header_file = content("/data/2jnetworks/htdocs/header"); my $footer_file = content("/data/2jnetworks/htdocs/footer"); my $q = new CGI; my %hash = ( Index = \Index, Home= \Index, Services = \Index, ContactUs =\Index, Links = \Index ); my ($title,$backcolor,$textcolor,$welcome_message,$body_message); my $value = $q-param('page') || "Index"; $hash{$value}-(); print $q- header(), start_html( -title="2J Network Services, Inc.", -bgcolor="white", -text="black" ); print $header_file; print $q- h1( $q-center("$welcome_message") ), p( $q-center("$body_message\n") ); print $footer_file; print $q- end_html(); print "\n"; sub Index { $title = "2J Network Solutions"; $backcolor ="white"; $textcolor = "black"; $welcome_message = "Welcome!!"; $body_message = "Future home of b2JNetwork Solutions./b"; } sub Weather { $title = "Local Weather"; $backcolor = "white"; $textcolor = "black"; $welcome_message = "Current Local Weather from Weather.com:"; $body_message = get_weather(); } sub Plan { $title = "Jon's Plan"; $backcolor = "white"; $textcolor = "black"; $welcome_message = "These are the things I have on my drawing board:"; $body_message = content("/data/home/jhorner/.plan"); } - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Using MHonArc inside of mod_perl
Thanks for the replies from people on the list. I solved my problem with the suggestion from Chris Nokleberg. He suggested the IO::String module. It did the trick. I had been using the qx function previously, but I needed variables from within my module to be available inside of MHonArc. Aaron Johnson Ask Bjoern Hansen wrote: On Mon, 27 Nov 2000, Aaron Johnson wrote: I am trying to get the MHonArc package to work in conjunction with an in house module. When MHonArc (http://www.mhonarc.org) is run and told to process a single file instead of a directoy full of files, it sends the output to STDOUT which inside of mod_perl in this case is the browser. I am using the process_input() function as outlined in the MHonArc mailing list archives. I need to save the output to a variable. [...] What are you trying to do? It sounds an awful like you're doing whatever it is the wrong way. :) My brain is running in powersave mode, so maybe I am missing something, but why can't you just use $foo = qx[mhonarc ...] or open FOO, "mhonarc ...|"? ... if you really want to call mhonarc for each request. :) - ask -- ask bjoern hansen - http://ask.netcetera.dk/ more than 70M impressions per day, http://valueclick.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RFC: Apache::Carp - Error Handling under mod_perl
I've done a lot of programming under mod_perl and I got tired of examining the error logs for errors. So I wrote a module that displays to the broswer the error (with a complete call stack) for any fatals or warnings that occur on a development server (similar to using CGI::Carp qw(fatalsToBrowser);), or emails the site administrator for errors on a production server. This has been released on CPAN as Apache::PageKit::Error, but since it doesn't depend on Apache::PageKit at all, I'm thinking of releasing it as a seperate module. Do you think this is worth doing? What should it be called? Is Apache::Carp a good name? Documentation can be found here (with the old Apache::PageKit::Error name) http://search.cpan.org/doc/TJMATHER/Apache-PageKit-0.05/lib/Apache/PageKit/Error.pm - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Wanted: Modperl/Mason consultant:
On Wed, 29 Nov 2000, ___cliff rayman___ wrote: plus, everyone knows your bid. i don't have quite the credentials as Ask, but i only cost $119.50 per hour. :-)) Hmm, I'm on the Mason core team and I'll do it for $119.49/hour ;) Actually, I'm just kidding, I have a job I should be working on already. -dave /*== www.urth.org We await the New Sun ==*/ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: RFC: Apache::Carp - Error Handling under mod_perl
On Thu, 30 Nov 2000, T.J. Mather wrote: I've done a lot of programming under mod_perl and I got tired of examining the error logs for errors. So I wrote a module that displays to the broswer the error (with a complete call stack) for any fatals or warnings that occur on a development server (similar to using CGI::Carp qw(fatalsToBrowser);), or emails the site administrator for errors on a production server. You might consider using Log::Dispatch to handle the errors. This would give you a lot of flexibility basically for free in terms of sending your outputs wherever you want as well as giving you log levels and such if you need it. Of course, I'm biased cause I wrote Log::Dispatch. -dave /*== www.urth.org We await the New Sun ==*/ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: no such file or directory
Hi there, On Wed, 29 Nov 2000 [EMAIL PROTECTED] wrote: I have this mysterious problem of my mod_perl scripts giving errors like no such file or directory when I know for a fact that files and directory are there. dbmopen %A,'file',0644 Try dbmopen %A,'/full/path/to/file',0644 73, Ged. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]