0
votes

I'm trying to install codeigniter bonfire. After clicking the install button on the create username screen, it takes a few moments and then it loads this page. I watched some tutorials on how to install bonfire so I know this isn't what I should be seeing. PHP error after installing

Regardless, I updated the RewriteBase to /bonfire/ as it says..and now I'm getting this error when I try to go to localhost/bonfire/index.php

Parse error: syntax error, unexpected 'yield' (T_YIELD), expecting identifier (T_STRING) in /opt/lampp/htdocs/bonfire/bonfire/application/libraries/template.php on line 305

Here's the code at line 305

public static function yield()
{
    $output = '';

    if (self::$debug) { echo 'Current View = '. self::$current_view; }

    self::load_view(self::$current_view, NULL, self::$ci->router->class .'/'. self::$ci->router->method, FALSE, $output);

    Events::trigger('after_page_render', $output);

    return $output;

}//end yield()

I found this link on bonfire forums explaining the error. Bonfire forums link

It says to use PHP 5.4 and that's what I'm using. My operating system is Linux Zorin and I'm using lampp, so I'm not sure if this could be a permissions issue. php version

thx in advance and please let me know if you need more info.

2

2 Answers

2
votes

a bit late but hopefully help.

You can change the name for static function yield in cibonfire, something like this:

public static function yield()

to:

public static function yield_content()

this works perfectly to me.

0
votes

I think in the LAMP the version of PHP is 5.5 + Something. IN PHP 5.5 there is a function name as yield so you have to downgrade your LAMP PHP version to 5.4 or modify in the Bonfire file system.

For change in Bonfire You can Go through this link and your problem has been solved.

https://github.com/illuminate/view/commit/d37abcecc7d79d00bf5f22b134d152ca765f26b2

You can also Review this link Laravel 4 syntax error out-of-the-box