Welcome Guest, Not a member yet? Register   Sign In
getting error while following user guide
#1

[eluser]Unknown[/eluser]
Hello!
I've just started with CI.
I've tried to make a first step with the User Guide and.. I'm getting this error

Quote:Hello world!
Fatal error: ob_start() [<a href='ref.outcontrol'>ref.outcontrol</a>]: Cannot use output buffering in output buffering display handlers in ~PATH_TO_CODEIGNITER_ROOT~\libraries\Exceptions.php on line 160

while creating first controller [named blog.php]

adding the constructor doesn't change anything
nor this:
Code:
function Blog()
{
  parent::Controller();
}

neither that one:
Code:
function __construct()
{
  parent::Controller();
}

what's happening?
#2

[eluser]Michael Wales[/eluser]
I don't think it's anything to worry about, because you are outputting content from the Controller. Once you get to the area detailing Views and you start passing your data to the view to be pushed to the user, this error should go away.

If it still comes up - definitely let us know.
#3

[eluser]Unknown[/eluser]
OK! Thanks. This calmed me a bit.
I now know, I can just work forward. Smile
But.. if it's "normal" error while working without views, shouldn't it be noticed in User Guide to avoid others to worry like I did? :-)
#4

[eluser]xwero[/eluser]
You can work without views if you only want to display database values, i use it for some ajax calls
Code:
class Test extends Controller
{
  function Test()
  {
    parent::Controller();
  }

  function index()
  {
    echo 'test';
  }
  // all other functions
}
When you browse to index.php/Test you will get a page with the word test.
The index function is the default function for outputting and not the same name function or the __construct function.




Theme © iAndrew 2016 - Forum software by © MyBB