Hello everyone,

I know this subject has been touched upon several times here, but I'm
afraid I'm still looking for some guidance and would appreciate some
help. Like others, I'm trying to call a controller from the command
line. As suggested by some (e.g.
http://bakery.cakephp.org/articles/view/calling-controller-actions-from-cron-and-the-command-line),
I have copied app/webroot/index.php and placed a modified version into
app (app/mailhandler.php in my case). Unlike others, I don't want to
use Dispatcher (e.g. <pre>$Dispatcher->dispatch($argv[1]);</pre>) to
call the controller, since I can't (to my knowledge) pass any data to
the controller. Another approach, where you just declare the
controller object in question and call the relevant method (http://
groups.google.com/group/cake-php/browse_thread/thread/
389f2b7a0ca4d72b), looks somewhat promising but I can't get it to
work, as I get segfaults when including app_controller:
<pre>require_once(ROOT.DS.'cake' . DS .'app_controller.php');</pre>

I'm passing a bunch of information to the script and I want the data
to be handed off to the desired controller (it's raw MIME messages
passed from the mailserver, to be exact). The hope is that the
controller method would be something like <pre>function
parse($raw_message)</pre> and when called would be operating in an
environment exactly the same as if called from the normal, web
interface.

Thanks in advance for your help,
Peter Robinett

PS I'm using a slightly old (as in, approximately a month) version of
the 1.2 beta.

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Cake 
PHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to