Error 500: Nothing Works (Runcloud)

So, I’m trying to get Kirby to work on a staging domain.

I’m using Runcloud, an NGINX/Apache hybrid setup that works with .htacess files.

I’ve put index.php with the following setup:


include __DIR__ . '/../vendor/autoload.php';

$kirby = new Kirby([
    'roots' => [
        'index'    => __DIR__,
        'base'     => $base    = dirname(__DIR__),
        'content'  => $base . '/content',
        'site'     => $base . '/site',
        'storage'  => $storage = $base . '/storage',
        'accounts' => $storage . '/accounts',
        'cache'    => $storage . '/cache',
        'sessions' => $storage . '/sessions',
    ]
]);

echo $kirby->render();

If, I use phpinfo() before the Kirby code, I get the report, if after… all blank.

Absolutely nothing works anywhere, not the frontend, not the panel. Bupkis.

If you have any idea why this might be happening, I would greatly appreciate your help.

Cheers.

Have you checked the server error logs and php error logs on the server? If display_errors is off in your php.ini (as it should be on a public server), then no errors will be shown.


And have you tried to get a standard installation running (i.e. non-public-folder setup) first?

I tried both…

After checking the Apache error log, I got this: AH01071: Got error 'PHP message: PHP Fatal error: Cannot redeclare go() in /home/runcloud/webapps/app/kirby/config/helpers.php on line 188.

Runcloud, apparently, has an instance already running.

The Fix

Turn of the helper: define('KIRBY_HELPER_GO', false);.

So, here’s the code now in my index.php:

define('KIRBY_HELPER_GO', false);

include __DIR__ . '/../vendor/autoload.php';

$kirby = new Kirby([
    'roots' => [
        'index'    => __DIR__,
        'base'     => $base    = dirname(__DIR__),
        'content'  => $base . '/content',
        'site'     => $base . '/site',
        'storage'  => $storage = $base . '/storage',
        'accounts' => $storage . '/accounts',
        'cache'    => $storage . '/cache',
        'sessions' => $storage . '/sessions',
    ]
]);

echo $kirby->render();

See the reference here: Helpers | Kirby CMS

Hopefully, this helps someone.