From: Jonathan S. <sw...@po...> - 2002-05-30 22:29:14
|
Heh. Take the "<" out of the directory name in opendir(). > -----Original Message----- > From: sb...@ma... [mailto:sb...@ma...] > Sent: Thursday, May 30, 2002 2:54 PM > To: sw...@po...; mas...@li... > Subject: RE: RE: [Mason] Can a MASON Component modify > something outside > the COMPROOT? > > > > Jonathon, > > I have inserted the webpage (saved it as TEXT ) below that > comes up when I run the page that calls only one mason > component that does the flushing. > > Hopefully that helps you in helping me, > Thanks for all your help so far, > Scott > > ---[start of inline attachment]--- > *Mason error* > > *error in file: * > /web-site/sboss.net/mason/data/obj/COMPS/cache_flushing > ** > *line 20:* can not open cache directory : No such file or directory > > *context: * > *...* > *16:* my $Number; > *17:* my @List; > *18:* my $T; > *19:* my $C; > *20:* opendir (DH, "</web-site/sboss.net/mason/data/cache") > || die "can > not open cache directory : $!"; > *21:* foreach $T (grep { -f "/web-site/sboss.net/mason/data/cache/$_" > || -f "/web-site/sboss.net/mason/data/cache/locks/$_" } readdir (DH) ) > *22:* { > *23:* $Number++; > *24:* $C .= "$T<BR>"; > *...* > > *component stack: * /COMPS/cache_flushing > /admin/cache_flushing.html > /autohandler > *code stack: * > /web-site/sboss.net/mason/data/obj/COMPS/cache_flushing:20 > /usr/share/perl5/HTML/Mason/Request.pm:692 > /web-site/sboss.net/mason/data/obj/admin/cache_flushing.html:22 > /web-site/sboss.net/mason/data/obj/autohandler:72 > > > *debug info: * Debug file is > '/web-site/sboss.net/mason/data/debug/anon/3'. > * > raw_error <#raw_error> > > > raw error: * > > error while executing /COMPS/cache_flushing: > can not open cache directory : No such file or directory at > /web-site/sboss.net/mason/data/obj/COMPS/cache_flushing line 20. > HTML::Mason::Interp::__ANON__('can not open cache directory : > No such file or directory at /web...') called at > /web-site/sboss.net/mason/data/obj/COMPS/cache_flushing line 20 > HTML::Mason::Commands::__ANON__() called at > /usr/share/perl5/HTML/Mason/Component.pm line 131 > HTML::Mason::Component::run('HTML::Mason::Component::FileBased > =HASH(0x863f71c)') called at > /usr/share/perl5/HTML/Mason/Request.pm line 653 > eval {...} called at /usr/share/perl5/HTML/Mason/Request.pm line 653 > HTML::Mason::Request::comp('HTML::Mason::Request::ApacheHandle > r=HASH(0x8544cf4)', '/COMPS/cache_flushing') called at > /usr/share/perl5/HTML/Mason/Request.pm line 692 > HTML::Mason::Request::scomp('HTML::Mason::Request::ApacheHandl > er=HASH(0x8544cf4)', '/COMPS/cache_flushing') called at > /web-site/sboss.net/mason/data/obj/admin/cache_flushing.html line 22 > HTML::Mason::Commands::__ANON__() called at > /usr/share/perl5/HTML/Mason/Component.pm line 131 > HTML::Mason::Component::run('HTML::Mason::Component::FileBased > =HASH(0x8547860)') called at > /usr/share/perl5/HTML/Mason/Request.pm line 653 > eval {...} called at /usr/share/perl5/HTML/Mason/Request.pm line 653 > HTML::Mason::Request::comp('HTML::Mason::Request::ApacheHandle > r=HASH(0x8544cf4)', > 'HTML::Mason::Component::FileBased=HASH(0x8547860)') called > at /usr/share/perl5/HTML/Mason/Request.pm line 316 > HTML::Mason::Request::call_next('HTML::Mason::Request::ApacheH > andler=HASH(0x8544cf4)') called at > /web-site/sboss.net/mason/data/obj/autohandler line 72 > HTML::Mason::Commands::__ANON__() called at > /usr/share/perl5/HTML/Mason/Component.pm line 131 > HTML::Mason::Component::run('HTML::Mason::Component::FileBased > =HASH(0x861a564)') called at > /usr/share/perl5/HTML/Mason/Request.pm line 653 > eval {...} called at /usr/share/perl5/HTML/Mason/Request.pm line 653 > HTML::Mason::Request::comp('HTML::Mason::Request::ApacheHandle > r=HASH(0x8544cf4)', 'HASH(0x85458a0)', > 'HTML::Mason::Component::FileBased=HASH(0x861a564)') called > at /usr/share/perl5/HTML/Mason/Request.pm line 159 > eval {...} called at /usr/share/perl5/HTML/Mason/Request.pm line 159 > HTML::Mason::Request::exec('HTML::Mason::Request::ApacheHandle > r=HASH(0x8544cf4)', '/admin/cache_flushing.html') called at > /usr/share/perl5/HTML/Mason/ApacheHandler.pm line 914 > HTML::Mason::ApacheHandler::handle_request_1('HTML::Mason::Apa > cheHandler=HASH(0x834a6a8)', 'Apache=SCALAR(0x83e1148)', > 'HTML::Mason::Request::ApacheHandler=HASH(0x8544cf4)', > 'HASH(0x8544d30)') called at > /usr/share/perl5/HTML/Mason/ApacheHandler.pm line 560 > eval {...} called at > /usr/share/perl5/HTML/Mason/ApacheHandler.pm line 560 > HTML::Mason::ApacheHandler::handle_request('HTML::Mason::Apach > eHandler=HASH(0x834a6a8)', 'Apache=SCALAR(0x83e1148)') called > at /usr/share/perl5/HTML/Mason/ApacheHandler.pm line 1019 > HTML::Mason::ApacheHandler::handler('Apache=SCALAR(0x83e1148)' > ) called at /dev/null line 0 > eval {...} called at /dev/null line 0 > ---[end of inline attachment]--- > > Original Message: > ----------------- > From: Jonathan Swartz sw...@po... > Date: Mon, 27 May 2002 08:59:10 -0700 > To: sc...@ku..., mas...@li... > Subject: RE: [Mason] Can a MASON Component modify something > outside the COMPROOT? > > > What does $! contain when opendir fails? > > > -----Original Message----- > > From: mas...@li... > > [mailto:mas...@li...]On Behalf Of > > sb...@ma... > > Sent: Friday, May 24, 2002 7:55 AM > > To: mas...@li... > > Subject: [Mason] Can a MASON Component modify something outside the > > COMPROOT? > > > > > > Hello All, > > > > I am designing a new website using HTML Mason. Yeah! Well I > > need a button (link) to a program that will flush the cache > > of the webpages (or actually componenets/sections of > > webpages). This button would be only in the "admin" section > > of the site and will only flush (err remove) the > > .../mason/data/cache/* & .../mason/data/cache/locks/* files. > > Myself and the other Webmasters of the system will always > > have access to the site via a browser (Mozilla mostly) but > > rarely will have shell access (ssh) to the system due to the > > FW blocks at the work sites. I have some code that I have > > written that goes to that directory(ies) and wipes the > > file(s) out. I have tested it several times and works like a > > charm. But when I plug that code into a MASON Component, it > > barfs when it tries to open .../mason/data/cache directory > > (using opendir). I am guessing that MASON will not allow it > > enter that directory since it is outside the COMPROOT > > (.../www.domain.name ). And and all advice is greatly appreciated. > > > > Thanks > > Scott > > > > > > -------------------------------------------------------------------- > > mail2web - Check your email from the web at > > http://mail2web.com/ . > > > > > > _______________________________________________________________ > > > > Don't miss the 2002 Sprint PCS Application Developer's Conference > > August 25-28 in Las Vegas -- http://devcon.sprintpcs.com/adp/index.cfm > > _______________________________________________ > Mason-users mailing list > Mas...@li... > https://lists.sourceforge.net/lists/listinfo/mason-users > -------------------------------------------------------------------- mail2web - Check your email from the web at http://mail2web.com/ . |