PHP Fatal error: Cannot redeclare go()

In trying to deploy a fresh starterkit install to a server, I’m running into the problem:

‘PHP message: PHP Fatal error: Cannot redeclare go() in /[redacted]/kirby/config/helpers.php on line 222’

The starterkit is the latest release, with Kirby 3.5.6 and PHP 7.4.20.

@texnixe as a quick sidenote, is it preferable if I write these things in the forum or should they be on the github issue tracker? I’m not sure it’s a bug or a misconfiguration.

That message means that when Kirby tries to load the helpers, the go() function is already defined in another place. Are you loading any other libraries?

1 Like

Thank you, I am on runcloud and their PHP setup defined go() through swoole. I asked them to deactivate it and it works now.

1 Like

Hello @texnixe, do you know if there is a way to make Kirby work with swoole? I need to setup a server through Forge and they use swoole. Even if I uninstall it it will be reinstalled when updating PHP. Any help would be much appreciated! :slight_smile:

You should be able to disable the go helper in your index.php:

define('KIRBY_HELPER_GO, false);

Awesome, thanks @texnixe. You should probably update your docs :slight_smile: Installation issues | Kirby CMS

Updated.

1 Like

Well that was quick :rocket:

Obvious but just in case someone comes across this it just needs the closing ’ after KIRBY_HELPER_GO:

define('KIRBY_HELPER_GO', false);