I'm using a method outline by gregor (http://stackoverflow.com/questions/143320/create-cronjob-with-zend-framework) to create command line execution for parts of my application such as cron jobs, admin tasks, and the like. It works, however, no errors get reported when I create a new object that has not been defined (misspelling) and other such mistakes.
I would have thought that php would report an error, but it fails silently. What is the reason for this? Is there a better way to achieve my goal? Or how can I implement this so that I can see errors?
Many thanks!
Here is the code:
in public/index.php
if(!defined('RUN_APP') || RUN_APP == true)
{
$application->bootstrap()->run();
}
application/cron.php
define("RUN_APP",false);
require(realpath('/var/www/domain/public/index.php'));
$application->bootstrap();
//the rest