Yii Cron Command Retruning Http Headers

When I run a Yii command I created, when I run, if everything goes fine, I do not echo any output. No output means command executed successfully. But it still returns following two HTTP headers:

X-Powered-By: PHP/5.3.27

Content-type: text/html

Because of this I am getting emails with above two lines. How can I disable this? I don’t want to send output to /dev/null, in case of error I do echo some output, that should be echoed, so that I can get email.

In short: How do I disable HTTP Headers for Yii commands.

Try to switch off the expose_php and set the default_mimetype in the php.ini.

Thanks, it worked.