thanks david, makes sense. unfortunately i got another problem when i want to run my CLI script on a linux mashine. not quite sure if it is a linux issue ( so my problem :) ) or an agavi bug.
an exception is thrown that app/cache is not writable by the web server. however owner and group are correct - i even set all the rights of that folder to 777. running in web-context there is no problem with the caching, only when i execute console.php via CLI. think its a linux issue? ------------------------------------- John Schmidt E-Mail: [email protected] Web: www.john-schmidt.de ------------------------------------- -----Original Message----- From: [email protected] [mailto:[email protected]] On Behalf Of David Zülke Sent: Sonntag, 8. Februar 2009 13:05 To: Agavi Users Mailing List Subject: Re: [Agavi-Users] Secure cronjob | Best practice John, obviously, a shell doesn't have different request methods like the web has with HTTP (GET => read, POST => write, and so on). That means that by default, it runs with request method "read", so you'd have to implement executeRead() (or simply execute(), to catch all request methods) in the Action. However, I wouldn't recommend that if your Action is modifying data or anything; instead, force a request method through routing.xml by setting the "method" attribute on the <route> to, for instance, "write". Hope that helps, - David On 08.02.2009, at 12:57, John Schmidt wrote: > hi veikko, > > thanks a lot for the answer. > > i checked out the sample app in the 1.0 branch. > i created a console.php and modified factories.xml, output_types.xml > and routing.xml accordingly. > when i call console.php via CLI the correct action is called and the > view declared with 'getDefaultViewName()' gives me some output via > 'executeText()'. > > i am wondering though how i can catch a console request in the action. > just like i can catch post variables with 'executeWrite()' i should be > able to catch a console request, no? > i read something about 'executeConsole()' but this doesnt do it. > > any idea what i can do to catch console requests in actions or what i > did wrong? > > cheers, > > john > > > > > -----Original Message----- > From: [email protected] > [mailto:[email protected] > ] > On Behalf Of Veikko Mäkinen > Sent: Sonntag, 8. Februar 2009 11:32 > To: Agavi Users Mailing List > Subject: Re: [Agavi-Users] Secure cronjob | Best practice > > John Schmidt wrote: >> >> i thought about executing an action via the console but it didnt find >> a lot of documentation in this matter. >> > > The sample application in SVN branches/1.0 has console features you > could check out. That would certainly be the best and cleanest > solution. > Executing the action with wget and hacking some security into this is > something I would not recommend. > > > -veikko > > -- > Veikko Mäkinen > [email protected] > 044 5910 413 > http://blog.veikko.fi > > > _______________________________________________ > users mailing list > [email protected] > http://lists.agavi.org/mailman/listinfo/users > > > _______________________________________________ > users mailing list > [email protected] > http://lists.agavi.org/mailman/listinfo/users > _______________________________________________ users mailing list [email protected] http://lists.agavi.org/mailman/listinfo/users
