Yii Redirect Gives Blank Page

In one of my modules redirect gives blank page .

its working in local and in one server, but not working in one of my servers!

What may be the issue?


its working in all other modules.

but not working in yii mailbox module.

is there any issue with mailbox module?

Solved redirect blank page issue

Got the solution from yii forum

You can remove the UTF-8 BOM from the output using the ob_start function. This way you can leave the UTF-8 BOM in your source files so your editor understands it is really UTF-8.

In the /protected/config/main.php you have to add before returning the config array:


function My_OB($str, $flags)


    //remove UTF-8 BOM

    $str = preg_replace("/\xef\xbb\xbf/","",$str);


    return $str;


return array( ... yii config array ...);

P.S. You don’t have to call ob_end_flush(), php will do this automatically at the end of the script.

I was experiencing a similar problem and this solution solved the issue. Thank you so much.