From: Doug H. <dh...@uc...> - 2001-05-21 23:05:42
|
Hi: I have been happily using Mason for a while now, but recently I had to change my comp_root to '/' (I've started using mason to run some other sites on my web server, and there are files all over my file system that need to be served). I would always get this error message when serving all files: -------------------------------------------------------------------------- System error while serving trillian.cosmic.ucar.edu /DBif/tableselect.mason exec: first argument (home/httpd/html/DBif/tableselect.mason) must be an absolute component path or a component object at /usr/local/lib/perl5/site_perl/5.6.0/HTML/Mason/Request.pm line 124, <GEN0> line 2. --------------------------------------------------------------------------- I tracked this down to the file: /usr/local/lib/perl5/site_perl/5.6.0/HTML/Mason/Resolver/File.pm In order to get this to work for me, I had to put in a simple fix. Here is the patch: *** File.pm Mon May 21 17:03:33 2001 --- File.pm.old Sat Aug 19 01:56:08 2000 *************** *** 92,100 **** foreach my $root (@roots) { if (paths_eq($root,substr($file,0,length($root)))) { my $path = substr($file,length($root)); - $path = '/' . $path if ($root eq '/'); # added 5/14/2001 - # D. Hunt when comp_root - # changed to '/' $path =~ s/\/$// unless $path eq '/'; return $path; } --- 92,97 ---- Has anyone had this problem before? Is there a nicer way around this? Please respond to me directly, as I am not subscribed to this list. Many thanks, Doug Hunt -- dh...@uc... Software Engineer III UCAR - COSMIC Tel. (303) 497-2611 |