I have a cron job batch process that I wrote some time back that always
work. I recently went back to test this bit of code before launching
the app only to find it's completely broken.

I had a simple batch CLI app that ran some module actions but now as
soon as I try to run the batch I get...


C:\web\xampp\htdocs\aes>php batch/cron.php

[exception]   sfException

[message]     Call to undefined method sfRequest::getMethodName




For some reason sfConsoleRequest is try to use sfWebResponse to
initialize and looking for a method named   sfRequest::getMethodName
which doesn't exist in the sfConsoleRequest, only in sfWebRequest.

Here's my batch file.

<?php
ini_set('max_execution_time', 600);

define('SF_ROOT_DIR',    realpath(dirname(__FILE__).'/..'));
define('SF_APP',         'cli');
define('SF_ENVIRONMENT', 'cli');
define('SF_DEBUG',       false);

require_once(SF_ROOT_DIR.DIRECTORY_SEPARATOR.'apps'.DIRECTORY_SEPARATOR.SF_APP.DIRECTORY_SEPARATOR.'config'.DIRECTORY_SEPARATOR.'config.php');

// initialize database manager
$databaseManager = new sfDatabaseManager();
$databaseManager->initialize();

sfConfig::set('sf_max_forwards', 10);
$context    = sfContext::getInstance();
$controller = $context->getController();

try
{
 $controller->forward('cron', 'index',
array('controller'=>$controller) );
}
catch (Exception $e)
{
 ErrorLog::logError($e,
$context->getRequest()->getParameterHolder()->getAll());
}

?>


Even cutting this batch file back to just the require_once line gives
the error. My factories for the app are set to

cli:
 controller:
   class: sfConsoleController
 request:
   class: sfConsoleRequest


Anyone have a clue what has changed that would have broken command line
batch processing?


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

Reply via email to