mod_perl / CGI.pm and 'our' variables

2009-07-21 Thread Tomáš Bažant
Hi i'm new here and have a problem i have not been able to solve for 2 days now: i'm writing a web application using %SUBJ% and would like to set 'our $dbh = ...' so that i do not need to pass db handler as an argument to functions in different packages every time i need. but this 'global' varia

Re: [PATCH] Apache::DBI - Disconnect on child exit

2009-07-21 Thread Jiri Pavlovsky
Nick Wellnhofer napsal(a): Currently, Apache::DBI never disconnects from the database. This leads to the following warnings in my Postgres logs every time an Apache child exits: LOG: unexpected EOF on client connection Depending on MaxRequestsPerChild this can really spam your Postgres logs.

Linux::Smaps on RHEL

2009-07-21 Thread Jonathan Swartz
I'm running into the problem using Linux::Smaps on RHEL with an Apache server on port 80. Namely, that the httpd child doesn't have permissions to look at the smaps file. Linux::Smaps: Cannot open /proc/20074/smaps: Permission denied or Linux::Smaps: Cannot open /proc/self/smaps:

rewriterule, location, and perlhandler

2009-07-21 Thread Eric Lease Morgan
How do I get Apache's RewriteRule, Location, and PerlHander to work nicely together? I have a the following Hello World mod_perl module: package Apache2::Alex::SemanticWeb; use Apache2::Const -compile => qw( OK ); use strict; sub handler { my $r = shift; $r->content_type(

Re: rewriterule, location, and perlhandler [resolved]

2009-07-21 Thread Eric Lease Morgan
On Jul 21, 2009, at 9:32 PM, Eric Lease Morgan wrote: How do I get Apache's RewriteRule, Location, and PerlHander to work nicely together?... I now want to implement a RewriteRule -- a la a "cool" linked data URL -- to redirect URLs with a specific shape to SemanticWeb.pm, and I use the

Re: rewriterule, location, and perlhandler

2009-07-21 Thread Nick Wellnhofer
Eric Lease Morgan wrote: > What am I doing wrong? Does an actual file need to exist in order for > mod_perl to find it? No. > How should I edit httpd.conf so I can: 1) rewrite > GET requests, and 2) execute the result in a mod_perl module? Try the mod_rewrite "passthrough" (PT) flag: Rewrit

Re: rewriterule, location, and perlhandler

2009-07-21 Thread Eric Lease Morgan
On Jul 21, 2009, at 9:45 PM, Nick Wellnhofer wrote: What am I doing wrong? Does an actual file need to exist in order for mod_perl to find it? No. I didn't think so, but what sort of configuration do I need to do so my mod_perl packages get executed without the existence of a file? --

Re: rewriterule, location, and perlhandler

2009-07-21 Thread Adam Prime
Eric Lease Morgan wrote: > > On Jul 21, 2009, at 9:45 PM, Nick Wellnhofer wrote: > >>> What am I doing wrong? Does an actual file need to exist in order for >>> mod_perl to find it? >> >> No. > > > I didn't think so, but what sort of configuration do I need to do so my > mod_perl packages get e