Phact \ Exceptions \ HttpException
Page not found Phact\Exceptions\HttpException thrown with message "Page not found" Stacktrace: #9 Phact\Exceptions\HttpException in /home/i/ikolbin/sila-shop.ru/vendor/phact-cmf/phact/src/Phact/Controller/Controller.php:110 #8 Phact\Controller\Controller:error in /home/i/ikolbin/sila-shop.ru/vendor/phact-cmf/phact/src/Phact/Controller/Controller.php:132 #7 Phact\Controller\Controller:getOr404 in /home/i/ikolbin/sila-shop.ru/app/Modules/Request/Controllers/RequestController.php:124 #6 Modules\Request\Controllers\RequestController:fastModal in /home/i/ikolbin/sila-shop.ru/vendor/phact-cmf/phact/src/Phact/Di/Container.php:625 #5 call_user_func_array in /home/i/ikolbin/sila-shop.ru/vendor/phact-cmf/phact/src/Phact/Di/Container.php:625 #4 Phact\Di\Container:invoke in /home/i/ikolbin/sila-shop.ru/vendor/phact-cmf/phact/src/Phact/Application/Application.php:303 #3 Phact\Application\Application:handleMatch in /home/i/ikolbin/sila-shop.ru/vendor/phact-cmf/phact/src/Phact/Application/Application.php:272 #2 Phact\Application\Application:handleWebRequest in /home/i/ikolbin/sila-shop.ru/vendor/phact-cmf/phact/src/Phact/Application/Application.php:228 #1 Phact\Application\Application:handleRequest in /home/i/ikolbin/sila-shop.ru/vendor/phact-cmf/phact/src/Phact/Application/Application.php:214 #0 Phact\Application\Application:run in /home/i/ikolbin/sila-shop.ru/www/index.php:12
Stack frames (10)
9
Phact\Exceptions\HttpException
/vendor/phact-cmf/phact/src/Phact/Controller/Controller.php110
8
Phact\Controller\Controller error
/vendor/phact-cmf/phact/src/Phact/Controller/Controller.php132
7
Phact\Controller\Controller getOr404
/app/Modules/Request/Controllers/RequestController.php124
6
Modules\Request\Controllers\RequestController fastModal
/vendor/phact-cmf/phact/src/Phact/Di/Container.php625
5
call_user_func_array
/vendor/phact-cmf/phact/src/Phact/Di/Container.php625
4
Phact\Di\Container invoke
/vendor/phact-cmf/phact/src/Phact/Application/Application.php303
3
Phact\Application\Application handleMatch
/vendor/phact-cmf/phact/src/Phact/Application/Application.php272
2
Phact\Application\Application handleWebRequest
/vendor/phact-cmf/phact/src/Phact/Application/Application.php228
1
Phact\Application\Application handleRequest
/vendor/phact-cmf/phact/src/Phact/Application/Application.php214
0
Phact\Application\Application run
/www/index.php12
/home/i/ikolbin/sila-shop.ru/vendor/phact-cmf/phact/src/Phact/Controller/Controller.php
        $this->eventTrigger("controller.beforeAction", [$params], $this);
    }
 
    public function afterActionInternal($action, $params, $response)
    {
        $this->afterAction($action, $params, $response);
        $this->eventTrigger("controller.afterAction", [$params, $response], $this);
    }
 
    public function beforeAction($action, $params)
    {
    }
 
    public function afterAction($action, $params, $response)
    {
    }
 
    public function error($code = 404, $message = null)
    {
        throw new HttpException($code, $message);
    }
 
    public function jsonResponse($data = [])
    {
        header('Content-Type: application/json');
        echo json_encode($data);
    }
 
    /**
     * @param $class string|Model
     * @param $filter array|string|int
     * @return Model
     * @throws HttpException
     */
    public function getOr404(Model $class, $filter)
    {
        if (!is_array($filter)) {
            $filter = ['id' => $filter];
        }
        $model = $class::objects()->filter($filter)->get();
/home/i/ikolbin/sila-shop.ru/vendor/phact-cmf/phact/src/Phact/Controller/Controller.php
    public function jsonResponse($data = [])
    {
        header('Content-Type: application/json');
        echo json_encode($data);
    }
 
    /**
     * @param $class string|Model
     * @param $filter array|string|int
     * @return Model
     * @throws HttpException
     */
    public function getOr404(Model $class, $filter)
    {
        if (!is_array($filter)) {
            $filter = ['id' => $filter];
        }
        $model = $class::objects()->filter($filter)->get();
        if (!$model) {
            $this->error(404);
        }
        return $model;
    }
}
/home/i/ikolbin/sila-shop.ru/app/Modules/Request/Controllers/RequestController.php
    {
        $this->processInlineForm(new WholesaleForm());
    }
 
    public function recallModal()
    {
        $this->processModelForm(
            new RecallForm(),
            'pages/recall/index.tpl',
            'pages/recall/success.tpl',
            [
                'title' => self::t('messages', 'Заказать обратный звонок'),
                'button' => self::t('messages', 'Заказать звонок')
            ]
        );
    }
 
    public function fastModal($id, $offerId = null)
    {
        $product = $this->getOr404(new Product(), $id);
 
        $fast = new Fast();
        $fast->product_id = $product->id;
        if($offerId && $offer = Offer::objects()->filter(['product' => $id, 'id' => $offerId])->get()) {
            $fast->size = $offer->name;
        }
 
        $form = new FastForm();
        $form->setInstance($fast);
 
        $this->processModelForm(
            $form,
            'pages/recall/index.tpl',
            'pages/recall/success.tpl',
            [
                'title' => self::t('messages','Быстрый заказ'),
                'button' => self::t('messages','Заказать сейчас')
            ]
        );
    }
/home/i/ikolbin/sila-shop.ru/vendor/phact-cmf/phact/src/Phact/Di/Container.php
     * Invoke callable with dependency injection
     *
     * @param $callable
     * @param array $attributes
     * @return mixed
     * @throws ContainerException
     * @throws NotFoundContainerException
     * @throws ReflectionException
     * @throws InvalidAttributeException
     */
    public function invoke($callable, $attributes = [])
    {
        if (!is_callable($callable)) {
            throw new InvalidAttributeException('$callable attribute must be callable');
        }
        $dependencies = $this->fetchCallableDependencies($callable);
        $parameters = $this->buildParameters($attributes);
        $arguments = $this->buildFunctionArguments($dependencies, $parameters);
        if ($arguments) {
            return call_user_func_array($callable, $arguments);
        } else {
            return call_user_func($callable);
        }
    }
 
    /**
     * Construct instance of class with constructor arguments
     *
     * @param string $className
     * @param $arguments array
     * @return object
     * @throws ContainerException
     * @throws NotFoundContainerException
     * @throws ReflectionException
     */
    public function construct(string $className, $arguments = [])
    {
        return $this->make($className, $arguments);
    }
 
/home/i/ikolbin/sila-shop.ru/vendor/phact-cmf/phact/src/Phact/Di/Container.php
     * Invoke callable with dependency injection
     *
     * @param $callable
     * @param array $attributes
     * @return mixed
     * @throws ContainerException
     * @throws NotFoundContainerException
     * @throws ReflectionException
     * @throws InvalidAttributeException
     */
    public function invoke($callable, $attributes = [])
    {
        if (!is_callable($callable)) {
            throw new InvalidAttributeException('$callable attribute must be callable');
        }
        $dependencies = $this->fetchCallableDependencies($callable);
        $parameters = $this->buildParameters($attributes);
        $arguments = $this->buildFunctionArguments($dependencies, $parameters);
        if ($arguments) {
            return call_user_func_array($callable, $arguments);
        } else {
            return call_user_func($callable);
        }
    }
 
    /**
     * Construct instance of class with constructor arguments
     *
     * @param string $className
     * @param $arguments array
     * @return object
     * @throws ContainerException
     * @throws NotFoundContainerException
     * @throws ReflectionException
     */
    public function construct(string $className, $arguments = [])
    {
        return $this->make($className, $arguments);
    }
 
/home/i/ikolbin/sila-shop.ru/vendor/phact-cmf/phact/src/Phact/Application/Application.php
            isset($match['target'][0]) &&
            is_a($match['target'][0], ControllerInterface::class, true))
        {
            $controllerClass = $match['target'][0];
            $action = isset($match['target'][1]) ? $match['target'][1] : null;
            $params = isset($match['params']) ? $match['params'] : [];
            $name = isset($match['name']) ? $match['name'] : null;
 
            if ($router && $name) {
                $router->setCurrentName($name);
            }
 
            $this->logDebug("Processing route to controller '{$controllerClass}' and action '{$action}'", ['params' => $params]);
            /** @var Controller $controller */
            $controller = $this->_container->construct($controllerClass);
            $action = $action ?: $controller->defaultAction;
 
            $this->eventTrigger("application.beforeRunController", [$controller, $action, $name, $params], $this);
            $controller->beforeActionInternal($action, $params);
            $matched = $this->_container->invoke([$controller, $action], $params);
            $controller->afterActionInternal($action, $params, $matched);
            $this->eventTrigger("application.afterRunController", [$controller, $action, $name, $params, $matched], $this);
        } elseif (is_callable($match['target'])) {
            $fn = $match['target'];
            $matched = $fn($this->request, $match['params']);
        } else {
            $matched = false;
        }
        return $matched;
    }
 
    public function handleCliRequest()
    {
        /** @var CliRequest $request */
        $request = $this->getComponent(CliRequestInterface::class);
        $this->logDebug("Try to find command");
 
        if (!$request->isEmpty()) {
            list($class, $action, $arguments) = $request->match();
            /** @var Command $command */
/home/i/ikolbin/sila-shop.ru/vendor/phact-cmf/phact/src/Phact/Application/Application.php
        if ($this->hasComponent(AuthInterface::class)) {
            return $this->getComponent(AuthInterface::class)->getUser();
        }
        return null;
    }
 
    public function handleWebRequest()
    {
        /** @var HttpRequestInterface $request */
        $request = $this->getComponent(HttpRequestInterface::class);
        /** @var RouterInterface $router */
        $router = $this->getComponent(RouterInterface::class);
 
        $url = $request->getUrl();
        $method = $request->getMethod();
        $this->logDebug("Matching route for url '{$url}' and method '{$method}'");
        $matches = $router->match($url, $method);
 
        foreach ($matches as $match) {
            $matched = $this->handleMatch($match, $router);
            if ($matched !== false) {
                return true;
            }
        }
        $this->logDebug("Matching route not found");
        throw new NotFoundHttpException("Page not found");
    }
 
    public function handleMatch(array $match, RouterInterface $router = null)
    {
        if (is_array($match['target']) &&
            isset($match['target'][0]) &&
            is_a($match['target'][0], ControllerInterface::class, true))
        {
            $controllerClass = $match['target'][0];
            $action = isset($match['target'][1]) ? $match['target'][1] : null;
            $params = isset($match['params']) ? $match['params'] : [];
            $name = isset($match['name']) ? $match['name'] : null;
 
            if ($router && $name) {
/home/i/ikolbin/sila-shop.ru/vendor/phact-cmf/phact/src/Phact/Application/Application.php
        $this->logDebug("Application run");
        $this->eventTrigger("application.beforeRun", [], $this);
        $this->provideModuleEvent('onApplicationRun');
        register_shutdown_function([$this, 'end'], 0);
        $this->logDebug("Start handling request");
        $this->handleRequest();
        $this->end();
    }
 
    public function end($status = 0, $response = null)
    {
        $this->eventTrigger("application.beforeEnd", [], $this);
        $this->provideModuleEvent('onApplicationEnd', [$status, $response]);
        exit($status);
    }
 
    public function handleRequest()
    {
        if ($this->getIsWebMode()) {
            $this->handleWebRequest();
        } else {
            $this->handleCliRequest();
        }
    }
 
    /**
     * @return bool
     */
    public static function getIsCliMode()
    {
        return php_sapi_name() == 'cli';
    }
 
    /**
     * @return bool
     */
    public static function getIsWebMode()
    {
        return !self::getIsCliMode();
    }
/home/i/ikolbin/sila-shop.ru/vendor/phact-cmf/phact/src/Phact/Application/Application.php
 
    /**
     * Check or create system path
     *
     * @param $path
     * @return bool
     */
    protected function setUpPath($path): bool
    {
        return is_dir($path) || mkdir($path, 0755, true);
    }
 
    public function run()
    {
        $this->logDebug("Application run");
        $this->eventTrigger("application.beforeRun", [], $this);
        $this->provideModuleEvent('onApplicationRun');
        register_shutdown_function([$this, 'end'], 0);
        $this->logDebug("Start handling request");
        $this->handleRequest();
        $this->end();
    }
 
    public function end($status = 0, $response = null)
    {
        $this->eventTrigger("application.beforeEnd", [], $this);
        $this->provideModuleEvent('onApplicationEnd', [$status, $response]);
        exit($status);
    }
 
    public function handleRequest()
    {
        if ($this->getIsWebMode()) {
            $this->handleWebRequest();
        } else {
            $this->handleCliRequest();
        }
    }
 
    /**
/home/i/ikolbin/sila-shop.ru/www/index.php
<?php
 
include(__DIR__ . '/../vendor/autoload.php');
 
$dotenv = Dotenv\Dotenv::create(__DIR__ . '/../');
$dotenv->load();
 
define('PHACT_DEBUG', getenv('DEBUG') === 'true');
 
$config = include __DIR__ . '/../app/config/settings.php';
\Phact\Main\Phact::init($config);
\Phact\Main\Phact::app()->run();

Environment & details:

empty
empty
empty
empty
empty
Key Value
REDIRECT_UNIQUE_ID ZflO4RWkr1a2TcIA0LLgLAAAAAc
REDIRECT_MMDB_ADDR 87.236.16.27
REDIRECT_GEOIP_ADDR 87.236.16.27
REDIRECT_MMDB_INFO result found
REDIRECT_GEOIP_LONGITUDE 37.60680
REDIRECT_GEOIP_CONTINENT_CODE EU
REDIRECT_GEOIP_LATITUDE 55.73860
REDIRECT_GEOIP_COUNTRY_CODE RU
REDIRECT_GEOIP_COUNTRY_NAME Russia
REDIRECT_HTTPS on
REDIRECT_PERL_USE_UNSAFE_INC 1
REDIRECT_STATUS 200
UNIQUE_ID ZflO4RWkr1a2TcIA0LLgLAAAAAc
MMDB_ADDR 87.236.16.27
GEOIP_ADDR 87.236.16.27
MMDB_INFO result found
GEOIP_LONGITUDE 37.60680
GEOIP_CONTINENT_CODE EU
GEOIP_LATITUDE 55.73860
GEOIP_COUNTRY_CODE RU
GEOIP_COUNTRY_NAME Russia
HTTPS on
PERL_USE_UNSAFE_INC 1
HTTP_HOST sila-shop.com
HTTP_X_FORWARDED_FOR 18.208.203.36
HTTP_X_SERVER_ADDR 87.236.16.32
HTTP_X_FORWARDED_PROTO https
HTTP_X_REAL_IP 87.236.16.27
HTTP_ACCEPT */*
HTTP_USER_AGENT claudebot
PATH /usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
SERVER_SIGNATURE <address>Apache/2.4.55 (Unix) Server at sila-shop.com Port 80</address>
SERVER_SOFTWARE Apache/2.4.55 (Unix)
SERVER_NAME sila-shop.com
SERVER_ADDR 87.236.16.32
SERVER_PORT 443
REQUEST_SCHEME https
REMOTE_ADDR 87.236.16.27
DOCUMENT_ROOT /home/i/ikolbin/sila-shop.ru/public_html
CONTEXT_PREFIX
CONTEXT_DOCUMENT_ROOT /home/i/ikolbin/sila-shop.ru/public_html
SERVER_ADMIN webmaster@sila-shop.com
SCRIPT_FILENAME /home/i/ikolbin/sila-shop.ru/public_html/index.php
REMOTE_PORT 22723
REDIRECT_URL /request/fast_modal/209/0
GATEWAY_INTERFACE CGI/1.1
SERVER_PROTOCOL HTTP/1.1
REQUEST_METHOD GET
QUERY_STRING
REQUEST_URI /request/fast_modal/209/0
SCRIPT_NAME /index.php
PHP_SELF /index.php
REQUEST_TIME_FLOAT 1710837473.8799
REQUEST_TIME 1710837473
argv Array ( )
argc 0
DEBUG true
DB_HOST 127.0.0.1
DB_NAME ikolbin_sila
DB_USER ikolbin_sila
DB_PASS L*ZxBwL4
HOST_INFO http://sila-shop.ru
SENTRY_DSN http://22824fc5e2d14cf2ae67cc1b37e6a30a:24976278c73b47cdb5d9b2de567af219@sentry.rclass.pro/41
Key Value
APT_GET_UPGRADE apt-get dist-upgrade -qq -y
HOSTNAME gizmo.beget.ru
OLDPWD /
APT_GET_INSTALL apt-get install --no-install-recommends -qq -y
IN_CONTAINER true
PWD /
HOME /root
DEBIAN_FRONTEND noninteractive
SHLVL 0
PATH /usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
APT_GET_UPDATE apt-get update -qq
DEBUG true
DB_HOST 127.0.0.1
DB_NAME ikolbin_sila
DB_USER ikolbin_sila
DB_PASS L*ZxBwL4
HOST_INFO http://sila-shop.ru
SENTRY_DSN http://22824fc5e2d14cf2ae67cc1b37e6a30a:24976278c73b47cdb5d9b2de567af219@sentry.rclass.pro/41
0. Phact\Main\ExceptionPageHandler
1. Whoops\Handler\CallbackHandler