Re: MP2 Script within another script AND via SSI
On Jul 11, 2006, at 9:50 AM, cfaust-dougot wrote: pa ckage SCRIPTS::ParseNav; use strict; use vars qw($r); ## Set some Constants # Template Path $ENV{'HTML_TEMPLATE_ROOT'} = xxx"; Perhaps an issue of style, but would that not be better set in httpd.conf ? # Our Content Template my $content = "Navigation.tmpl"; ## # Main # Our Mod_Perl Content Handler sub handler { $r = shift; &cgi_nav(); you're not passing $r here into cgi_nav # As this is being called from a include, set a header and print it out $r->send_http_header; print $content->output; # Return our header as we are done!!! return Apache::OK; } # End of Sub another personal thing... i'd wrap the cgi_nav -> print in an eval block. you'd probably want to return Apache::OK in any event, but if you get some crazy error, why die?
Re: MP2 Script within another script AND via SSI
Perrin Harkins wrote: > On Tue, 2006-07-11 at 09:50 -0400, cfaust-dougot wrote: > >> What I have below works, but for some reason I'm not all that > comfortable with >> it.. Could someone tell me if I'm doing anything evil with my > approach?? > > Looks fine to me. SSI virtual includes are quite efficient with > mod_perl. They are efficient, but you still need to be careful. At ApacheCon::EU they mentioned changing all apache.org sites to include a banner ad for the next ApacheCon that would rotate and they used SSI to do it. It increased their traffic 2-3x because it broke all of the caching happening at browsers, routers and proxies. If the content is truly dynamic, then it's a good solution. If it's content that rarely changes, pre-generation is probably a better solution. -- Michael Peters Developer Plus Three, LP
RE: MP2 Script within another script AND via SSI
Title: Re: MP2 Script within another script AND via SSI Thanks Perrin, don't know why it was bothering me soo much, but I feel better now!! From: Perrin Harkins [mailto:[EMAIL PROTECTED]Sent: Tue 7/11/2006 11:03 AMTo: cfaust-dougotCc: modperl@perl.apache.orgSubject: Re: MP2 Script within another script AND via SSI On Tue, 2006-07-11 at 09:50 -0400, cfaust-dougot wrote:> What I have below works, but for some reason I'm not all thatcomfortable with> it.. Could someone tell me if I'm doing anything evil with myapproach??Looks fine to me. SSI virtual includes are quite efficient withmod_perl.- Perrin
Re: question: ssl login
On Mon, 2006-07-10 at 21:52 -0400, Jonathan wrote: > a- is this correct: > the recommended place to run ssl through is some sort of proxy? Yes. > b-in that scenario, is there any way to make sure that a login > happened via SSL ? There are many ways you could do it. You can proxy traffic from SSL to a differently-named virtual host on the mod_perl server, or a different port, or add a header of some kind to the proxied request. There's a lot of discussion on this topic in the mailing list archives. - Perrin
Re: Custom debugger subs and Apache::DB
On Mon, 2006-07-10 at 23:09 -0400, R Koch wrote: > On 7/10/06, Philip M. Gollucci <[EMAIL PROTECTED]> wrote: > > Why not use Apache::DProf part of Apache::DB ? > > > > I did try that first, but I couldn't get it to work at all. I exactly > followed the examples in the module's documentation, and apache runs > with Apache:Dprof loaded; but I never got an output file to run > through dprofpp. Well, I have no experience with custom debugger subs, so I can't help you with that, but Apache::DProf works, and if you want to get that going you are welcome to post your config information here for help. - Perrin
Re: MP2 Script within another script AND via SSI
On Tue, 2006-07-11 at 09:50 -0400, cfaust-dougot wrote: > What I have below works, but for some reason I'm not all that comfortable with > it.. Could someone tell me if I'm doing anything evil with my approach?? Looks fine to me. SSI virtual includes are quite efficient with mod_perl. - Perrin
Re: [QUESTION] mod_perl isnt having any effect...perhaps I've misconfigured?
To check if mod_perl is loading at all, you could put some warns in your module that you load with PerlModule, or PerlRequire a startup.pl that logs something. i think i found the problem, its something specific to the linux distro i'm using (gentoo) thats preventing mod_perl from ever loading. i've yet to find the solution, but since its distro-specific, i'll ask on the gentoo forums. thanks so much for the help!
MP2 Script within another script AND via SSI
Morning All, What I have below works, but for some reason I'm not all that comfortable with it.. Could someone tell me if I'm doing anything evil with my approach?? MP2 (ParseNav.pm) Script Description: Needed a script to create page navigation, the nav needs to be called within other MP2 scripts as well as in standard static pages (via ssi) When I want the nav within another MP2 script, I simply... my $top_nav = SCRIPTS::ParseNav->cgi_nav($r); When I want the nav in a static HTML page, I simply.. Below is the basic ParseNav script - TIA for any help or advise.. -Chris package SCRIPTS::ParseNav; use strict;use vars qw($r); ## Set some Constants# Template Path$ENV{'HTML_TEMPLATE_ROOT'} = xxx";# Our Content Templatemy $content = "Navigation.tmpl"; ### Main# Our Mod_Perl Content Handlersub handler { $r = shift; &cgi_nav(); # As this is being called from a include, set a header and print it out $r->send_http_header; print $content->output; # Return our header as we are done!!! return Apache::OK; } # End of Sub##sub cgi_nav { my ($self,$r) = @_; # do what we want to do and return the content template to the requesting MP2 script return $content; }
Re: Custom debugger subs and Apache::DB
R Koch wrote: > On 7/10/06, Philip M. Gollucci <[EMAIL PROTECTED]> wrote: >> Why not use Apache::DProf part of Apache::DB ? >> > > I did try that first, but I couldn't get it to work at all. I exactly > followed the examples in the module's documentation, and apache runs > with Apache:Dprof loaded; but I never got an output file to run > through dprofpp. I might get to looking at it soonish... Load Apache::DProf as early as possible in your startup.pl file. BEFORE other uses particularly the code you are interested in I forget that one all the time and go crazy for about an hour each time. -- Philip M. Gollucci ([EMAIL PROTECTED]) 323.219.4708 Consultant / http://p6m7g8.net/Resume/resume.shtml Senior Software Engineer - TicketMaster - http://ticketmaster.com 1024D/A79997FA F357 0FDD 2301 6296 690F 6A47 D55A 7172 A799 97F "In all that I've done wrong I know I must have done something right to deserve a hug every morning and butterfly kisses at night."
Re: question: ssl login
Jonathan wrote: > a- is this correct: > the recommended place to run ssl through is some sort of proxy? > ie: > internet ||| -> Load Balancer ( ssl ) -> cluster ( mod_perl / > vanilla / etc ) > internet ||| -> Apache Port 80/443 ( ssl + vanilla ) -> mod_perl > ( port 8000 ) > internet ||| -> Lighttpd Port 80/443 ( ssl + vanilla ) -> > mod_perl ( port 8000 ) I think ideally you would want your front end proxy layer / load balancer to be SSL and ProxyPass or mod_rewrite to a backend mod_perl application layer. Ideally only the proxy layer is physically on the Internet, so communication from proxy<->application layer doesn't really have to be encrypted unless of course you don't trust your internal network. That will save you some $$$ in SSL cards that you won't have to buy. Proxyies on 80 and 433 application layer on 80 or whatever port As long as your static content doesn't come off the application layer it doesn't really matter if its lighhttp or or some httpd proxy config; likely, you'll need it to support HTTPS and HTTP to avoid the dreaded warnings for mixing schemes for images and external URIs like javascript/css and the such. Just my 2cents -- Philip M. Gollucci ([EMAIL PROTECTED]) 323.219.4708 Consultant / http://p6m7g8.net/Resume/resume.shtml Senior Software Engineer - TicketMaster - http://ticketmaster.com 1024D/A79997FA F357 0FDD 2301 6296 690F 6A47 D55A 7172 A799 97F "In all that I've done wrong I know I must have done something right to deserve a hug every morning and butterfly kisses at night."
Re: [RELEASE CANDIDATE] libapreq2 2.08-RC3
On Mon, 2006-07-10 at 13:41 -0700, Philip M. Gollucci wrote: > Works fine, I just untarred it here: > http://people.apache.org/~pgollucci/apreq/libapreq2-2.08 OK. I'm off to work now anyway - I'll try unpacking on machines there. -- Bojan
Re: [RELEASE CANDIDATE] libapreq2 2.08-RC3
On Mon, 2006-07-10 at 13:27 -0700, Philip M. Gollucci wrote: > > > 3b8b52c261c72adc971b656ca77f6eab libapreq2-2.08-RC3.tar.gz > > > [EMAIL PROTECTED] /home/pgollucci/public_html/apreq2 rv=0 52 >md5 > libapreq2-2.08-RC3.tar.gz > MD5 (libapreq2-2.08-RC3.tar.gz) = 3b8b52c261c72adc971b656ca77f6eab OK. That seems the same, so it's not a download problem on my end. You don't see similar problems when unpacking on your end, do you? BTW, Fedora build system (i.e. the machine I don't control, probably running RHEL or something like that) also whinged on unpacking and it wouldn't build the RPM. Build log is here: http://buildsys.fedoraproject.org/logs/fedora-development-extras/12379-libapreq2-2.08-0.rc3.1.fc6/i386/build.log -- Bojan
Re: [RELEASE CANDIDATE] libapreq2 2.08-RC3
On Sat, 2006-07-08 at 03:39 -0700, Philip M. Gollucci wrote: > Please download, test, and VOTE on the following > candidate tarball: > > http://people.apache.org/~pgollucci/apreq2/libapreq2-2.08-RC3.tar.gz Weird. I'm getting errors when unpacking the tarball: - -rw-r--r-- pgollucci/wheel 5921 2006-07-08 19:36 libapreq2-2.08/win32/libapreq2.mak -rw-r--r-- pgollucci/wheel 4321 2006-07-08 19:36 libapreq2-2.08/win32/mod_apreq2.mak -rw-r--r-- pgollucci/wheel 1516 2006-07-08 19:36 libapreq2-2.08/win32/README -rw-r--r-- pgollucci/wheel 4184 2006-07-08 19:36 libapreq2-2.08/win32/test_cgi.mak -rw-r--r-- pgollucci/wheel977 2006-07-08 19:36 libapreq2-2.08/win32/util.pl tar: Error exit delayed from previous errors - What's the MD5 supposed to be? -- Bojan