Last Updated: February 25, 2016
· mimopoweb
Voyyrypuiahk928v4g3u normal

Symfony 1.4 - Disable Doctrine profiler on cli environment

Just leave databases.yml without specify the profiler option and add the following code to the ProjectConfiguration class.

if (0 == strncasecmp(PHP_SAPI, 'cli', 3) || sfConfig::get('sf_environment') == 'cli'){
    sfConfig::set('sf_debug', false);

Now you will be able to run command line tasks with database intensive actions without worrying about PHP out of memory errors.

Say Thanks