Re: Managing to kill httpd (why?) semi-solved
Just letting you know the versions of stuff: Perl 5.6.0 mod_perl 1.24 apache 1.3.12 I've played around with the WebAPI loader and got it to stop crashing (good) but the object isn't cached (not good - I need POST data in many places and can't depend on PNOTES since that may not be available on the target platform (CGI)). Any idea? Yann package Magrathea::WebAPI; use Carp; use Magrathea::MyConfig; # Simple module...simple stuff BEGIN { } sub new { my $self = {}; bless $self; my $driver; my $cfg = Magrathea::MyConfig->new(); if (!$driver) { my $mod = "Magrathea::WebAPI::".$cfg->webapi; eval "package Magrathea::_firesafe; require $mod "; $driver = eval { $mod->driver() }; if (!$driver) { print "No driver!\n"; die "Ouch...\n"; } } return $driver; } 1; -- Yann Ramin [EMAIL PROTECTED] Atrus Trivalie Productions www.redshift.com/~yramin Monterey High ITwww.montereyhigh.com AIM oddatrus Marina, CA IRM Developer Network Toaster Developer SNTS Developer KLevel Developer
Managing to kill httpd (why?)
Hi therethe following code causes the following to happen: And I have no idea why [grin]. I'm assuming something in my requires and such is balking out, but what? Program received signal SIGSEGV, Segmentation fault. 0x80a2605 in ap_table_get () (gdb) backtrace #0 0x80a2605 in ap_table_get () #1 0x808961e in XS_Apache__Table_FETCH () #2 0x812727b in Perl_pp_entersub () #3 0x81218d3 in Perl_runops_debug () #4 0x80e4302 in Perl_call_sv () #5 0x80e406e in Perl_call_sv () #6 0x806617a in perl_call_handler () #7 0x8065833 in perl_run_stacked_handlers () #8 0x8063a28 in perl_handler () #9 0x80a688d in ap_invoke_handler () #10 0x80ba8e8 in ap_some_auth_required () #11 0x80ba952 in ap_process_request () #12 0x80b1bc3 in ap_child_terminate () #13 0x80b1d81 in ap_child_terminate () #14 0x80b1efa in ap_child_terminate () #15 0x80b2508 in ap_child_terminate () #16 0x80b2d20 in main () #17 0x80620f5 in _start () (NOTE: WebAPI is a wrapper to Apache::Request and Apache::Cookie) (it segfaults with all types ofmodule and screen parameters, valid and invalid) #!/usr/bin/perl -w use Magrathea::WebTemplate; use Magrathea::WebAPI; my $api = Magrathea::WebAPI->new(); my $tmpl = Magrathea::WebTemplate->new(); my $mod = $api->getparam('module'); if (!$mod) { $mod = 'start'; } my $scr = $api->getparam('screen'); if (!$scr) { $scr = 'start'; } my $modd = "Magrathea::Web::".$mod; eval "package Magrathea::_firesafe; require $modd "; my $obj = eval { $modd->new() }; if (!$obj) { $api->canned_html; print "NDNo driver for $mod!\n"; die "No driver. I can't do anything about that. Sorry"; } $obj->webaction($scr); (and just for completness, here is the WebAPI loader, modelled on DBI) package Magrathea::WebAPI; use Carp; use Magrathea::MyConfig; # Simple module...simple stuff my $driver; sub new { my $self = {}; bless $self; my $cfg = Magrathea::MyConfig->new(); if (!$driver) { my $mod = "Magrathea::WebAPI::".$cfg->webapi; eval "package Magrathea::_firesafe; require $mod "; $driver = eval { $mod->driver() }; if (!$driver) { print "No driver!\n"; die "Ouch...\n"; } } return $driver; } -- Yann Ramin [EMAIL PROTECTED] Atrus Trivalie Productions www.redshift.com/~yramin Monterey High ITwww.montereyhigh.com AIM oddatrus Marina, CA IRM Developer Network Toaster Developer SNTS Developer KLevel Developer
Re: Loading modules in Parent??
Won't someone comment on this post? That's a chunk of memory! At 11:46 AM 09/28/00 -0700, Bill Moseley wrote: >This is what pmap -x is showing: > >Address Kbytes Resident Shared Private Permissions Mapped File > -- -- -- -- >total Kb 19968 185282816 15712 <<-- preloaded modules >total Kb 11528 1015226567496 <<-- not preloaded It's almost all heap: 00164000 16376 15256 312 14944 read/write/exec[ heap ] 0016400075926608 1046504 read/write/exec[ heap ] Is this an issue just with Solaris or is this expected (and seen) on other platforms? Bill Moseley mailto:[EMAIL PROTECTED]
Re: One httpd.conf for both apache heavy and apache-light [IfModule]
At 18:03 30/09/2000 -0300, martin langhoff wrote: >at least I don't feel alone on this one :) Oh no you're not ;) >now let me seize the opportunity and (while you're around, >having >admitted you're using a 2 tiered apache setup,) ask you if you are doing >the mod_rewrite/mod_proxy trick, and how were you able to pull it off. Most of the sites that I produce have a lot of static content and just a few dynamic pages and the exceptions are nearly 100% routed through mod_perl, whichis fairly easy. I don't use mod_rewrite for the former, the following suffices: ProxyPass /mperl/ http://www.url.net:8000/mperl/ ProxyPassReverse /mperl/ http://www.url.net:8000/mperl/ Then anything that's accessed under /mperl is treated by the mod_perl backend. For the latter I use various combinations of FileMatch or mod_rewrite depending on the setup. It's usually fairly simple. >I'm reading the mod_rewrite guide right now and my head *is* >spinning. It's quite a good guide but it has to get one's head spinning. Remember the first time you read about Perl regexes :) -- robin b. Brain damage is all in your head.
Script executing error.
Dear All, I have configured a web server. Presently I am able to execute shell script on the browser except .shtml .cgi .pl on the browser..please let me know if anybody knows how to or make the changes in httpd.conf file or any other related file to execute the perl and cgi scripts on the browser. Best Regards.,
Re: One httpd.conf for both apache heavy and apache-light [IfModule]
- Original Message - From: "Robin Berjon" <[EMAIL PROTECTED]> To: "martin langhoff" <[EMAIL PROTECTED]> Cc: <[EMAIL PROTECTED]> Sent: Saturday, September 30, 2000 2:53 PM Subject: Re: One httpd.conf for both apache heavy and apache-light [IfModule] > It is indeed a bit of a configuration nightmare when vhosts add up (even > though it's well worth the trouble). What I do is use both IfModule to > merge both confs and mod_macro to factor out the repetitive bits. It works > quite well and at any rate the win of splitting into two httpds overweighs > the configuration overhead, but I'm still not completely happy. Half of me > is thinking about using Include to try and break up the conf file into > smaller bits and the other half wants to write something that would help > automate the configuration completely. It's possible on the mod_perl side > if you write your conf in Perl, but it's more troublesome on the plain > Apache side. If anyone has a silver bullet for this (well, I'll settle for > a good solution that makes my life easier ;) I'd gladly hear it. The problem with conditionals and includes is that the light/heavy httpds tend to have almost nothing in common except the DocumentRoot and they may not even be on the same machines. Some sort of template mechanism might work with postprocessing to spit out the front and back end config files, but then you have yet-another-syntax to learn. I usually just open both files in different windows and cut and paste to make any common changes. Les Mikesell [EMAIL PROTECTED]
Re: One httpd.conf for both apache heavy and apache-light [IfModule]
martin langhoff <[EMAIL PROTECTED]> writes: > I'm reading the mod_rewrite guide right now and my head *is* > spinning. Remind me to write up my experiences. I did this a couple of weeks ago on a five-machine setup and it's worth documenting for peer review... (Like to see if I missed anything obvious :-) -- Dave Hodgkinson, http://www.hodgkinson.org Editor-in-chief, The Highway Star http://www.deep-purple.com Apache, mod_perl, MySQL, Sybase hired gun for, well, hire -
Re: One httpd.conf for both apache heavy and apache-light [IfModule]
Perrin, Robin, et al at least I don't feel alone on this one :) now let me seize the opportunity and (while you're around, having admitted you're using a 2 tiered apache setup,) ask you if you are doing the mod_rewrite/mod_proxy trick, and how were you able to pull it off. I'm reading the mod_rewrite guide right now and my head *is* spinning.
Re: One httpd.conf for both apache heavy and apache-light [IfModule]
martin langhoff wrote: > > You mean you post-process your httpd.conf ? Phew! > > mmmh. I'm flabbergasted (sp?) and certainly mesmerized, can you tell us > a bit more? It's pretty simple. We have a file with the varying bits of info in it (MaxClients, MaxRequestsPerChild, etc.) and a small program that accepts a name to use as a key into this file. It takes the hash of data from the file and runs it through the httpd.conf template using TT, which allows us to do loops, conditionals, or even in-line perl if we wanted to. This all happens as an installation step, so it's an extra step compared to IfModule tricks that happen on the fly. It does have an advantage in that you can use it to handle configuration variations for QA and development systems. - Perrin
Re: One httpd.conf for both apache heavy and apache-light [IfModule]
You mean you post-process your httpd.conf ? Phew! mmmh. I'm flabbergasted (sp?) and certainly mesmerized, can you tell us a bit more? Perrin Harkins wrote: > Where I work, we use Template Toolkit to generate > variations from one httpd.conf template.
Re: One httpd.conf for both apache heavy and apache-light [IfModule]
At 16:37 30/09/2000 -0300, martin langhoff wrote: > I'm trying to build a 2 tiered Apache setup, with one light httpd, one >mod_perl httpd and a mod_php4 httpd, all running on different ports on >the same machine/IP. Right now I'm solving the mod_rewrite mod_proxy >stuff (I want the light httpd to transparently proxy requests to the 2nd >tier httpd daemons). > > What I see in the not-so distant future is a hell of a configuration >nightmare. From the start, this box should be hosting about 30 vhosts, >and I don't really want to keep them in synch across 3 different files. >So I thought of using a single monolithic vhosts.conf with lots of >IfModule sections. > > Is anyone using this directive? > Am I getting in a mess? It is indeed a bit of a configuration nightmare when vhosts add up (even though it's well worth the trouble). What I do is use both IfModule to merge both confs and mod_macro to factor out the repetitive bits. It works quite well and at any rate the win of splitting into two httpds overweighs the configuration overhead, but I'm still not completely happy. Half of me is thinking about using Include to try and break up the conf file into smaller bits and the other half wants to write something that would help automate the configuration completely. It's possible on the mod_perl side if you write your conf in Perl, but it's more troublesome on the plain Apache side. If anyone has a silver bullet for this (well, I'll settle for a good solution that makes my life easier ;) I'd gladly hear it. -- robin b. Brain damage is all in your head.
Re: One httpd.conf for both apache heavy and apache-light [IfModule]
martin langhoff wrote: > What I see in the not-so distant future is a hell of a configuration > nightmare. From the start, this box should be hosting about 30 vhosts, > and I don't really want to keep them in synch across 3 different files. > So I thought of using a single monolithic vhosts.conf with lots of > IfModule sections. That could work. So could , where you start your heavy httpd with a -Dheavy. Where I work, we use Template Toolkit to generate variations from one httpd.conf template. - Perrin
One httpd.conf for both apache heavy and apache-light [IfModule]
hi, I'm trying to build a 2 tiered Apache setup, with one light httpd, one mod_perl httpd and a mod_php4 httpd, all running on different ports on the same machine/IP. Right now I'm solving the mod_rewrite mod_proxy stuff (I want the light httpd to transparently proxy requests to the 2nd tier httpd daemons). What I see in the not-so distant future is a hell of a configuration nightmare. From the start, this box should be hosting about 30 vhosts, and I don't really want to keep them in synch across 3 different files. So I thought of using a single monolithic vhosts.conf with lots of IfModule sections. Is anyone using this directive? Am I getting in a mess? martin
Re: Zope functionality under mod_perl
"Les Mikesell" <[EMAIL PROTECTED]> writes: > - Original Message - > From: "Philip Molter" <[EMAIL PROTECTED]> > To: <[EMAIL PROTECTED]> > Sent: Thursday, September 28, 2000 5:29 PM > Subject: Zope functionality under mod_perl > > > I've looked at AxKit, and I'm not quite sure if it's exactly what > > I'm looking for, especially since the development team I'm working > > for does not have much XML/XSL experience and I'd like to keep it > > as perl/HTML oriented as possible. I've also looked at several of > > the templating tools, but they don't look like they provide the > > object-oriented aspect I'm looking for (or do they; anyone have > > experience down that path)? The Template Toolkit lets you make calls into objects, no problem. > > Have you looked at embperl? The latest version allows you to map > the filesystem/URL path to a hierarchy of objects so you can > create a top level default and only override the parts you > want to change as you go down to different sections - without > changes in the page itself. Just like the Template Toolkit... -- Dave Hodgkinson, http://www.hodgkinson.org Editor-in-chief, The Highway Star http://www.deep-purple.com Apache, mod_perl, MySQL, Sybase hired gun for, well, hire -
PerlLogHandler not being run ?
Hi all, After having perused the Eagle book, Stas's Guide and archives of the mailing-list, I see no lights on my problem. Maybe I'm doing something so silly that you will see it right on. My setup : Debian Linux with apache 1.3.9-13.1 and mod_perl 1.21.2309-1 I've put : PerlLogHandler My::Handler in apache's httpd.conf but it is not runned by Apache ! I have Trans,Authen,Access,Authz and Main handlers all working fine in the exact same situation. I believe Debian mod_perl package is compiled with EVERYTHING=1 and that's what /perl-status told me also. If, from another handler I call the My::Handler::handler() subroutine it is correctly executed. So my code seems OK. And perl -c is happy too. And apache restart is happy too. But Apache doesn't want to execute it. It's the same if I put it in a PerlCleanupHandler. I even tried : sub handler { warn("YYY\n"); } Nothing written, nowhere... What do I miss ? Is there a delay between the Main handler and the Log Handler during Apache's run ? -- Patrick. ``C'est un monde qui n'a pas les moyens de ne plus avoir mal.''
Re: Zope functionality under mod_perl
- Original Message - From: "Philip Molter" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Thursday, September 28, 2000 5:29 PM Subject: Zope functionality under mod_perl > I've looked at AxKit, and I'm not quite sure if it's exactly what > I'm looking for, especially since the development team I'm working > for does not have much XML/XSL experience and I'd like to keep it > as perl/HTML oriented as possible. I've also looked at several of > the templating tools, but they don't look like they provide the > object-oriented aspect I'm looking for (or do they; anyone have > experience down that path)? Have you looked at embperl? The latest version allows you to map the filesystem/URL path to a hierarchy of objects so you can create a top level default and only override the parts you want to change as you go down to different sections - without changes in the page itself. Les Mikesell [EMAIL PROTECTED]