Pecee \ SimpleRouter \ Exceptions \ NotFoundHttpException (404)
Class "library\views\Patreon" does not exist Pecee\SimpleRouter\Exceptions\NotFoundHttpException thrown with message "Class "library\views\Patreon" does not exist" Stacktrace: #5 Pecee\SimpleRouter\Exceptions\NotFoundHttpException in /var/www/aikonia/html/vendor/pecee/simple-router/src/Pecee/SimpleRouter/ClassLoader/ClassLoader.php:31 #4 Pecee\SimpleRouter\ClassLoader\ClassLoader:loadClass in /var/www/aikonia/html/vendor/pecee/simple-router/src/Pecee/SimpleRouter/Route/Route.php:114 #3 Pecee\SimpleRouter\Route\Route:renderRoute in /var/www/aikonia/html/vendor/pecee/simple-router/src/Pecee/SimpleRouter/Router.php:389 #2 Pecee\SimpleRouter\Router:routeRequest in /var/www/aikonia/html/vendor/pecee/simple-router/src/Pecee/SimpleRouter/Router.php:322 #1 Pecee\SimpleRouter\Router:start in /var/www/aikonia/html/vendor/pecee/simple-router/src/Pecee/SimpleRouter/SimpleRouter.php:63 #0 Pecee\SimpleRouter\SimpleRouter:start in /var/www/aikonia/html/index.php:104
Stack frames (6)
5
Pecee\SimpleRouter\Exceptions\NotFoundHttpException
/vendor/pecee/simple-router/src/Pecee/SimpleRouter/ClassLoader/ClassLoader.php31
4
Pecee\SimpleRouter\ClassLoader\ClassLoader loadClass
/vendor/pecee/simple-router/src/Pecee/SimpleRouter/Route/Route.php114
3
Pecee\SimpleRouter\Route\Route renderRoute
/vendor/pecee/simple-router/src/Pecee/SimpleRouter/Router.php389
2
Pecee\SimpleRouter\Router routeRequest
/vendor/pecee/simple-router/src/Pecee/SimpleRouter/Router.php322
1
Pecee\SimpleRouter\Router start
/vendor/pecee/simple-router/src/Pecee/SimpleRouter/SimpleRouter.php63
0
Pecee\SimpleRouter\SimpleRouter start
/index.php104
/var/www/aikonia/html/vendor/pecee/simple-router/src/Pecee/SimpleRouter/ClassLoader/ClassLoader.php
     * @var bool
     */
    protected $useDependencyInjection = false;
 
    /**
     * @var Container|null
     */
    protected $container;
 
    /**
     * Load class
     *
     * @param string $class
     * @return mixed
     * @throws NotFoundHttpException
     */
    public function loadClass(string $class)
    {
        if (class_exists($class) === false) {
            throw new NotFoundHttpException(sprintf('Class "%s" does not exist', $class), 404);
        }
 
        if ($this->useDependencyInjection === true) {
            $container = $this->getContainer();
            if ($container !== null) {
                try {
                    return $container->get($class);
                } catch (\Exception $e) {
                    throw new NotFoundHttpException($e->getMessage(), (int)$e->getCode(), $e->getPrevious());
                }
            }
        }
 
        return new $class();
    }
 
    /**
     * Load closure
     *
     * @param \Closure $closure
/var/www/aikonia/html/vendor/pecee/simple-router/src/Pecee/SimpleRouter/Route/Route.php
        }
 
        /* Render callback function */
        if (\is_callable($callback) === true) {
            $router->debug('Executing callback');
 
            /* When the callback is a function */
 
            return $router->getClassLoader()->loadClosure($callback, $parameters);
        }
 
        /* When the callback is a class + method */
        $controller = explode('@', $callback);
 
        $namespace = $this->getNamespace();
 
        $className = ($namespace !== null && $controller[0][0] !== '\\') ? $namespace . '\\' . $controller[0] : $controller[0];
 
        $router->debug('Loading class %s', $className);
        $class = $router->getClassLoader()->loadClass($className);
 
        if (\count($controller) === 1) {
            $controller[1] = '__invoke';
        }
 
        $method = $controller[1];
 
        if (method_exists($class, $method) === false) {
            throw new NotFoundHttpException(sprintf('Method "%s" does not exist in class "%s"', $method, $className), 404);
        }
 
        $router->debug('Executing callback');
 
        return \call_user_func_array([$class, $method], array_values($parameters));
    }
 
    protected function parseParameters($route, $url, $parameterRegex = null)
    {
        $regex = (strpos($route, $this->paramModifiers[0]) === false) ? null :
            sprintf(
/var/www/aikonia/html/vendor/pecee/simple-router/src/Pecee/SimpleRouter/Router.php
 
                    $route->loadMiddleware($this->request, $this);
                    $route->addGetParametersModelToParameters($this->request);
                    $route->addFilesToParameters($this->request);
                    $route->addPostBodyToParameters($this->request);
 
                    $output = $this->handleRouteRewrite($key, $url);
                    if ($output !== null) {
                        return $output;
                    }
 
                    $methodNotAllowed = false;
 
                    $this->request->addLoadedRoute($route);
 
                    $this->fireEvents(EventHandler::EVENT_RENDER_ROUTE, [
                        'route' => $route,
                    ]);
 
                    $output = $route->renderRoute($this->request, $this);
                    if ($output !== null) {
                        return $output;
                    }
 
                    $output = $this->handleRouteRewrite($key, $url);
                    if ($output !== null) {
                        return $output;
                    }
                }
            }
        } catch (\Exception $e) {
            $this->handleException($e);
        }
 
        if ($methodNotAllowed === true) {
            $message = sprintf('Route "%s" or method "%s" not allowed.', $this->request->getUrl()->getPath(), $this->request->getMethod());
            $this->handleException(new NotFoundHttpException($message, 403));
        }
 
        if (\count($this->request->getLoadedRoutes()) === 0) {
/var/www/aikonia/html/vendor/pecee/simple-router/src/Pecee/SimpleRouter/Router.php
     * @throws \Exception
     */
    public function start(): ?string
    {
        $this->debug('Router starting');
 
        $this->fireEvents(EventHandler::EVENT_INIT);
 
        $this->loadRoutes();
 
        if ($this->csrfVerifier !== null) {
            $this->fireEvents(EventHandler::EVENT_RENDER_CSRF, [
                'csrfVerifier' => $this->csrfVerifier,
            ]);
 
            /* Verify csrf token for request */
            $this->csrfVerifier->handle($this->request);
        }
 
        $output = $this->routeRequest();
 
        $this->fireEvents(EventHandler::EVENT_LOAD, [
            'loadedRoutes' => $this->getRequest()->getLoadedRoutes(),
        ]);
 
        $this->debug('Routing complete');
 
        return $output;
    }
 
    /**
     * Routes the request
     *
     * @return string|null
     * @throws HttpException
     * @throws \Exception
     */
    public function routeRequest(): ?string
    {
        $this->debug('Routing request');
/var/www/aikonia/html/vendor/pecee/simple-router/src/Pecee/SimpleRouter/SimpleRouter.php
     */
    protected static $response;
 
    /**
     * Router instance
     * @var Router
     */
    protected static $router;
 
    /**
     * Start routing
     *
     * @throws \Pecee\SimpleRouter\Exceptions\NotFoundHttpException
     * @throws \Pecee\Http\Middleware\Exceptions\TokenMismatchException
     * @throws HttpException
     * @throws \Exception
     */
    public static function start(): void
    {
        echo static::router()->start();
    }
 
    /**
     * Start the routing an return array with debugging-information
     *
     * @return array
     */
    public static function startDebug(): array
    {
        $routerOutput = null;
 
        try {
            ob_start();
            static::router()->setDebugEnabled(true)->start();
            $routerOutput = ob_get_contents();
            ob_end_clean();
        } catch (\Exception $e) {
        }
 
        // Try to parse library version
/var/www/aikonia/html/index.php
        // ABOUT
        SimpleRouter::get('/about', 'About@index')->setName('about');
        SimpleRouter::get('/cast', 'About@index')->setName('about');
        
        // LINKS
        SimpleRouter::get('/links', 'Links@index')->setName('links');
    });
 
    // API
    SimpleRouter::group(['prefix' => '/api', 'namespace' => 'library\controllers'], function()
    {
        // PAGE
        SimpleRouter::post('/buffer/post', 'Page@post')->setName('postbuffer');
        SimpleRouter::post('/page/images', 'Page@getImages')->setName('getimages');
        
        // COMMENT
        SimpleRouter::post('/comment/post', 'Comment@post')->setName('postcomment');
    });
    
    SimpleRouter::start();
 

Environment & details:

empty
empty
empty
empty
empty
Key Value
USER www-data
HOME /var/www
PATH_TRANSLATED redirect:/index.php/donate
PATH_INFO /donate
SCRIPT_NAME /index.php
REQUEST_URI /donate
QUERY_STRING
REQUEST_METHOD GET
SERVER_PROTOCOL HTTP/2.0
GATEWAY_INTERFACE CGI/1.1
REDIRECT_URL /donate
REMOTE_PORT 39464
SCRIPT_FILENAME /var/www/aikonia/html/index.php
SERVER_ADMIN hello@aikoniacomic.com
CONTEXT_DOCUMENT_ROOT /var/www/aikonia/html
CONTEXT_PREFIX
REQUEST_SCHEME https
DOCUMENT_ROOT /var/www/aikonia/html
REMOTE_ADDR 34.234.83.135
SERVER_PORT 443
SERVER_ADDR 159.203.44.17
SERVER_NAME aikoniacomic.com
SERVER_SOFTWARE Apache/2.4.54 (Ubuntu)
SERVER_SIGNATURE <address>Apache/2.4.54 (Ubuntu) Server at aikoniacomic.com Port 443</address>
PATH /usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/snap/bin
HTTP_HOST aikoniacomic.com
HTTP_USER_AGENT claudebot
HTTP_ACCEPT */*
proxy-nokeepalive 1
SSL_TLS_SNI aikoniacomic.com
HTTPS on
H2_STREAM_TAG 21-3
H2_STREAM_ID 3
H2_PUSHED_ON
H2_PUSHED
H2_PUSH off
H2PUSH off
HTTP2 on
REDIRECT_STATUS 200
REDIRECT_SSL_TLS_SNI aikoniacomic.com
REDIRECT_HTTPS on
REDIRECT_H2_STREAM_TAG 21-3
REDIRECT_H2_STREAM_ID 3
REDIRECT_H2_PUSHED_ON
REDIRECT_H2_PUSHED
REDIRECT_H2_PUSH off
REDIRECT_H2PUSH off
REDIRECT_HTTP2 on
FCGI_ROLE RESPONDER
PHP_SELF /index.php/donate
REQUEST_TIME_FLOAT 1711614961.7305
REQUEST_TIME 1711614961
empty
0. Whoops\Handler\PrettyPageHandler