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.
Written by Miguel Montes Porras
Related protips
Have a fresh tip? Share with Coderwall community!
Post
Post a tip
Best
#Php
Authors
Did you know?
PHP applications still send a browser full of JavaScript. Hardening the server does not inventory the payment, analytics, and plugin scripts that run after the HTML is delivered.
Security insights from Cside
Sponsored by #native_company# — Learn More
#native_title#
#native_desc#