Posted by tolland76 on February 9, 2010 at 6:36pm
Hi,
I had been using firePHP debugging in some of my install scripts and now I am using drush I am seeing some problems with headers like;
"Cannot send log data to FirePHP. You must have Output Buffering enabled via ob_start() or output_buffering ini directive."
so I want to wrap my debugging function to check that its the browser or drush, is there a good strategy to do that??
Thanks,
Tom
Comments
from drush.php:
from drush.php:
/*** Verify that we are running PHP through the command line interface.
*
* This function is useful for making sure that code cannot be run via the web server,
* such as a function that needs to write files to which the web server should not have
* access to.
*
* @return
* A boolean value that is true when PHP is being run through the command line,
* and false if being run through cgi or mod_php.
*/
function drush_verify_cli() {
return (php_sapi_name() == 'cli' || (is_numeric($_SERVER['argc']) && $_SERVER['argc'] > 0));
}