Apache2::SizeLimit with non-threaded MPMs

2006-02-08 Thread Ken Perl
I know Apache2:SizeLimit works ony with non-threaded MPMs, but I don't know how to fix the issue, any comments? [Thu Feb 09 13:46:21 2006] [error] [client 221.219.202.148] failed to resolve handler `Apache2::SizeLimit': Apache2::SizeLimit at the moment works only with non-threaded MPMs at /usr/sha

Re: the modperl book link is broken

2006-02-08 Thread Ken Perl
I still can't connect the site, : -( I prefer e-book and appreciate that if anyone who have those two books could send me the e-book copy. On 2/8/06, Perrin Harkins <[EMAIL PROTECTED]> wrote: > Ken Perl wrote: > > The page > > http://perl.apache.org/docs/offsite/books.html#The_mod_perl_Developer

Re: caching data in a module

2006-02-08 Thread Perrin Harkins
On Wed, 2006-02-08 at 21:03 +0100, Daniel McBrearty wrote: > I don't know if this is connected, but I noticed init was getting > called TWICE on a restart. I turned of PerlFreshRestart and now it > just happens once. > > Can't quite see the connection, but maybe it is related ... That probably is

Re: I'm getting max connection errors for Apache::DBI

2006-02-08 Thread Perrin Harkins
On Wed, 2006-02-08 at 11:51 -0600, Boysenberry Payne wrote: > What I'm seeing is 37 mysql threads being created for 7 apache > children. It would seem as > though I would need to create a 5/1 ratio of mysql connections to > apache children. Is that normal? No. If you use the same connection i

Re: caching data in a module

2006-02-08 Thread Daniel McBrearty
I don't know if this is connected, but I noticed init was getting called TWICE on a restart. I turned of PerlFreshRestart and now it just happens once. Can't quite see the connection, but maybe it is related ...On 2/8/06, Daniel McBrearty <[EMAIL PROTECTED] > wrote:Thanks. Well, here is the code (

Re: mod_perl 2 newbie

2006-02-08 Thread JupiterHost.Net
Tom Schindl wrote: May I suggest reading SIMPLY the INSTALL-File coming with mod-perl where it reads: Thanks, I did look at those, what I was looking for was a configure option to add those for you without having to do the LoadModule manually or via a apache2/bin/apxs command. Mod_perl 1

Re: mod_perl 2 newbie

2006-02-08 Thread Tom Schindl
May I suggest reading SIMPLY the INSTALL-File coming with mod-perl where it reads: ---8<--- Simple config: LoadModule perl_module modules/mod_perl.so #PerlModule Apache::compat # your config comes here For a more detailed version (including more options) refer to:

Re: caching data in a module

2006-02-08 Thread Daniel McBrearty
Thanks. Well, here is the code (slightly edited) package Sitetext; {     my $sitetext_cache = {};     sub init     {     print "Sitetext::init\n";     my $all = getAll();     foreach $st (@$all)     {     # ... fill in the cache. This is definitely OK.     } #pri

Re: mod_perl 2 newbie

2006-02-08 Thread JupiterHost.Net
JupiterHost.Net wrote: Diona Kidd wrote: > I believe that the command you shared will build MP2 as a module by > default and you will see mod_perl.so in the modules directory. Then just Sure enough /usr/local/apache2/moduels/mod_perl.so is there I'm still stuck on apache one's setup Than

Re: caching data in a module

2006-02-08 Thread Perrin Harkins
Daniel McBrearty wrote: OK, I fixed it. Classic modperl mistake, I guess ... The my $cache; is not shared because the subs look like named inner subs to Apache::Registry. The solution is to do use vars '$cache'; I can't say for sure without seeing your code, but this doesn't sound right.

Re: I'm getting max connection errors for Apache::DBI

2006-02-08 Thread Perrin Harkins
Boysenberry Payne wrote: What do I need to do to fix it? You probably just need to raise the maximum number of connections on your MySQL servers. If you use two different database servers then you should be seeing a total number of connections on each one that matches the number of child p

Re: the modperl book link is broken

2006-02-08 Thread Perrin Harkins
Ken Perl wrote: The page http://perl.apache.org/docs/offsite/books.html#The_mod_perl_Developer_s_Cookbook introduces two books, their links http://modperlbook.org/ and http://www.modperlcookbook.org/ are both broken now Those links both work fine for me. Maybe there's a network problem on yo

Re: mod_perl 2 newbie

2006-02-08 Thread JupiterHost.Net
This is what I do to build it: In apache src dir: ./configure \ --prefix="/usr/local/apache_2.0.54+mod_perl" \ --enable-so \ --enable-proxy \ --enable-ssl \ --enable-proxy-http \ --with-mpm=prefork \ --enable-modules=most \ --enable-mods-shared=max make install

Re: caching data in a module

2006-02-08 Thread Daniel McBrearty
OK, I fixed it. Classic modperl mistake, I guess ... The my $cache; is not shared because the subs look like named inner subs to Apache::Registry. The solution is to do use vars '$cache'; It's all in chapter 4 of "writing apache modules with perl and c" (stein/maceachern), if anyone ever wan

Re: mod_perl 2 newbie

2006-02-08 Thread JupiterHost.Net
Diona Kidd wrote: > I believe that the command you shared will build MP2 as a module by > default and you will see mod_perl.so in the modules directory. Then just Sure enough /usr/local/apache2/moduels/mod_perl.so is there I'm still stuck on apache one's setup Thanks Diona! > add the LoadModu

Re: mod_perl 2 newbie

2006-02-08 Thread JupiterHost.Net
John ORourke wrote: I don't know about a manual build but some installs put the perl stuff in file(s) in /usr/local/apache2/conf.d/, so it may not be mentioned in httpd.conf. Thanks John for the info, that doesn't appear to be it but I'm still looking to see if it was added in a different

Re: the modperl book link is broken

2006-02-08 Thread John ORourke
Both links work for me... Ken Perl wrote: their links http://modperlbook.org/ and http://www.modperlcookbook.org/ are both broken now, Does anyone have these two ebooks? ps. the sig separator should be dash-dash-space ;)

Re: the modperl book link is broken

2006-02-08 Thread Tobias Regneri
Ken Perl wrote: > their links http://modperlbook.org/ ... are both broken modperlbook.org works fine for me, try it again ... TR

the modperl book link is broken

2006-02-08 Thread Ken Perl
Hi, The page http://perl.apache.org/docs/offsite/books.html#The_mod_perl_Developer_s_Cookbook introduces two books, their links http://modperlbook.org/ and http://www.modperlcookbook.org/ are both broken now, Does anyone have these two ebooks? -- perl -e 'print unpack(u,"62V5N\"FME;G\!E

Re: caching data in a module

2006-02-08 Thread Daniel McBrearty
Hi I got this working fine on my dev machine without too much trouble. But when I tried it on my production server things went astray. On closer examination, it seems that in both cases the memory cache is not being shared between processes. The cahe is not that big though (a few hundred k perhap

Re: module bug?

2006-02-08 Thread Ken Perl
And I found just now, I got the info message before the root / page is returned. On 2/8/06, Ken Perl <[EMAIL PROTECTED]> wrote: > Sounds reasonable. > Based on your anaIysis, I added > > warn "reach last line of WebGUI.pm"; > > into the handler before the last line. > > sub handler{ >

Re: timestamp of Apache::DB

2006-02-08 Thread Ken Perl
That helps already, but need to add the statement into the directory and works fine! On 2/8/06, John Doe <[EMAIL PROTECTED]> wrote: > Perrin Harkins am Dienstag, 7. Februar 2006 18.45: > > On Tue, 2006-02-07 at 08:56 +0100, John Doe wrote: > > > Ken Perl am Dienstag, 7. Februar 2006 07.44: > > >

Re: module bug?

2006-02-08 Thread Ken Perl
Sounds reasonable. Based on your anaIysis, I added warn "reach last line of WebGUI.pm"; into the handler before the last line. sub handler{ ... ... else { $r->set_handlers(PerlResponseHandler => \&contentHandler); $r->set_handle

Re: timestamp of Apache::DB

2006-02-08 Thread John Doe
Perrin Harkins am Dienstag, 7. Februar 2006 18.45: > On Tue, 2006-02-07 at 08:56 +0100, John Doe wrote: > > Ken Perl am Dienstag, 7. Februar 2006 07.44: > > > when Apache::DB is initialized it will write a line of log into > > > error.log, but without a timestamp, > > > [notice] Apache::DB initiali

Re: module bug?

2006-02-08 Thread Torsten Foertsch
On Wednesday 08 February 2006 07:13, Ken Perl wrote: > I see a info in the error.log when I access the uri / and works fine, > [Wed Feb 08 13:22:35 2006] [info] [client 10.0.0.1] Module bug? > Request filename is missing for URI / > > Is the info reported by modperl2? anything wrong? You have writ