Zend Framework command line see errors

Posted by sims on Stack Overflow See other posts from Stack Overflow or by sims
Published on 2010-03-19T02:57:09Z Indexed on 2010/03/19 3:01 UTC
Read the original article Hit count: 263

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

© Stack Overflow or respective owner

Related posts about zend-framework

Related posts about cli