Yii Framework Forum: send header problem - Yii Framework Forum

Jump to content

Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

send header problem Rate Topic: -----

#1 User is offline   za_al 

  • Junior Member
  • Pip
  • Yii
  • Group: Members
  • Posts: 41
  • Joined: 06-March 12

Posted 14 July 2012 - 03:16 AM

I have problem with send header error:

Quote

Warning: Cannot modify header information - headers already sent by (output started at ......


My problem was solved by adding the following code to the config/main.php


ob_start('My_OB');
function My_OB($str, $flags)
{
    //remove UTF-8 BOM
    $str = preg_replace("/\xef\xbb\xbf/","",$str);

    return $str;
}


But I'm faced with a new problem: when using Yiic shell. Problem if the command was executed but was not shown. But Yiic shell worked well by commented this code.
0

#2 User is offline   rudenich 

  • Junior Member
  • Pip
  • Yii
  • Group: Members
  • Posts: 65
  • Joined: 30-April 10
  • Location:Ukraine-Kramatorsk

Posted 14 July 2012 - 05:57 PM

you must save you sourse files in utf-8 without BOM
You can simply change encoding in notepad++
Posted Image
0

#3 User is offline   za_al 

  • Junior Member
  • Pip
  • Yii
  • Group: Members
  • Posts: 41
  • Joined: 06-March 12

Posted 16 July 2012 - 04:24 AM

 rudenich, on 14 July 2012 - 05:57 PM, said:

you must save you sourse files in utf-8 without BOM
You can simply change encoding in notepad++
Posted Image



Thank you for your answer. You NetBeans there is also an option? :huh:
0

Share this topic:


Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users