|
From: Shane M. <sh...@ap...> - 2004-06-17 14:51:28
|
I have had this problem for a couple of years, and been ignoring it.
Now it is really really biting me in the butt. I have a collection of
mason components that work via either CGI or mod_perl under Apache and
elsewhere. At installation time, the user can choose where to put this
tree. What I cannot figure out is what to set component root to.
What I had always assumed is that comp_root should be set to the path to
the top of the tree, since that is where the autohandler and all of the
top level components live. However, if that directory happens to be NOT
at the top of the apache Document_Root, it doesn't work. What I see is
something like this:
could not find component for initial path '/utshare/atm/error_report.mpl'
Stack:
[/usr/lib/perl5/site_perl/5.6.1/HTML/Mason/Request.pm:166]
[/usr/lib/perl5/site_perl/5.6.1/Class/Container.pm:194]
[/usr/lib/perl5/site_perl/5.6.1/Class/Container.pm:257]
[/usr/lib/perl5/site_perl/5.6.1/HTML/Mason/Interp.pm:213]
[/usr/lib/perl5/site_perl/5.6.1/HTML/Mason/Interp.pm:207]
[/usr/lib/perl5/site_perl/5.6.1/HTML/Mason/CGIHandler.pm:127]
[/usr/lib/perl5/site_perl/5.6.1/HTML/Mason/CGIHandler.pm:76]
[/home/httpd/html/utshare/atm/cgi_handler.pl:72]
That is with a Document_Root of /home/httpd/html/ and a component_root
of /home/httpd/html/utshare/atm/. My CGI handler has a block that looks
like this:
my $h = new HTML::Mason::CGIHandler(
comp_root=>$Framework::topDir,
allow_globals => [qw($userInfo $H)],
data_dir=>"$Framework::topDir/mason",
error_mode=>'fatal',
error_format => 'text');
eval { $h->handle_request } ;
Where Framework::topDir is set to the path mentioned above.
So - what am I missing here? Clearly the handle_request method that is
being called by the CGI script needs to turn the requested path into
something relative to the component root, but I don't see how that is
supposed to happen. Help?
--
Shane P. McCarron Phone: +1 763 786-8160 x120
Managing Director Fax: +1 763 786-8180
ApTest Minnesota Inet: sh...@ap...
|