f Kirby CMS Debugger
Kirby \ Exception \ LogicException (error.logic)
Disallowed output from file /var/www/html/site/config/config.canri.forsit.tech.php:1, possible accidental whitespace? Kirby\Exception\LogicException thrown with message "Disallowed output from file /var/www/html/site/config/config.canri.forsit.tech.php:1, possible accidental whitespace?" Stacktrace: #5 Kirby\Exception\LogicException in /var/www/html/kirby/src/Http/Response.php:219 #4 Kirby\Http\Response:guardAgainstOutput in /var/www/html/kirby/src/Filesystem/F.php:370 #3 Kirby\Filesystem\F:load in /var/www/html/kirby/src/Http/Environment.php:789 #2 Kirby\Http\Environment:options in /var/www/html/kirby/src/Cms/App.php:1098 #1 Kirby\Cms\App:optionsFromEnvironment in /var/www/html/kirby/src/Cms/App.php:104 #0 Kirby\Cms\App:__construct in /var/www/html/index.php:5
Stack frames (6)
5
Kirby\Exception\LogicException
/kirby/src/Http/Response.php219
4
Kirby\Http\Response guardAgainstOutput
/kirby/src/Filesystem/F.php370
3
Kirby\Filesystem\F load
/kirby/src/Http/Environment.php789
2
Kirby\Http\Environment options
/kirby/src/Cms/App.php1098
1
Kirby\Cms\App optionsFromEnvironment
/kirby/src/Cms/App.php104
0
Kirby\Cms\App __construct
/index.php5
/var/www/html/kirby/src/Http/Response.php
     * @codeCoverageIgnore
     * @todo Change return type to `never` once support for PHP 8.0 is dropped
     */
    public static function go(string $url = '/', int $code = 302): void
    {
        die(static::redirect($url, $code));
    }
 
    /**
     * Ensures that the callback does not produce the first body output
     * (used to show when loading a file creates side effects)
     */
    public static function guardAgainstOutput(Closure $callback, ...$args): mixed
    {
        $before = headers_sent();
        $result = $callback(...$args);
        $after  = headers_sent($file, $line);
 
        if ($before === false && $after === true) {
            throw new LogicException("Disallowed output from file $file:$line, possible accidental whitespace?");
        }
 
        return $result;
    }
 
    /**
     * Getter for single headers
     *
     * @param string $key Name of the header
     */
    public function header(string $key): string|null
    {
        return $this->headers[$key] ?? null;
    }
 
    /**
     * Getter for all headers
     */
    public function headers(): array
    {
/var/www/html/kirby/src/Filesystem/F.php
    public static function load(
        string $file,
        mixed $fallback = null,
        array $data = [],
        bool $allowOutput = true
    ) {
        if (is_file($file) === false) {
            return $fallback;
        }
 
        // we use the loadIsolated() method here to prevent the included
        // file from overwriting our $fallback in this variable scope; see
        // https://www.php.net/manual/en/function.include.php#example-124
        $callback = fn () => static::loadIsolated($file, $data);
 
        // if the loaded file should not produce any output,
        // call the loaidIsolated method from the Response class
        // which checks for unintended ouput and throws an error if detected
        if ($allowOutput === false) {
            $result = Response::guardAgainstOutput($callback);
        } else {
            $result = $callback();
        }
 
        if (
            $fallback !== null &&
            gettype($result) !== gettype($fallback)
        ) {
            return $fallback;
        }
 
        return $result;
    }
 
    /**
     * A super simple class autoloader
     * @since 3.7.0
     */
    public static function loadClasses(
        array $classmap,
/var/www/html/kirby/src/Http/Environment.php
        return true;
    }
 
    /**
     * Loads and returns options from environment-specific
     * PHP files (by host name and server IP address)
     *
     * @param string $root Root directory to load configs from
     */
    public function options(string $root): array
    {
        $configHost = [];
        $configAddr = [];
 
        $host = $this->host();
        $addr = $this->ip();
 
        // load the config for the host
        if (empty($host) === false) {
            $configHost = F::load(
                file: $root . '/config.' . $host . '.php',
                fallback: [],
                allowOutput: false
            );
        }
 
        // load the config for the server IP
        if (empty($addr) === false) {
            $configAddr = F::load(
                file: $root . '/config.' . $addr . '.php',
                fallback: [],
                allowOutput: false
            );
        }
 
        return array_replace_recursive($configHost, $configAddr);
    }
 
    /**
     * Returns the detected path
/var/www/html/kirby/src/Cms/App.php
    protected function optionsFromEnvironment(array $props = []): array
    {
        $root = $this->root('config');
 
        // first load `config/env.php` to access its `url` option
        $envOptions = F::load($root . '/env.php', [], allowOutput: false);
 
        // use the option from the main `config.php`,
        // but allow the `env.php` to override it
        $globalUrl = $envOptions['url'] ?? $this->options['url'] ?? null;
 
        // create the URL setup based on hostname and server IP address
        $this->environment = new Environment([
            'allowed' => $globalUrl,
            'cli'     => $props['cli'] ?? null,
        ], $props['server'] ?? null);
 
        // merge into one clean options array;
        // the `env.php` options always override everything else
        $hostAddrOptions = $this->environment()->options($root);
        $this->options = array_replace_recursive($this->options, $hostAddrOptions, $envOptions);
 
        // reload the environment if the host/address config has overridden
        // the `url` option; this ensures that the base URL is correct
        $envUrl = $this->options['url'] ?? null;
        if ($envUrl !== $globalUrl) {
            $this->environment->detect([
                'allowed' => $envUrl,
                'cli'     => $props['cli'] ?? null
            ], $props['server'] ?? null);
        }
 
        return $this->options;
    }
 
    /**
     * Inject options from Kirby instance props
     *
     * @param array $options
     * @return array
/var/www/html/kirby/src/Cms/App.php
    protected $visitor;
 
    /**
     * Creates a new App instance
     *
     * @param array $props
     * @param bool $setInstance If false, the instance won't be set globally
     */
    public function __construct(array $props = [], bool $setInstance = true)
    {
        $this->core = new Core($this);
 
        // register all roots to be able to load stuff afterwards
        $this->bakeRoots($props['roots'] ?? []);
 
        try {
            // stuff from config and additional options
            $this->optionsFromConfig();
            $this->optionsFromProps($props['options'] ?? []);
            $this->optionsFromEnvironment($props);
        } finally {
            // register the Whoops error handler inside of a
            // try-finally block to ensure it's still registered
            // even if there is a problem loading the configurations
            $this->handleErrors();
        }
 
        // a custom request setup must come before defining the path
        $this->setRequest($props['request'] ?? null);
 
        // set the path to make it available for the url bakery
        $this->setPath($props['path'] ?? null);
 
        // create all urls after the config, so possible
        // options can be taken into account
        $this->bakeUrls($props['urls'] ?? []);
 
        // configurable properties
        $this->setOptionalProperties($props, [
            'languages',
/var/www/html/index.php
<?php
 
require __DIR__ . '/kirby/bootstrap.php';
 
echo (new Kirby)->render();
 

Environment & details:

empty
empty
empty
empty
empty
Key Value
REDIRECT_HTTP_AUTHORIZATION
REDIRECT_STATUS 200
HTTP_AUTHORIZATION
HTTP_HOST canri.forsit.tech
HTTP_USER_AGENT CCBot/2.0 (https://commoncrawl.org/faq/)
HTTP_ACCEPT text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
HTTP_ACCEPT_ENCODING br,gzip
HTTP_ACCEPT_LANGUAGE en-US,en;q=0.5
HTTP_IF_MODIFIED_SINCE Thu, 03 Oct 2024 11:38:17 GMT
HTTP_X_FORWARDED_FOR 18.97.14.89
HTTP_X_FORWARDED_HOST canri.forsit.tech
HTTP_X_FORWARDED_PORT 443
HTTP_X_FORWARDED_PROTO https
HTTP_X_FORWARDED_SERVER 871541565fff
HTTP_X_REAL_IP 18.97.14.89
PATH /usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
SERVER_SIGNATURE <address>Apache/2.4.57 (Debian) Server at canri.forsit.tech Port 80</address>
SERVER_SOFTWARE Apache/2.4.57 (Debian)
SERVER_NAME canri.forsit.tech
SERVER_ADDR 172.27.0.4
SERVER_PORT 80
REMOTE_ADDR 172.27.0.24
DOCUMENT_ROOT /var/www/html
REQUEST_SCHEME http
CONTEXT_PREFIX
CONTEXT_DOCUMENT_ROOT /var/www/html
SERVER_ADMIN [no address given]
SCRIPT_FILENAME /var/www/html/index.php
REMOTE_PORT 56102
REDIRECT_URL /de/demo-anfordern
GATEWAY_INTERFACE CGI/1.1
SERVER_PROTOCOL HTTP/1.1
REQUEST_METHOD GET
QUERY_STRING
REQUEST_URI /de/demo-anfordern
SCRIPT_NAME /index.php
PHP_SELF /index.php
REQUEST_TIME_FLOAT 1739827714.0414
REQUEST_TIME 1739827714
argv Array ( )
argc 0
Key Value
HOSTNAME bfcc72e8072a
PHP_VERSION 8.2.12
APACHE_CONFDIR /etc/apache2
PHP_INI_DIR /usr/local/etc/php
GPG_KEYS 39B641343D8C104B2B146DC3F9C39DC0B9698544 E60913E4DF209907D8E30D96659A97C9CF2A795A 1198C0117593497A5EC5C199286AF1F9897469DC
PHP_LDFLAGS -Wl,-O1 -pie
PWD /var/www/html
TZ Europe/Berlin
APACHE_LOG_DIR /var/log/apache2
LANG C
PHP_SHA256 e1526e400bce9f9f9f774603cfac6b72b5e8f89fa66971ebc3cc4e5964083132
APACHE_PID_FILE /var/run/apache2/apache2.pid
PHPIZE_DEPS autoconf dpkg-dev file g++ gcc libc-dev make pkg-config re2c
PHP_URL https://www.php.net/distributions/php-8.2.12.tar.xz
APACHE_RUN_GROUP www-data
APACHE_LOCK_DIR /var/lock/apache2
SHLVL 0
PHP_CFLAGS -fstack-protector-strong -fpic -fpie -O2 -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64
APACHE_RUN_DIR /var/run/apache2
APACHE_ENVVARS /etc/apache2/envvars
APACHE_RUN_USER www-data
PATH /usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
PHP_ASC_URL https://www.php.net/distributions/php-8.2.12.tar.xz.asc
PHP_CPPFLAGS -fstack-protector-strong -fpic -fpie -O2 -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64
0. Whoops\Handler\PrettyPageHandler
1. Whoops\Handler\CallbackHandler