Phalcon Framework 5.6.1

Phalcon\Mvc\Dispatcher\Exception: ChatHispanoEngine\Web\Controllers\SoporteController handler class cannot be loaded

/srv/ChatHispanoEngine/releases/94/apps/Application.php (150)
#0Phalcon\Mvc\Dispatcher->throwDispatchException
#1Phalcon\Dispatcher\AbstractDispatcher->dispatch
#2Phalcon\Mvc\Application->handle
/srv/ChatHispanoEngine/releases/94/apps/Application.php (150)
<?php
 
// namespace ChatHispanoEngine;
 
/**
 * Application driver class to initialize Phalcon and
 * other resources.
 */
class Application extends \Phalcon\Mvc\Application
{
    private static $mode = 'dev';
 
    private static $DEFAULT_MODULE = 'api';
 
    public const MODE_PRODUCTION = 'prod';
    public const MODE_STAGING = 'staging';
    public const MODE_TEST = 'test';
    public const MODE_DEVELOPMENT = 'dev';
 
    /**
     * Set application mode and error reporting level.
     */
    public function __construct($defaultModule, $env = 'dev')
    {
        $this->modules = array(
            'core' => array(
                'className' => 'ChatHispanoEngine\Core\Module',
                'path' => __DIR__.'/Core/Module.php',
            ),
            'api' => array(
                'className' => 'ChatHispanoEngine\Api\Module',
                'path' => __DIR__.'/Api/Module.php',
            ),
            'login' => array(
                'className' => 'ChatHispanoEngine\Login\Module',
                'path' => __DIR__.'/Login/Module.php',
            ),
            'oidc' => array(
                'className' => 'ChatHispanoEngine\Oidc\Module',
                'path' => __DIR__.'/Oidc/Module.php',
            ),
            'web' => array(
                'className' => 'ChatHispanoEngine\Web\Module',
                'path' => __DIR__.'/Web/Module.php',
            ),
            'backoffice' => array(
                'className' => 'ChatHispanoEngine\Backoffice\Module',
                'path' => __DIR__.'/Backoffice/Module.php',
            ),
            'movil' => array(
                'className' => 'ChatHispanoEngine\Movil\Module',
                'path' => __DIR__.'/Movil/Module.php',
            ),
            'regwebexternal' => array(
                'className' => 'ChatHispanoEngine\RegWebExternal\Module',
                'path' => __DIR__.'/Regwebexternal/Module.php',
            ),
            'cdn' => array(
                'className' => 'ChatHispanoEngine\Cdn\Module',
                'path' => __DIR__.'/Cdn/Module.php',
            ),
            'shorten' => array(
                'className' => 'ChatHispanoEngine\Shorten\Module',
                'path' => __DIR__.'/Shorten/Module.php',
            ),
        );
 
        static::$DEFAULT_MODULE = $defaultModule;
        self::$mode = $env;
 
        self::$mode = trim(file_get_contents(__DIR__.'/../config/environment.txt'));
        define('ENVIRONMENT', self::$mode);
 
        if (!defined('PHALCON_MODE')) {
            $mode = getenv('PHALCON_MODE');
            $mode = $mode ? $mode : self::$mode;
            define('PHALCON_MODE', $mode);
        }
 
        switch (self::getMode()) {
            case self::MODE_PRODUCTION:
            case self::MODE_STAGING:
                error_reporting(0);
                break;
            case self::MODE_TEST:
            case self::MODE_DEVELOPMENT:
                ini_set('display_errors', 'On');
                error_reporting(E_ALL);
                break;
        }
    }
 
    /**
     * Register the services here to make them general or register in
     * the ModuleDefinition to make them module-specific.
     */
    protected function _registerServices()
    {
        $defaultModule = self::$DEFAULT_MODULE;
        $modules = $this->modules;
        $config = include __DIR__.'/../config/config.php';
        $env_config = include __DIR__.'/../config/config_'.ENVIRONMENT.'.php';
        $config->merge($env_config);
 
        $di = new \Phalcon\DI\FactoryDefault();
 
        include __DIR__.'/../config/loader.php';
        include __DIR__.'/../config/services.php';
        include __DIR__.'/../config/routing.php';
 
        $this->setDI($di);
    }
 
    /**
     * Run the application.
     */
    public function main()
    {
        if (static::MODE_PRODUCTION === static::getMode()) {
            $this->mainProd();
        } else {
            $this->mainDev();
        }
    }
 
    private function getRequestUri()
    {
        if (!isset($_SERVER)) {
            return "/";
        }
        if (!is_array($_SERVER)) {
            return "/";
        }
        if (!isset($_SERVER['REQUEST_URI'])) {
            return "/";
        }
        return $_SERVER['REQUEST_URI'];
    }
 
    /**
     * Run the development environment.
     */
    private function mainDev()
    {
        (new \Phalcon\Support\Debug())->listen();
 
        $this->_registerServices();
        $this->registerModules($this->modules);
 
        $response = $this->handle($this->getRequestUri());
        $response->send();
    }
 
    /**
     * Run the production environment.
     */
    private function mainProd()
    {
        try {
            $this->registerModules($this->modules);
            $this->_registerServices();
 
            $response = $this->handle($this->getRequestUri());
            $response->send();
        } catch (\Exception $e) {
            $logger = new \Phalcon\Logger\Adapter\Stream(__DIR__.'/../logs/'.date('Y-m-d').'.log');
            $msg = "[".$_SERVER['SERVER_NAME']."] [".$_SERVER['REQUEST_URI']."] [".$e->getCode()."] ".$e->getMessage()." at ".$e->getFile()." (".$e->getLine().")";
            $msg .= "\n".$e->getTraceAsString();
            $logger->process(new \Phalcon\Logger\Item($msg, "error", 100));
            $logger->close();
 
            // remove view contents from buffer
            ob_clean();
 
            $errorCode = 500;
            $errorView = __DIR__.'/../public/errors/error.html';
 
            if (401 === $e->getCode()) {
                // 401 UNAUTHORIZED
                $errorCode = 401;
            } elseif (403 === $e->getCode()) {
                // 403 FORBIDDEN
                $errorCode = 403;
            } elseif (404 === $e->getCode()
                || $e instanceof Phalcon\Mvc\View\Exception
                || $e instanceof Phalcon\Mvc\Dispatcher\Exception) {
                // 404 NOT FOUND
                $errorCode = 404;
            }
 
            // Get error view contents. Since we are including the view
            // file here you can use PHP and local vars inside the error view.
            ob_start();
            include_once $errorView;
            $contents = ob_get_contents();
            ob_end_clean();
 
            // send view to header
            $response = $this->getDI()->getShared('response');
            $response->resetHeaders()
                ->setStatusCode($errorCode, null)
                ->setContent($contents)
                ->send()
            ;
 
            /**
             * We try to register in MongoDB the error to be able to
             * track it in backoffice and/or receive emails
             */
            try {
                $system_log_manager = $this->getDI()->get('system_log_manager');
                if ($errorCode == 500) {
                    $system_log_manager->createError([
                        'ip' => $_SERVER['SERVER_ADDR'],
                        'host' => $_SERVER['SERVER_NAME'],
                        'process' => 'php-fpm',
                        'message' => $e->getMessage(),
                        'file' => $e->getFile(),
                        'line' => $e->getLine(),
                    ]);
                } else {
                    $system_log_manager->createWarning([
                        'ip' => $_SERVER['SERVER_ADDR'],
                        'host' => $_SERVER['SERVER_NAME'],
                        'process' => 'php-fpm',
                        'message' => $e->getMessage(),
                        'file' => $e->getFile(),
                        'line' => $e->getLine(),
                    ]);
                }
            } catch (\Exception $e) {
            }
        }
    }
 
    public function slowLog($t)
    {
        $config = $this->getDI()->get('config');
        $irc_manager = $this->getDI()->get('inspircd_irc_manager');
        $server = gethostname() ? gethostname() : 'unknown';
        $uri = "https://".$_SERVER['SERVER_NAME'].$_SERVER['REQUEST_URI'];
        $msg = "\x02[SLOWLOG] [".str_pad($server, 6, " ", STR_PAD_LEFT)."] [".str_pad(round($t, 1), 5, " ", STR_PAD_LEFT)."s] PATH=\x02 ".$_SERVER['REQUEST_URI']
            ."\x02 TYPE=\x02 ".$_SERVER['REQUEST_METHOD']."\x02 URI=\x02 ".$uri;
        $irc_manager->privmsgOrderEnqueue('AAAAAI', $config->irc->debug_channel, $msg);
    }
 
    /**
     * Get the current mode.
     *
     * @return string
     */
    public static function getMode()
    {
        return self::$mode;
    }
}
#3Application->mainDev
/srv/ChatHispanoEngine/releases/94/apps/Application.php (122)
<?php
 
// namespace ChatHispanoEngine;
 
/**
 * Application driver class to initialize Phalcon and
 * other resources.
 */
class Application extends \Phalcon\Mvc\Application
{
    private static $mode = 'dev';
 
    private static $DEFAULT_MODULE = 'api';
 
    public const MODE_PRODUCTION = 'prod';
    public const MODE_STAGING = 'staging';
    public const MODE_TEST = 'test';
    public const MODE_DEVELOPMENT = 'dev';
 
    /**
     * Set application mode and error reporting level.
     */
    public function __construct($defaultModule, $env = 'dev')
    {
        $this->modules = array(
            'core' => array(
                'className' => 'ChatHispanoEngine\Core\Module',
                'path' => __DIR__.'/Core/Module.php',
            ),
            'api' => array(
                'className' => 'ChatHispanoEngine\Api\Module',
                'path' => __DIR__.'/Api/Module.php',
            ),
            'login' => array(
                'className' => 'ChatHispanoEngine\Login\Module',
                'path' => __DIR__.'/Login/Module.php',
            ),
            'oidc' => array(
                'className' => 'ChatHispanoEngine\Oidc\Module',
                'path' => __DIR__.'/Oidc/Module.php',
            ),
            'web' => array(
                'className' => 'ChatHispanoEngine\Web\Module',
                'path' => __DIR__.'/Web/Module.php',
            ),
            'backoffice' => array(
                'className' => 'ChatHispanoEngine\Backoffice\Module',
                'path' => __DIR__.'/Backoffice/Module.php',
            ),
            'movil' => array(
                'className' => 'ChatHispanoEngine\Movil\Module',
                'path' => __DIR__.'/Movil/Module.php',
            ),
            'regwebexternal' => array(
                'className' => 'ChatHispanoEngine\RegWebExternal\Module',
                'path' => __DIR__.'/Regwebexternal/Module.php',
            ),
            'cdn' => array(
                'className' => 'ChatHispanoEngine\Cdn\Module',
                'path' => __DIR__.'/Cdn/Module.php',
            ),
            'shorten' => array(
                'className' => 'ChatHispanoEngine\Shorten\Module',
                'path' => __DIR__.'/Shorten/Module.php',
            ),
        );
 
        static::$DEFAULT_MODULE = $defaultModule;
        self::$mode = $env;
 
        self::$mode = trim(file_get_contents(__DIR__.'/../config/environment.txt'));
        define('ENVIRONMENT', self::$mode);
 
        if (!defined('PHALCON_MODE')) {
            $mode = getenv('PHALCON_MODE');
            $mode = $mode ? $mode : self::$mode;
            define('PHALCON_MODE', $mode);
        }
 
        switch (self::getMode()) {
            case self::MODE_PRODUCTION:
            case self::MODE_STAGING:
                error_reporting(0);
                break;
            case self::MODE_TEST:
            case self::MODE_DEVELOPMENT:
                ini_set('display_errors', 'On');
                error_reporting(E_ALL);
                break;
        }
    }
 
    /**
     * Register the services here to make them general or register in
     * the ModuleDefinition to make them module-specific.
     */
    protected function _registerServices()
    {
        $defaultModule = self::$DEFAULT_MODULE;
        $modules = $this->modules;
        $config = include __DIR__.'/../config/config.php';
        $env_config = include __DIR__.'/../config/config_'.ENVIRONMENT.'.php';
        $config->merge($env_config);
 
        $di = new \Phalcon\DI\FactoryDefault();
 
        include __DIR__.'/../config/loader.php';
        include __DIR__.'/../config/services.php';
        include __DIR__.'/../config/routing.php';
 
        $this->setDI($di);
    }
 
    /**
     * Run the application.
     */
    public function main()
    {
        if (static::MODE_PRODUCTION === static::getMode()) {
            $this->mainProd();
        } else {
            $this->mainDev();
        }
    }
 
    private function getRequestUri()
    {
        if (!isset($_SERVER)) {
            return "/";
        }
        if (!is_array($_SERVER)) {
            return "/";
        }
        if (!isset($_SERVER['REQUEST_URI'])) {
            return "/";
        }
        return $_SERVER['REQUEST_URI'];
    }
 
    /**
     * Run the development environment.
     */
    private function mainDev()
    {
        (new \Phalcon\Support\Debug())->listen();
 
        $this->_registerServices();
        $this->registerModules($this->modules);
 
        $response = $this->handle($this->getRequestUri());
        $response->send();
    }
 
    /**
     * Run the production environment.
     */
    private function mainProd()
    {
        try {
            $this->registerModules($this->modules);
            $this->_registerServices();
 
            $response = $this->handle($this->getRequestUri());
            $response->send();
        } catch (\Exception $e) {
            $logger = new \Phalcon\Logger\Adapter\Stream(__DIR__.'/../logs/'.date('Y-m-d').'.log');
            $msg = "[".$_SERVER['SERVER_NAME']."] [".$_SERVER['REQUEST_URI']."] [".$e->getCode()."] ".$e->getMessage()." at ".$e->getFile()." (".$e->getLine().")";
            $msg .= "\n".$e->getTraceAsString();
            $logger->process(new \Phalcon\Logger\Item($msg, "error", 100));
            $logger->close();
 
            // remove view contents from buffer
            ob_clean();
 
            $errorCode = 500;
            $errorView = __DIR__.'/../public/errors/error.html';
 
            if (401 === $e->getCode()) {
                // 401 UNAUTHORIZED
                $errorCode = 401;
            } elseif (403 === $e->getCode()) {
                // 403 FORBIDDEN
                $errorCode = 403;
            } elseif (404 === $e->getCode()
                || $e instanceof Phalcon\Mvc\View\Exception
                || $e instanceof Phalcon\Mvc\Dispatcher\Exception) {
                // 404 NOT FOUND
                $errorCode = 404;
            }
 
            // Get error view contents. Since we are including the view
            // file here you can use PHP and local vars inside the error view.
            ob_start();
            include_once $errorView;
            $contents = ob_get_contents();
            ob_end_clean();
 
            // send view to header
            $response = $this->getDI()->getShared('response');
            $response->resetHeaders()
                ->setStatusCode($errorCode, null)
                ->setContent($contents)
                ->send()
            ;
 
            /**
             * We try to register in MongoDB the error to be able to
             * track it in backoffice and/or receive emails
             */
            try {
                $system_log_manager = $this->getDI()->get('system_log_manager');
                if ($errorCode == 500) {
                    $system_log_manager->createError([
                        'ip' => $_SERVER['SERVER_ADDR'],
                        'host' => $_SERVER['SERVER_NAME'],
                        'process' => 'php-fpm',
                        'message' => $e->getMessage(),
                        'file' => $e->getFile(),
                        'line' => $e->getLine(),
                    ]);
                } else {
                    $system_log_manager->createWarning([
                        'ip' => $_SERVER['SERVER_ADDR'],
                        'host' => $_SERVER['SERVER_NAME'],
                        'process' => 'php-fpm',
                        'message' => $e->getMessage(),
                        'file' => $e->getFile(),
                        'line' => $e->getLine(),
                    ]);
                }
            } catch (\Exception $e) {
            }
        }
    }
 
    public function slowLog($t)
    {
        $config = $this->getDI()->get('config');
        $irc_manager = $this->getDI()->get('inspircd_irc_manager');
        $server = gethostname() ? gethostname() : 'unknown';
        $uri = "https://".$_SERVER['SERVER_NAME'].$_SERVER['REQUEST_URI'];
        $msg = "\x02[SLOWLOG] [".str_pad($server, 6, " ", STR_PAD_LEFT)."] [".str_pad(round($t, 1), 5, " ", STR_PAD_LEFT)."s] PATH=\x02 ".$_SERVER['REQUEST_URI']
            ."\x02 TYPE=\x02 ".$_SERVER['REQUEST_METHOD']."\x02 URI=\x02 ".$uri;
        $irc_manager->privmsgOrderEnqueue('AAAAAI', $config->irc->debug_channel, $msg);
    }
 
    /**
     * Get the current mode.
     *
     * @return string
     */
    public static function getMode()
    {
        return self::$mode;
    }
}
#4Application->main
/srv/ChatHispanoEngine/releases/94/public/index.php (13)
<?php
 
date_default_timezone_set('Europe/Madrid');
 
require_once __DIR__.'/../vendor/autoload.php';
require_once __DIR__.'/../apps/Application.php';
 
if (isset($_SERVER['PHALCON_APP'])) {
    $app = new Application($_SERVER['PHALCON_APP']);
} else {
    $app = new Application('web');
}
$app->main();
 
try {
    $t = microtime(true) - $_SERVER["REQUEST_TIME_FLOAT"];
    if ($t > 6) {
        $app->slowLog($t);
    }
} catch (\Exception $e) {
}
KeyValue
_url/soporte/
KeyValue
USERwww-data
HOME/var/www
HTTP_CONNECTIONclose
HTTP_X_FORWARDED_FOR34.239.176.54
HTTP_X_FORWARDED_PROTOhttp
HTTP_HOSTtest.chathispano.com
HTTP_ACCEPT_ENCODINGbr,gzip
HTTP_ACCEPT_LANGUAGEen-US,en;q=0.5
HTTP_ACCEPTtext/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
HTTP_USER_AGENTCCBot/2.0 (https://commoncrawl.org/faq/)
DISABLE_ANTEVENIO0
DISABLE_MOBUSI0
DISABLE_MASSARIUS0
DISABLE_RELATEDCONTENT0
DISABLE_ADSENSE0
ADS_DEFER0
PHALCON_APPweb
CHATHISPANOENGINE_REVISIONdevelopment
CHATHISPANOENGINE_INSTANCEvirtualbox
SCRIPT_FILENAME/srv/ChatHispanoEngine/releases/94/public/index.php
PATH_TRANSLATED/srv/ChatHispanoEngine/current/public
PATH_INFO
REDIRECT_STATUS200
SERVER_NAMEtest.chathispano.com
SERVER_PORT80
SERVER_ADDR10.234.61.101
REMOTE_USER
REMOTE_PORT46128
REMOTE_ADDR10.234.61.52
SERVER_SOFTWAREnginx/1.22.1
GATEWAY_INTERFACECGI/1.1
REQUEST_SCHEMEhttp
SERVER_PROTOCOLHTTP/1.1
DOCUMENT_ROOT/srv/ChatHispanoEngine/releases/94/public
DOCUMENT_URI/index.php
REQUEST_URI/soporte/
SCRIPT_NAME/index.php
CONTENT_LENGTH
CONTENT_TYPE
REQUEST_METHODGET
QUERY_STRING_url=/soporte/
FCGI_ROLERESPONDER
PHP_SELF/index.php
REQUEST_TIME_FLOAT1718819870.5004
REQUEST_TIME1718819870
#Path
0/srv/ChatHispanoEngine/releases/94/public/index.php
1/srv/ChatHispanoEngine/releases/94/vendor/autoload.php
2/srv/ChatHispanoEngine/releases/94/vendor/composer/autoload_real.php
3/srv/ChatHispanoEngine/releases/94/vendor/composer/platform_check.php
4/srv/ChatHispanoEngine/releases/94/vendor/composer/ClassLoader.php
5/srv/ChatHispanoEngine/releases/94/vendor/composer/include_paths.php
6/srv/ChatHispanoEngine/releases/94/vendor/composer/autoload_static.php
7/srv/ChatHispanoEngine/releases/94/vendor/amphp/amp/lib/functions.php
8/srv/ChatHispanoEngine/releases/94/vendor/amphp/amp/lib/Internal/functions.php
9/srv/ChatHispanoEngine/releases/94/vendor/symfony/polyfill-mbstring/bootstrap.php
10/srv/ChatHispanoEngine/releases/94/vendor/symfony/polyfill-mbstring/bootstrap80.php
11/srv/ChatHispanoEngine/releases/94/vendor/react/promise/src/functions_include.php
12/srv/ChatHispanoEngine/releases/94/vendor/react/promise/src/functions.php
13/srv/ChatHispanoEngine/releases/94/vendor/amphp/byte-stream/lib/functions.php
14/srv/ChatHispanoEngine/releases/94/vendor/symfony/polyfill-ctype/bootstrap.php
15/srv/ChatHispanoEngine/releases/94/vendor/symfony/polyfill-ctype/bootstrap80.php
16/srv/ChatHispanoEngine/releases/94/vendor/symfony/polyfill-intl-grapheme/bootstrap.php
17/srv/ChatHispanoEngine/releases/94/vendor/symfony/polyfill-intl-normalizer/bootstrap.php
18/srv/ChatHispanoEngine/releases/94/vendor/symfony/polyfill-intl-normalizer/bootstrap80.php
19/srv/ChatHispanoEngine/releases/94/vendor/symfony/polyfill-php80/bootstrap.php
20/srv/ChatHispanoEngine/releases/94/vendor/symfony/string/Resources/functions.php
21/srv/ChatHispanoEngine/releases/94/vendor/amphp/process/lib/functions.php
22/srv/ChatHispanoEngine/releases/94/vendor/amphp/serialization/src/functions.php
23/srv/ChatHispanoEngine/releases/94/vendor/amphp/sync/src/functions.php
24/srv/ChatHispanoEngine/releases/94/vendor/amphp/sync/src/ConcurrentIterator/functions.php
25/srv/ChatHispanoEngine/releases/94/vendor/myclabs/deep-copy/src/DeepCopy/deep_copy.php
26/srv/ChatHispanoEngine/releases/94/vendor/symfony/var-dumper/Resources/functions/dump.php
27/srv/ChatHispanoEngine/releases/94/vendor/daverandom/libdns/src/functions.php
28/srv/ChatHispanoEngine/releases/94/vendor/phpunit/phpunit/src/Framework/Assert/Functions.php
29/srv/ChatHispanoEngine/releases/94/vendor/psy/psysh/src/functions.php
30/srv/ChatHispanoEngine/releases/94/vendor/symfony/polyfill-php81/bootstrap.php
31/srv/ChatHispanoEngine/releases/94/vendor/amphp/dns/lib/functions.php
32/srv/ChatHispanoEngine/releases/94/vendor/mongodb/mongodb/src/functions.php
33/srv/ChatHispanoEngine/releases/94/vendor/swiftmailer/swiftmailer/lib/swift_required.php
34/srv/ChatHispanoEngine/releases/94/vendor/swiftmailer/swiftmailer/lib/classes/Swift.php
35/srv/ChatHispanoEngine/releases/94/apps/Application.php
36/srv/ChatHispanoEngine/releases/94/config/config.php
37/srv/ChatHispanoEngine/releases/94/config/config_staging.php
38/srv/ChatHispanoEngine/releases/94/config/loader.php
39/srv/ChatHispanoEngine/releases/94/config/services.php
40/srv/ChatHispanoEngine/releases/94/config/managers.php
41/srv/ChatHispanoEngine/releases/94/config/routing.php
42/srv/ChatHispanoEngine/releases/94/apps/Web/config/routing.php
43/srv/ChatHispanoEngine/releases/94/apps/Web/Module.php
44/srv/ChatHispanoEngine/releases/94/apps/Web/config/config.php
45/srv/ChatHispanoEngine/releases/94/apps/Web/config/services.php
46/srv/ChatHispanoEngine/releases/94/apps/Web/config/managers.php
Memory
Usage12582912