Hi, after the recent discussion here about Perl application servers I
realized that the architecture I designed is probably better suited to
usage with an application server than mod_perl.
The basic structure of my mod_perl web application is:
*.pl files are handled by ModPerl::Registry
All *
Ok, so it seems with Apache > 2.4 the functionality of
Apache2::AuthCookieDBI can be duplicated using modules, specifically:
mod_auth_form AND mod_authn_dbd
This article gives a good writeup about it:
https://kodingnotes.wordpress.com/2013/02/26/authentication-in-apache2-4-part-1-installation/
ith a combination of mod_authn_dbd and mod_auth_form at
the Apache level. This still doesn't resolve my issues since I built
additional functionality on top of his module...
Tosh
PS. He gave permission to forward his mail.
On 8/24/16 2:53 PM, Vegard Vesterheim wrote:
On Wed, 24 Aug 2016
Hi, I've taken a stab at updating Apache2::AuthCookieDBI myself as per:
http://search.cpan.org/~mschout/Apache-AuthCookie/README.apache-2.4.pod
I've changed the parent of Apache2::AuthCookieDBI to
Apache2_4::AuthCookie but that doesn't seem to work, even with the
http.conf changes noted:
Does anyone know the status on this module?
Or have a suggestion for a functional replacement for 2.4 ?
Thanks!
Tosh
--
McIntosh Cooey - Twelve Hundred Group LLC - http://www.1200group.com/
Of course, but this complicates the OS and servers upgrade path going
forward. I'm looking to keep things simple.
Thanks
Tosh
On 10/21/15 2:20 PM, Wah Peng wrote:
try to install from source? I did this sometime when the binary was
not available.
2015-10-21 19:06 GMT+08:00 Tosh
Has this been bundled yet for any Linux packages?
The Fedora link here https://perl.apache.org/download/binaries.html is a
404.
Thanks!
Tosh
--
McIntosh Cooey - Twelve Hundred Group LLC - http://www.1200group.com/
I need an auth cookie to be valid across all subdomains I have, so it
makes sense to set the cookie domain to .domain.com
However setting that in the Apache config via:
PerlSetVar MyDomain .domain.com
Isn't what I need since I want to be able to use:
domain2.com domain3.com etc depending on w
Hi, we are experiencing some issues related to running our code under
ModPerl::Registry and Apache2::Reload issues. Sometimes the new code is
run, sometimes not and an error along the lines of:
"could not find method load for LocalDetails.pm"
are logged.
I suspect this is related to this:
h
hould specify
SetHandler perl-script
and not
SetHandler modperl
Using the latter you get the $r variable as an argument to your handler-sub.
Hendrik
Am So, 10.07.2011, 12:08 schrieb Tosh Cooey:
So I'm following your advice and going the easy route of apt-get
everything.
My original serve
x27;t require portability I never went
that route, oh woe is me...
Anyway, it's good to see there's some good Perl options out there for
getting rid of my admin(s).
Thanks Dave!
Tosh
On 7/22/64 8:59 PM, Tosh Cooey wrote:
The point was, and is, that it's unfortunate that mod_
So I'm following your advice and going the easy route of apt-get everything.
My original server had this config:
Apache/2.2.11 (Ubuntu) mod_perl/2.0.4 Perl/v5.10.0 Server
And two years later we're at:
Apache/2.2.14 (Ubuntu) mod_perl/2.0.4 Perl/v5.10.1 Server
Is that really the state of two year
odify startup.pl and install your required modules and go.
The dev world is moving away from requiring system administrators and
towards more PaaS'.
Tosh
On 7/5/11 10:48 AM, Dave Hodgkinson wrote:
On 5 Jul 2011, at 08:53, Tosh Cooey wrote:
On 7/4/11 11:26 PM, Dave Hodgkinson wrot
On 7/4/11 11:26 PM, Dave Hodgkinson wrote:
I'm not happy, hence the complaining about the AMI from 2009. But I'm glad you
changed the subject from your first one, which is that I should build my own
stack.
So basically you are saying (and only you, not a community voice) that in order
to
On 7/4/11 12:33 PM, Dave Hodgkinson wrote:
On 4 Jul 2011, at 11:03, Tosh Cooey wrote:
The only public AMI for EC2 setup with mod_perl I can easily find is an
OpenSuse one from 2009.
Services like Bitnami are a really nice platform for launching LAMP stacks,
unfortunately the P is anything
On 7/4/11 7:54 PM, Dave Hodgkinson wrote:
On 4 Jul 2011, at 11:03, Tosh Cooey wrote:
The only public AMI for EC2 setup with mod_perl I can easily find is an
OpenSuse one from 2009.
Services like Bitnami are a really nice platform for launching LAMP stacks,
unfortunately the P is anything
The only public AMI for EC2 setup with mod_perl I can easily find is an
OpenSuse one from 2009.
Services like Bitnami are a really nice platform for launching LAMP
stacks, unfortunately the P is anything but Perl :(
Is there a reason for the lack of plug'n'play mod_perl LAMP cloud
service pr
ng as load increased.
In my case, it pointed to a single component in my stack which was the
bottleneck.
So I fixed that one, then fixed the next hot spot ... you get the picture.
There are a lot of assumptions here that may or may not actually be true
in your case...
HTH,
-- jeff
On 6/15/11
be some issues WRT Devel::NYTProf and virtual machines, which I
believe my EC2 instance is one of.
Is there anywhere to point me to find out more about the blocking issue
and how to resolve it?
Thanks!
Tosh
On 7/22/64 8:59 PM, Fred Moyer wrote:
On Wed, Jun 8, 2011 at 12:50 PM, Tosh Cooey
nough I used to have the problem that this application was
spawning too many processes, now I have the opposite problem.
Anyone have sweet spots for Apache settings running on an EC2 small
instance?
Thanks Fred!
Tosh
On 6/8/11 10:15 PM, Fred Moyer wrote:
On Wed, Jun 8, 2011 at 12:50 PM, To
I have a mod_perl Registry script that is taking about 30 seconds to
execute.
I am trying to debug it but when I run the script from the command line
or the debugger it only takes 9 seconds to execute.
I am running Apache/2.2.11 (Ubuntu) mod_perl/2.0.4 Perl/v5.10.0
Is there something obvious
used to run so flawless, even back in the day when you would have to
choose between mysql and msql during the install...
Anyway if anyone is having similar problems then try upgrading from source.
Tosh
On 7/22/64 8:59 PM, Tosh Cooey wrote:
Hi Tuomo, thank-you that was really helpful.
I'
ote:
On Thu, Nov 11, 2010 at 12:58:23AM +0100, Tosh Cooey wrote:
Maybe Apache MPM prefork? How can I tell?
Running httpd with the -l (ell) command line option will print
a list of module names. If you see "prefork.c", you are using
prefork, and if you see "worker.c", you are
Maybe Apache MPM prefork? How can I tell? Neither of
/mods-available|enabled contain any mpm_* mods so perhaps no MPM?
Sorry for my weak knowledge here :(
Tosh
On 11/11/10 12:30 AM, Perrin Harkins wrote:
Which MPM are you using?
- Perrin
On Wed, Nov 10, 2010 at 6:16 PM, Tosh Cooey
I have a standard mod_perl setup, application is a server and mysql is
another.
I use AuthCookieDBI
http://cpansearch.perl.org/src/MATISSE/Apache2-AuthCookieDBI-2.05/lib/Apache2/AuthCookieDBI.pm
for authentication against the DB.
If the application has not been used for a while, a few hours,
I'd love to know too if anyone has an answer to this...
Tosh
On 7/22/64 8:59 PM, Tobias Wagener wrote:
Hello,
my config:
Apache/2.2.16 (Debian)
mod_ssl/2.2.16
OpenSSL/0.9.8o
mod_apreq2-20090110/2.7.1
mod_perl/2.0.4
Perl/v5.10.1
I have a very large project based on mod_perl
vi? I just send mine to India and pay some guy $1 to remove them with
his teeth.
Tosh
Devin Teske wrote:
On Tue, 2010-06-29 at 09:33 -0500, Chris Bennett wrote:
Tosh Cooey wrote:
Maybe I should have followed up instead of sending this so quickly, oh
well.
Yes the Windows CR/LF was the
guess, thanks Cosimo!
Tosh
Tosh Cooey wrote:
Ha ha... Yes I wondered about that too, except then why would it run as
mailfile2.pl after only: cp mailfile.pl mailfile2.pl ?
However the programmer working on that file uses Windows and so who
knows, maybe this is the solution, but not the a
:
On Tue, 29 Jun 2010 14:37:38 +0200, Tosh Cooey wrote:
I have an application with a program called [mailfile.pl] which runs
under MP::Registry and is accessed via some mod_rewrites.
Today I pushed a new version from my DEV server to the WWW server
using rsync. Obviously it was working
I have an application with a program called [mailfile.pl] which runs
under MP::Registry and is accessed via some mod_rewrites.
Today I pushed a new version from my DEV server to the WWW server using
rsync. Obviously it was working perfectly on DEV.
However the new [mailfile.pl] died with an
I'm drawing a blank here and I probably shouldn't be, but...
I would like to use a global variable that's only available for the
duration of a request.
I guess I could create() and undef() the variable at the start and end
of each request but that seems so... inelegant...
Any suggestions?
This will become very important as the PUSH capability of HTML5 gains
traction.
Maybe I should go read it again :)
Thanks Torsten!
Tosh
Torsten Förtsch wrote:
Hi,
some of you might find this one interesting:
http://foertsch.name/ModPerl-Tricks/req-hand-over.shtml
Torsten Förtsch
--
M
This worked for me and perhaps somebody else will find this useful
because I for sure could not find any simple vanilla starting points for
creating forks under mod_perl, but I did find a way to spawn processes
and not get zombies (actually I haven't tested this fully, but I'm
pretty sure).
#
could use that as a starting point.
Anyway, I'm just waiting for a couple days with my simple solution in
production to see if it causes any problems and then I'll post it here
and try to get something that could be such a starting point.
Tosh
Torsten Förtsch wrote:
On Saturday 20 F
everyone does what I do,
trying this and that stumbling about until they come up with some
monstrosity like Torsen has that works under the sheer weight of tricks.
Tosh
macke...@animalhead.com wrote:
On Feb 20, 2010, at 7:01 AM, Tosh Cooey wrote:
Anyway, the solution, at least so far until I
bProcess calls. I'd suggest trying your
external call under a PerlHandler instead and see if that works.
On Fri, Feb 19, 2010 at 1:52 PM, Tosh Cooey wrote:
Seriously, you know what, the code below doesn't even work.
And if I get rid of the redirect and replace it with some nice pre
day 09 February 2010 14:21:57 Tosh Cooey wrote:
Hi after much trial and all error I am seeing that the browser
connection closing is also stopping my subprocess.
I don't know what you are trying to achieve and I don't use
Apache2::Subprocess much. What I do to fork off processes ins
tips for avoiding zombies in CGI forking?
Tosh
Tosh Cooey wrote:
Hi after much trial and all error I am seeing that the browser
connection closing is also stopping my subprocess.
The main ModPerl::Registry program looks like this:
### file.pl ###
use Apache2::SubProcess ();
use JSON();
&
on of
the past months trying to get this to work.
Problem solved!
Tosh
Torsten Förtsch wrote:
On Tuesday 09 February 2010 14:21:57 Tosh Cooey wrote:
use POSIX 'setsid';
if( fork ) { POSIX::_exit 0; CORE::exit 0 }
chdir '/'or die "Can't chd
Hi after much trial and all error I am seeing that the browser
connection closing is also stopping my subprocess.
The main ModPerl::Registry program looks like this:
### file.pl ###
use Apache2::SubProcess ();
use JSON();
&main(shift);
sub main {
my $r = shift;
...
$r->spawn_proc_prog ('
worry about it.
The point they're inferring in the examples is that the second element is a
list reference - not whether it's a referenced to a named list or not is
irrelevant.
David
-Original Message-
From: Tosh Cooey [mailto:t...@1200group.com]
Sent: Tuesday, February 02,
So my will has crumbled, mostly because I'm probably not very good at
the "resident in memory" part of mod_perl and I will be using
Apache2::SubProcess to fire off a sub-process.
There seems to be two easy ways to send data to my detached sub-process;
via an \...@args or via $r->subprocess_env
9000, 99000, a2870, 0) + 780
00028594 _start (0, 0, 0, 0, 0, 0) + 5c
My MPM is straight pre-fork, default 5 children to start with.
Unfortunately, this stuff needs to go into production soon.
On Wed, Jan 27, 2010 at 11:42 AM, Tosh Cooey <mailto:t...@1200group.com>> wrote:
I'm seeing the same thing on my DEV server which is:
Server: Apache/2.2.11 (Ubuntu) mod_perl/2.0.4 Perl/v5.10.0
I see it in the mornings when it has been sitting around all night doing
nothing, and the first couple hits result in core dumps/seg faults, then
after pounding REFRESH like a mad mo
ModPerl::Registry routine.
If the log entry shows up in error_log, you're on your way...
Good Luck,
cmac
P.S. Google doesn't index some sites well.
Look at http://perl.apache.org/docs/2.0/
particularly its API link.
On Jan 25, 2010, at 5:49 PM, Tosh Cooey wrote:
Sorry, I couldn'
Would this problem be any different in a normal CGI context with the
program doing forks? I don't imagine it would be, which is why I see
the ultimate wisdom in spawning an external program to handle
long-running tasks, or just cron something.
Oh well, live and learn.
Tosh
William T wrote:
you are likely to pile up
more children than your household income (I'm sorry I meant
to say your server :-) can support.
Good Luck,
cmac
On Jan 26, 2010, at 2:27 PM, Tosh Cooey wrote:
So this works almost perfectly... Almost because:
#!/usr/bin/perl
use strict;
use Apache2::Const();
arn("cleanup was here");
return Apache2::Const::OK;
}
Then put a call like the one below in your ModPerl::Registry routine.
If the log entry shows up in error_log, you're on your way...
Good Luck,
cmac
P.S. Google doesn't index some sites well.
Look at http://perl.apache.org
quot;);
return Apache2::Const::OK;
}
Then put a call like the one below in your ModPerl::Registry routine.
If the log entry shows up in error_log, you're on your way...
Good Luck,
cmac
P.S. Google doesn't index some sites well.
Look at http://perl.apache.org/docs/2.0/
particularly its AP
ls.
Hopefully someone who knows can chime in on this.
If not, for me it would be worth the editing of getting the
module out from under ModPerl::Registry and into the "native
mode" of SetHandler modperl.
Best of luck,
cmac
On Jan 25, 2010, at 1:54 PM, Tosh Cooey wrote:
Ok, then
does no more DB stuff, it just sends a redirect.
This runs under ModPerl::Registry.
I'd like to get at least one thing working tonight, either the forking
or the DBI, I'll be happy!
Tosh
Perrin Harkins wrote:
On Mon, Jan 25, 2010 at 3:48 PM, Tosh Cooey wrote:
Thanks Perrin
Perrin Harkins wrote:
On Mon, Jan 25, 2010 at 2:41 PM, Tosh Cooey wrote:
Just to follow up on this before anyone spends any time caring about it, the
seg faults could also be because one of the zombie apache2 processes I've
spawned like a Gremlin is answering the request and well...
I
0
running, and the child is 11 and it does it's thing and hits
CORE::exit(0) should that process then die? Or will I now see apache
processes 1..11?
What should I be looking for after a clean fork?
Tosh
Tosh Cooey wrote:
I wish I could do SQL before the fork, but I need to update table
ece5b2897c...@mail.gmail.com%3e
http://www.gossamer-threads.com/lists/modperl/modperl/100099
Is the time for the SQL inquiry so bad that you can't
just do the inquiry before the fork-and-exec bit?
Best of Luck,
cmac
On Jan 25, 2010, at 8:07 AM, Tosh Cooey wrote:
My application-from-he
origine-
De : Tosh Cooey [mailto:t...@1200group.com]
Envoyé : lundi, 25. janvier 2010 17:08
À : modperl@perl.apache.org
Objet : mod_perl2 + fork + DBI = Chaos
My application-from-hell is doing odd things probably related to the
above storms and culminating in a perfect storm.
Can any
My application-from-hell is doing odd things probably related to the
above storms and culminating in a perfect storm.
Can anyone point me to resources outlining the best way to use the
combination in the subject line?
There seems to be many ways of accomplishing specifics but very little
gen
Not at all, I have no idea what they are, and ignorance is bliss!
Ah... Blessed ignorance...
Tosh
cr...@animalhead.com wrote:
If $r scares you, are $c = $r->connection() and $s = $r->server() truly
terrifying :-)
cmac
On Jan 15, 2010, at 4:08 PM, Tosh Cooey wrote:
It's proba
x27;);
is the same as
$r->subprocess_env;
my $uri = $ENV{REQUEST_URI};
But that's obviously just my lack of intuitiveness.
Yes, $r->uri is about a billion times more useful, thank-you again
David, and thanks for your help Torsten!
Tosh
Torsten Förtsch wrote:
On Friday 15 January
gt;uri?
http://perl.apache.org/docs/2.0/api/Apache2/RequestRec.html#C_uri_
David
-Original Message-----
From: Tosh Cooey [mailto:t...@1200group.com]
Sent: Friday, January 15, 2010 10:42 AM
To: modperl@perl.apache.org
Subject: $r->subprocess_env('REQUEST_URI') returns undef ?
From:
http:
From:
http://perl.apache.org/docs/2.0/api/Apache2/RequestRec.html#C_subprocess_env_
subprocess_env
Get/set the Apache subprocess_env table, or optionally set the value of
a named entry.
When the $key argument (string) is passed, it returns the corresponding
value (if such exists, or undef. T
Case closed.
Danke an alle!
Tosh
Torsten Förtsch wrote:
On Friday 15 January 2010 00:41:25 Tosh Cooey wrote:
Well Gang, we solved the smaller @_ mystery but not the larger
"different behaviour under mod_perl" mystery.
No, we have.
A registry script is wrapped into a subroutin
e source of your problem. A bit more
information can be found here:
http://www.perlfoundation.org/perl5/index.cgi?subroutines_called_with_the_ampersand
Executive summary: don't use "&" on a sub unless you need a sub-ref:
my $x = \&cfg;
$x->();
On
Ok now I'm really boggled...
If I use:
my $vars = { config => &cfg() };
instead of:
my $vars = { config => &cfg };
Then it works! So what's the difference between &cfg and &cfg() when it
comes to mod_perl, or at least ModPerl::Registry?
Thank-you all...
Tos
%CFG
*in* the package... so just make it package scoped - it'll act like a static
variable and persist. (scope it with 'my' and remove it from the export)
You can always get the value you want with a call to MyConfig::cfg
David
-Original Message-
From: Tosh Cooey [mailto:t
Hi to everyone!
I'm trying to find out if I'm passing objects properly under mod_perl
because something is not working as I expect.
index.pl
use MyConfig;
my $vars = { config => &cfg };
MyConfig.pm
###
package MyConfig;
use strict;
use Exporter;
use vars qw(@ISA @EXPORT %CF
per request which is
a nicer way.
The problem now will be to figure out what problems remain.
Tosh
Torsten Förtsch wrote:
On Monday 14 December 2009 16:14:31 Tosh Cooey wrote:
You may have seen my other recent questions to the list this month, the
gist of which is:
I want to setup
nputs directing them to the needed function.
If they already have cookie info use that as your switch/case redirection.
Jay Scherrer
Tosh Cooey wrote:
You may have seen my other recent questions to the list this month,
the gist of which is:
I want to setup an application for multiple clients, ea
l!
Tosh
Randal L. Schwartz wrote:
"Tosh" == Tosh Cooey writes:
Tosh> I want to setup an application for multiple clients, each of whom have
their
Tosh> own users.
Tosh> http://www.site.com/clientA/application.pl
Tosh> http://www.site.com/clientB/application.pl
Tosh&
You may have seen my other recent questions to the list this month, the
gist of which is:
I want to setup an application for multiple clients, each of whom have
their own users.
http://www.site.com/clientA/application.pl
http://www.site.com/clientB/application.pl
http://www.site.com/clientX/a
Apache::AuthDBI::authen($r);
}
1;
To answer my final question, yes I was doing something glaringly dumb :)
Tosh
Tosh Cooey wrote:
I'm trying to subclass Apache::AuthDBI by doing:
package MyAuthDBI;
use base "Apache::AuthDBI";
1;
Then in apache.conf
PerlModule MyAuthDBI
A
I'm trying to subclass Apache::AuthDBI by doing:
package MyAuthDBI;
use base "Apache::AuthDBI";
1;
Then in apache.conf
PerlModule MyAuthDBI
AuthType Basic
PerlAuthenHandler MyAuthDBI::authen
...
I'm getting the following error:
...failed to resolve handler `MyAuthDBI::authen': Can't l
Sorry, Apache::AuthDBI does still work just fine, I just had to patch
Apache::DBI 1.07.
Still open for suggestions if anyone knows a cleverer way to accomplish
what I'm doing.
Thanks!
Tosh
Tosh Cooey wrote:
If you saw my last post I described my solution for the following pr
If you saw my last post I described my solution for the following problem:
Right now I have an application set up for multiple clients: clientA,
clientB, clientC.
Each client has their own users.
The way I have it setup is clientA goes to http://www.site.com/clientA
and is presented with a l
Sorry for the long subject but I solved the questions I posted about and
thought I would share my $solution.
The initial problem was:
Right now I have an application set up for multiple clients: clientA,
clientB, clientC.
Each client has their own users.
The way I have it setup is clientA g
WAS: A better way to handle multiple client authentication?
Yeah I use something similar in another application, but in this
application I actually need to change the Auth_DBI_data_source variable
since the "FROM pwd_table" would actually need to be "FROM
clientA.pwd_table" and I can't see how
Right now I have an application set up for multiple clients: clientA,
clientB, clientC.
Each client has their own users.
The way I have it setup is clientA goes to http://www.site.com/clientA
and is presented with a login screen which is triggered by an .htaccess
file in a directory called /c
Hi, I either have the strangest issue or else I've made a blindingly
obvious error.
I'm trying to protect a directory using Apache2::AuthCookieDBI using the
following .htaccess (I have to use htaccess)
PerlModule Apache2::AuthCookieDBI
PerlSetVar berlinPath /berlin/
PerlSetV
77 matches
Mail list logo