From: Gareth K. <gb...@th...> - 2002-06-27 15:05:24
|
Okie - thanks - ( i specify the component roots without using an ah hash though ) Gareth -----Original Message----- From: Tobias Kremer [mailto:tob...@ur...] Sent: 27 June 2002 16:03 To: gb...@th...; gb...@th...; Mason List Subject: RE: [Mason] New Server - new install You can now get the interp object from the HTML::Mason::ApacheHandler. Try this: chown ( Apache->server->uid, Apache->server->gid, $ah{$site}->interp->files_written ); At 16:01 27.06.02 +0100, Gareth Kirwan wrote: >Do I still need to do a chown nobody on the files written - and if so - how? > >Thanks > >Gareth > >-----Original Message----- >From: mas...@li... >[mailto:mas...@li...]On Behalf Of Gareth >Kirwan >Sent: 27 June 2002 15:27 >To: Tobias Kremer; Mason List >Subject: RE: [Mason] New Server - new install > > >Using that syntax the variables are still global then - that's what we >wanted. > >Thanks Tobie > >Anyone else have any thoughts that might add us. > >-----Original Message----- >From: mas...@li... >[mailto:mas...@li...]On Behalf Of Tobias >Kremer >Sent: 27 June 2002 15:23 >To: gb...@th...; Mason List >Subject: Re: [Mason] New Server - new install > > >Hi Gareth, > >I suggest taking a look into the UPGRADE file "shipped" with mason 1.10 = - >All >neccessary changes are described in there. > >Short snippet from it: > ><-- >So this: > my $interp =3D HTML::Mason::Interp->new( comp_root =3D> ..., data_di= r >=3D>... ); > my $ah =3D HTML::Mason::ApacheHandler->new( interp =3D> $interp ); > >becomes this: > my $ah =3D HTML::Mason::ApacheHandler->new( comp_root =3D> ..., data= _dir >=3D>... ); >--> > > >You can still declare globals like this: > >{ > package HTML::Mason::Commands; > use vars qw($dbh); >} > >$HTML::Mason::Commands::dbh =3D DBI->connect ... blabla > > >Cheers, >Tobie > > > > >At 15:12 27.06.02 +0100, Gareth Kirwan wrote: > >Hey all, > > As you know (some of you) we've been using Mason for quite so= me > > time now, > > with apache and Mod perl. > > > > We're installing a new machine - and have install Apache 1.3 > > (don't like > >2.0 :-) ), mod_perl > > and Apache::Request on it (that took some doing - it couldn't > > find the > >httpd.h, etc headers > > for apache even though they were all in /usr/local/include ! :-( ) > > > > Now normally we'd have our httpd.conf like this: > > ------------------------------------------- > > PerlRequire mason-handler.pl > > > > <Directory /var/virtual/www.website.com> > > <FilesMatch "\.(html|js|css)$"> > > SetHandler perl-script > > PerlHandler HTML::Mason > > </FilesMatch> > > </Directory> > > ------------------------------------------- > > And our mason-handler.pl: > > ------------------------------------------- > > package HTML::Mason; > > use HTML::Mason; > > use HTML::Mason::ApacheHandler(args_method=3D>'mod_perl'); > > use strict; > > > > my $parser =3D new HTML::Mason::Parser; > > $parser->allow_globals(qw($dupa $id $username $txn)); > > > > my $interp =3D new HTML::Mason::Interp ( > > parser=3D>$parser, > > comp_root=3D>[[Main=3D>'/var/virtual'], > > [Thermeon=3D>'/var/virtual/www.website1.com'], > > [Dancetraders=3D>'/var/virtual/www.website2.com']], > > data_dir=3D>'/u/virtual/HTML-Mason/data'); > > > > my $ah =3D new HTML::Mason::ApacheHandler ( > > interp=3D>$interp, > > debug_mode=3D>'error', > > debug_perl_binary=3D>'/usr/bin/perl', > > debug_handler_script=3D>'/etc/httpd/mason-handler.pl'= , > > debug_handler_proc=3D>'HTML::Mason::handler', > > ); > > > > chown ( 99, 99, $interp->files_written ); # chown nobody > > { > > package HTML::Mason::Commands; > > use HTML::Entities; > > } > > 1; > > > > sub handler > > { > > my ($r) =3D @_; > > return -1 if $r->content_type && $r->content_type =3D= ~ > > m|^image/|i; > > $ah->output_mode("batch"); > > $ah->handle_request($r); > > } > > ------------------------------------------- > > > > > > But now - with Mason 1.10 when I try to start httpd - Or just run >the > >mason-handler manually for errors. > > I get the error > > The Parser module is no longer a part of HTML::Mason. Please see > > the Lexer > >and Compiler modules, its replacements. > > > > Now - can I build these new modules into my existing > > mason-handler - ( so I > >can still declare the global variables, roots, etc ) > > Or will I have to use a different method. > > > > I guess Jonathon or Ken will answer this, and thanks for your time >in > >advance, as per usual - it's much appreciated!!! > > > > > > Kind Regards > > > > Gareth > > > > > > > > > >------------------------------------------------------- > >Sponsored by: > >ThinkGeek at http://www.ThinkGeek.com/ > >_______________________________________________ > >Mason-users mailing list > >Mas...@li... > >https://lists.sourceforge.net/lists/listinfo/mason-users > >urbia Gr=FC=DFe - best regards > >Tobias Kremer >IT Projektleitung / Webmaster > >urbia.com AG >Hohe Str.115, 50667 K=F6ln > >tel: +49 (0)221 - 2949 154 >fax: +49 (0)221 - 2949 599 >e-mail: tob...@ur... > >http://www.urbia.de - we are family > >"Linux is like a wigwam. No gates, no windows >but an apache inside" > > > >------------------------------------------------------- >Sponsored by: >ThinkGeek at http://www.ThinkGeek.com/ >_______________________________________________ >Mason-users mailing list >Mas...@li... >https://lists.sourceforge.net/lists/listinfo/mason-users > > > > >------------------------------------------------------- >Sponsored by: >ThinkGeek at http://www.ThinkGeek.com/ >_______________________________________________ >Mason-users mailing list >Mas...@li... >https://lists.sourceforge.net/lists/listinfo/mason-users urbia Gr=FC=DFe - best regards Tobias Kremer IT Projektleitung / Webmaster urbia.com AG Hohe Str.115, 50667 K=F6ln tel: +49 (0)221 - 2949 154 fax: +49 (0)221 - 2949 599 e-mail: tob...@ur... http://www.urbia.de - we are family "Linux is like a wigwam. No gates, no windows but an apache inside" |