Whoops \ Exception \ ErrorException (E_WARNING)
require(views/404.php): failed to open stream: No such file or directory Whoops\Exception\ErrorException thrown with message "require(views/404.php): failed to open stream: No such file or directory" Stacktrace: #9 Whoops\Exception\ErrorException in /var/www/vhosts/grdar.cloud/tcasertec.es/core/vendor/grdar/core/src/Views/View.php:45 #8 require in /var/www/vhosts/grdar.cloud/tcasertec.es/core/vendor/grdar/core/src/Views/View.php:45 #7 Grdar\core\Views\View:html in /var/www/vhosts/grdar.cloud/tcasertec.es/core/vendor/grdar/core/src/Views/View.php:57 #6 Grdar\core\Views\View:view in /var/www/vhosts/grdar.cloud/tcasertec.es/core/classes/Controllers/IndexController.php:18 #5 GRDAR\Controllers\IndexController:checkIdioma in /var/www/vhosts/grdar.cloud/tcasertec.es/core/classes/Controllers/IndexController.php:25 #4 GRDAR\Controllers\IndexController:index in /var/www/vhosts/grdar.cloud/tcasertec.es/core/vendor/grdar/core/src/Routes/Route.php:58 #3 call_user_func_array in /var/www/vhosts/grdar.cloud/tcasertec.es/core/vendor/grdar/core/src/Routes/Route.php:58 #2 Grdar\core\Routes\Route:execute in /var/www/vhosts/grdar.cloud/tcasertec.es/core/vendor/grdar/core/src/Routes/Router.php:48 #1 Grdar\core\Routes\Router:run in /var/www/vhosts/grdar.cloud/tcasertec.es/core/vendor/grdar/core/src/Facades/Facade.php:38 #0 Grdar\core\Facades\Facade:__callStatic in /var/www/vhosts/grdar.cloud/tcasertec.es/index.php:30
Stack frames (10)
9
Whoops
\
Exception
\
ErrorException
/
vendor
/
grdar
/
core
/
src
/
Views
/
View.php
45
8
require
/
vendor
/
grdar
/
core
/
src
/
Views
/
View.php
45
7
Grdar
\
core
\
Views
\
View
html
/
vendor
/
grdar
/
core
/
src
/
Views
/
View.php
57
6
Grdar
\
core
\
Views
\
View
view
/
classes
/
Controllers
/
IndexController.php
18
5
GRDAR
\
Controllers
\
IndexController
checkIdioma
/
classes
/
Controllers
/
IndexController.php
25
4
GRDAR
\
Controllers
\
IndexController
index
/
vendor
/
grdar
/
core
/
src
/
Routes
/
Route.php
58
3
call_user_func_array
/
vendor
/
grdar
/
core
/
src
/
Routes
/
Route.php
58
2
Grdar
\
core
\
Routes
\
Route
execute
/
vendor
/
grdar
/
core
/
src
/
Routes
/
Router.php
48
1
Grdar
\
core
\
Routes
\
Router
run
/
vendor
/
grdar
/
core
/
src
/
Facades
/
Facade.php
38
0
Grdar
\
core
\
Facades
\
Facade
__callStatic
/
var
/
www
/
vhosts
/
grdar.cloud
/
tcasertec.es
/
index.php
30
/
var
/
www
/
vhosts
/
grdar.cloud
/
tcasertec.es
/
core
/
vendor
/
grdar
/
core
/
src
/
Views
/
View.php
        $container = Container::getInstance();
        return get_object_vars($container);
    }
 
 
    public static function html()
    {
 
        isset(self::$vars) ? $this->isArray() : false;
        self::getInstance();
 
        ob_start();
        echo '
        <!doctype html>
        <html lang="' . idioma() . '">';
 
        require self::INCLUDES . 'head.php';
        echo '<body>';
        require self::INCLUDES . 'header.php';
        require self::VIEWS . self::$template . '.php';
        require self::INCLUDES . 'footer.php';
        echo '</body>
        </html>';
 
        self::$templateContent = ob_get_clean();
    }
 
    public static function view($template, $vars = null)
    {
        self::$template = $template;
        self::$vars     = $vars;
        self::html();
        return self::$templateContent;
    }
 
    public function abort404($message)
    {
        http_response_code(404);
        view('404');
        exit();
/
var
/
www
/
vhosts
/
grdar.cloud
/
tcasertec.es
/
core
/
vendor
/
grdar
/
core
/
src
/
Views
/
View.php
        $container = Container::getInstance();
        return get_object_vars($container);
    }
 
 
    public static function html()
    {
 
        isset(self::$vars) ? $this->isArray() : false;
        self::getInstance();
 
        ob_start();
        echo '
        <!doctype html>
        <html lang="' . idioma() . '">';
 
        require self::INCLUDES . 'head.php';
        echo '<body>';
        require self::INCLUDES . 'header.php';
        require self::VIEWS . self::$template . '.php';
        require self::INCLUDES . 'footer.php';
        echo '</body>
        </html>';
 
        self::$templateContent = ob_get_clean();
    }
 
    public static function view($template, $vars = null)
    {
        self::$template = $template;
        self::$vars     = $vars;
        self::html();
        return self::$templateContent;
    }
 
    public function abort404($message)
    {
        http_response_code(404);
        view('404');
        exit();
/
var
/
www
/
vhosts
/
grdar.cloud
/
tcasertec.es
/
core
/
vendor
/
grdar
/
core
/
src
/
Views
/
View.php
        echo '
        <!doctype html>
        <html lang="' . idioma() . '">';
 
        require self::INCLUDES . 'head.php';
        echo '<body>';
        require self::INCLUDES . 'header.php';
        require self::VIEWS . self::$template . '.php';
        require self::INCLUDES . 'footer.php';
        echo '</body>
        </html>';
 
        self::$templateContent = ob_get_clean();
    }
 
    public static function view($template, $vars = null)
    {
        self::$template = $template;
        self::$vars     = $vars;
        self::html();
        return self::$templateContent;
    }
 
    public function abort404($message)
    {
        http_response_code(404);
        view('404');
        exit();
    }
}
/
var
/
www
/
vhosts
/
grdar.cloud
/
tcasertec.es
/
core
/
classes
/
Controllers
/
IndexController.php
<?php
 
namespace GRDAR\Controllers;
 
use Grdar\core\Views\View;
 
class IndexController
{
    const IDIOMAS = IDIOMAS;
 
    protected static function checkIdioma($lang)
    {
        $langs = explode('/', self::IDIOMAS);
        if (!in_array($lang, $langs)) {
            $_GET['page'] = '404';
            $_GET['lang'] = 'es';
            header('HTTP/1.1 404 Not Found');
            exit(View::view('404'));
        }
        $_GET['lang'] = $lang;
    }
 
    public static function index($lang)
    {
        self::checkIdioma($lang);
        $_GET['page'] = 'Home';
        return View::view('index');
    }
    public static function proyectos($lang)
    {
        self::checkIdioma($lang);
        $_GET['page'] = 'Proyectos';
        return View::view('proyectos');
    }
    public static function proyectoficha($lang,$proyecto)
    {
        self::checkIdioma($lang);
        $_GET['page'] = 'Proyectos';
        $_GET['proyecto'] = $proyecto;
        return View::view('proyecto-ficha');
/
var
/
www
/
vhosts
/
grdar.cloud
/
tcasertec.es
/
core
/
classes
/
Controllers
/
IndexController.php
 
class IndexController
{
    const IDIOMAS = IDIOMAS;
 
    protected static function checkIdioma($lang)
    {
        $langs = explode('/', self::IDIOMAS);
        if (!in_array($lang, $langs)) {
            $_GET['page'] = '404';
            $_GET['lang'] = 'es';
            header('HTTP/1.1 404 Not Found');
            exit(View::view('404'));
        }
        $_GET['lang'] = $lang;
    }
 
    public static function index($lang)
    {
        self::checkIdioma($lang);
        $_GET['page'] = 'Home';
        return View::view('index');
    }
    public static function proyectos($lang)
    {
        self::checkIdioma($lang);
        $_GET['page'] = 'Proyectos';
        return View::view('proyectos');
    }
    public static function proyectoficha($lang,$proyecto)
    {
        self::checkIdioma($lang);
        $_GET['page'] = 'Proyectos';
        $_GET['proyecto'] = $proyecto;
        return View::view('proyecto-ficha');
    }
    public static function cookies($lang)
    {
        self::checkIdioma($lang);
        $_GET['page'] = 'Cookies';
/
var
/
www
/
vhosts
/
grdar.cloud
/
tcasertec.es
/
core
/
vendor
/
grdar
/
core
/
src
/
Routes
/
Route.php
    {
        return $this->parameters;
    }
 
    public function checkIfMatch($requestUri)
    {
        $uriPattern = $this->getUriPattern();
        if (preg_match($uriPattern, $requestUri, $matches))
            {
            $this->resolveParameters($matches);
            return true;
        }
        return false;
    }
    
    public function execute()
    {
        $closure = $this->closure;
        $parameters = $this->getParameters();
        return call_user_func_array($closure, $parameters);
    }
}
 
/
var
/
www
/
vhosts
/
grdar.cloud
/
tcasertec.es
/
core
/
vendor
/
grdar
/
core
/
src
/
Routes
/
Route.php
    {
        return $this->parameters;
    }
 
    public function checkIfMatch($requestUri)
    {
        $uriPattern = $this->getUriPattern();
        if (preg_match($uriPattern, $requestUri, $matches))
            {
            $this->resolveParameters($matches);
            return true;
        }
        return false;
    }
    
    public function execute()
    {
        $closure = $this->closure;
        $parameters = $this->getParameters();
        return call_user_func_array($closure, $parameters);
    }
}
 
/
var
/
www
/
vhosts
/
grdar.cloud
/
tcasertec.es
/
core
/
vendor
/
grdar
/
core
/
src
/
Routes
/
Router.php
    public function getRequestUri()
    {
        return $this->requestUri;
    }
 
    public function add($uri, $closure)
    {
        $route = new Route($uri, $closure);
        array_push($this->routes, $route);
    }
 
    public function run()
    {
        $response = false;
        $requestUri = $this->getRequestUri();
        foreach ($this->routes as $route)
        {
            if ($route->checkIfMatch($requestUri))
            {
                $response = $route->execute();
                // break para no seguir dando vueltas
                // Ya se encontró la ruta correspondiente
                break;
            }
        }
        $this->sendResponse($response);
    }
    
    public function sendResponse($response)
    {
 
        if (is_string($response))
        {
            echo $response;
        }
        else if (is_array($response))
        {
            echo json_encode($response);
        }
        else if ($response instanceof Response)
/
var
/
www
/
vhosts
/
grdar.cloud
/
tcasertec.es
/
core
/
vendor
/
grdar
/
core
/
src
/
Facades
/
Facade.php
    {
        return static::$container;
    }
 
    public static function getAccessor()
    {
        throw new Exception('Please define the getAccessor method in your facade');
    }
 
    public static function getInstance()
    {
        return static::getContainer()->make(static::getAccessor());
    }
 
    public static function __callStatic($method, $args)
    {
        $object = static::getInstance();
        switch (count($args)) {
            case 0:
                return $object->$method();
            case 1:
                return $object->$method($args[0]);
            case 2:
                return $object->$method($args[0], $args[1]);
            case 3:
                return $object->$method($args[0], $args[1], $args[2]);
            default:
                return call_user_func_array(array($object, $method), $args);
        }
    }
 
}
/
var
/
www
/
vhosts
/
grdar.cloud
/
tcasertec.es
/
index.php
// Rutas AJAX
 
//Rout::add('/ajax/logout', 'Ajax::logOut');
Rout::add('/ajax/add-contacto', 'Ajax::AddContacto');
 
 
 
//TODO Hacerlo automaticon con la tabla seo_paginas
// Rutas aplicación
Rout::add('/:lang/404', 'Index::p404');
 
Rout::add('/:lang', 'Index::index');
 
Rout::add('/:lang/' . PATHS_APP['Proyectos'][$idioma]["url"], 'Index::proyectos');
Rout::add('/:lang/' . PATHS_APP['Proyectos'][$idioma]["url"].'/:proyecto', 'Index::proyectoficha');
Rout::add('/:lang/' . PATHS_APP['Cookies'][$idioma]["url"], 'Index::cookies');
 
 
 
Rout::run();
 
ob_end_flush();

Environment & details:

Key Value
page 404
lang es
empty
empty
empty
Key Value
cache_idiomas Array ( )
Key Value
USER grdarcloud
HOME /var/www/vhosts/grdar.cloud
SCRIPT_NAME /index.php
REQUEST_URI /politica-de-privacidad
QUERY_STRING
REQUEST_METHOD GET
SERVER_PROTOCOL HTTP/1.0
GATEWAY_INTERFACE CGI/1.1
REDIRECT_URL /politica-de-privacidad
REMOTE_PORT 43252
SCRIPT_FILENAME /var/www/vhosts/grdar.cloud/tcasertec.es/index.php
SERVER_ADMIN [no address given]
CONTEXT_DOCUMENT_ROOT /var/www/vhosts/grdar.cloud/tcasertec.es
CONTEXT_PREFIX
REQUEST_SCHEME https
DOCUMENT_ROOT /var/www/vhosts/grdar.cloud/tcasertec.es
REMOTE_ADDR 44.199.212.254
SERVER_PORT 443
SERVER_ADDR 10.156.0.5
SERVER_NAME www.tcasertec.es
SERVER_SOFTWARE Apache
SERVER_SIGNATURE <address>Apache Server at www.tcasertec.es Port 443</address>
PATH /usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/snap/bin
HTTP_REFERER https://www.tcasertec.es/politica-de-privacidad/
HTTP_USER_AGENT claudebot
HTTP_ACCEPT */*
HTTP_CONNECTION close
HTTP_X_ACCEL_INTERNAL /internal-nginx-static-location
HTTP_X_REAL_IP 44.199.212.254
HTTP_HOST www.tcasertec.es
proxy-nokeepalive 1
HTTPS on
SCRIPT_URI https://www.tcasertec.es/politica-de-privacidad
SCRIPT_URL /politica-de-privacidad
UNIQUE_ID ZgXa3t@yDf0Q4Ba2x7oRvAAAAUk
REDIRECT_STATUS 200
REDIRECT_HTTPS on
REDIRECT_SCRIPT_URI https://www.tcasertec.es/politica-de-privacidad
REDIRECT_SCRIPT_URL /politica-de-privacidad
REDIRECT_UNIQUE_ID ZgXa3t@yDf0Q4Ba2x7oRvAAAAUk
FCGI_ROLE RESPONDER
PHP_SELF /index.php
REQUEST_TIME_FLOAT 1711659742.8052
REQUEST_TIME 1711659742
empty
0. Whoops\Handler\PrettyPageHandler