mysqli::__construct(): (HY000/1045): Access denied for user 'root'@'localhost' (using password: YES)
/srv/http/dev/studiopl/vendor/Onion/Database/MySQL.php
https://88.212.45.6/studiopl/public_html/ (GET)
Mozilla/5.0 (Windows NT 10.0; rv:68.0) Gecko/20100101 Firefox/68.0
209 }210211 /**212 * Pripojenie k databázovému serveru213 *214 * @return void215 */216 private function connect()217 {218 $hash = sha1($this->host.$this->user.$this->password.$this->database);219220 if (isset($this->connections[$hash]) === true) {221 $this->mysqli = $this->connections[$hash];222223 if (@$this->mysqli->ping() === true) {224 return;225 }226 }227228 $mysqli = new \mysqli($this->host, $this->user, $this->password, $this->database, $this->port, $this->socket);229230 if ($mysqli->connect_error === false) {231 throw new \Onion\Database\DatabaseException($mysqli->connect_error, $mysqli->connect_errno);232 }233234 if ($mysqli->set_charset('utf8') === false) {235 throw new \Onion\Database\DatabaseException($mysqli->connect_error, $mysqli->connect_errno);236 }237238 $this->mysqli = $mysqli;
209 }210211 /**212 * Pripojenie k databázovému serveru213 *214 * @return void215 */216 private function connect()217 {218 $hash = sha1($this->host.$this->user.$this->password.$this->database);219220 if (isset($this->connections[$hash]) === true) {221 $this->mysqli = $this->connections[$hash];222223 if (@$this->mysqli->ping() === true) {224 return;225 }226 }227228 $mysqli = new \mysqli($this->host, $this->user, $this->password, $this->database, $this->port, $this->socket);229230 if ($mysqli->connect_error === false) {231 throw new \Onion\Database\DatabaseException($mysqli->connect_error, $mysqli->connect_errno);232 }233234 if ($mysqli->set_charset('utf8') === false) {235 throw new \Onion\Database\DatabaseException($mysqli->connect_error, $mysqli->connect_errno);236 }237238 $this->mysqli = $mysqli;
array ( 0 => 'localhost', 1 => 'root', 2 => 'H0bbit0', 3 => 'studiopl', 4 => '3306', 5 => 'NULL', )
233234 if ($mysqli->set_charset('utf8') === false) {235 throw new \Onion\Database\DatabaseException($mysqli->connect_error, $mysqli->connect_errno);236 }237238 $this->mysqli = $mysqli;239240 $this->connections[$hash] = $mysqli;241 }242243 /**244 * Nastavenie mena tabuľky s ktorou sa bude pracovať a nastavenie jej väzieb245 * s inými tabuľkami a jej stĺpcov a zresetovanie ostatných parametrov objektu246 *247 * @param string meno tabuľky248 * @return object Database pre fluent interface249 */250 public function table($table)251 {252 $this->connect();253254 $this->table = $table;255256 if ($this->relations === null) {257 $this->relations = $this->getRelations();258 }259260 if (isset($this->relations[$table]) === true) {261 $this->tableRelations = $this->relations[$table];262
array ( )
23 namespace onionCMS\Core\Libs;45 class Configuration6 {7 private $db;8910 private $keys;111213 private $indexModuleGroupKey = array();141516 public function __construct($db)17 {18 $this->db = $db;1920 $this->keys = $this->db21 ->table('configuration')22 ->orderBy('module', 'ASC')23 ->orderBy('group', 'ASC')24 ->orderBy('order', 'ASC')25 ->columns(26 'module as module_id',27 'module.name as module',28 'group',29 'key',30 'value',31 'type',
array ( 0 => 'configuration', )
51 $arg = $this->services->getService($parts[0]);52 if (count($parts) > 1) {53 eval('$arg = $arg->'.$parts[1].';');54 }55 } elseif (substr($dep, 0, 8) === 'factory@') {56 $arg = $this->services->getService($dep);5758 } else {59 $arg = $dep;60 }61 $arguments[] = $arg;62 } else {63 $arguments[] = $dep;64 }65 }6667 if (method_exists($this->class, '__construct') === false) {68 $object = new $this->class;69 } else {70 $object = $rc->newInstanceArgs($arguments);71 }7273 foreach ($this->properties as $property => $value) {74 if ($dep instanceof ServiceBuilder) {75 $value = $value->create();7677 } elseif (is_string($value) === true) {78 if (isset($dep[0]) === true79 AND $dep[0] === '@') {80
array ( 0 => array ( 0 => 'object (Onion\\Database\\MySQL)', ), )
69 }707172 public function getService($name, $deps = null)73 {74 if (substr($name, 0, 8) === 'factory@') {75 $name = substr($name, 8);76 return $this->factory[$name];77 }7879 if (isset($this->objects[$name]) === false) {80 throw new \InvalidArgumentException('Service "'.$name.'" is not registered!');81 }8283 if (is_array($deps) === true) {84 return call_user_func_array(array($this->factory[$name], 'create'), $deps);85 }8687 if ($this->objects[$name] instanceof \Onion\DI\Factory) {88 $this->objects[$name] = $this->objects[$name]->create();89 }9091 return $this->objects[$name];92 }939495 public function serviceExists($name)96 {97 return isset($this->objects[$name]);98 }
array ( )
84 return call_user_func_array(array($this->factory[$name], 'create'), $deps);85 }8687 if ($this->objects[$name] instanceof \Onion\DI\Factory) {88 $this->objects[$name] = $this->objects[$name]->create();89 }9091 return $this->objects[$name];92 }939495 public function serviceExists($name)96 {97 return isset($this->objects[$name]);98 }99100101 public function __get($name)102 {103 return $this->getService($name);104 }105 }
array ( 0 => 'configuration', )
400401 $_SESSION['logged_as_admin'] = true;402 }403404 if ($this->app->user->isLoggedIn() === false405 or $this->app->user->isInGroup($this->app->currentRoute->groups) === false) {406407 $this->app->actionName = 'form';408 if ($this->isAdminUrl === true) {409 $this->app->controllerName = '\onionCMS\Core\Controllers\AdminLoginController';410 } else {411 $this->app->controllerName = 'Login';412 }413 }414 }415416417 public function loadConfiguration()418 {419 foreach ($this->services->configuration->getKeys() as $key) {420 $i = array();421 $i[] = strtolower($key['module']);422 if (empty($key['group']) === false) {423 $i[] = $key['group'];424 }425 $i[] = $key['key'];426 $i = implode('.', $i);427428 $this->app->configuration[$i] = $key['value'];429 }
array ( 0 => 'configuration', )
23 public $commonAssets;2425 public $printAssets;2627 public $modulesLibs = array();2829 public function __construct($services)30 {31 $this->services = $services;32 $this->app = $services->app;3334 $this->cache = $services->cache;3536 spl_autoload_register(array($this, 'loader'));37 }383940 public function init()41 {42 $this->loadConfiguration();4344 // Nastavenie hlavičky pre IE45 $this->app->response->addHeader('X-UA-Compatible', 'IE=edge,chrome=1');4647 $this->languages = $this->services->db48 ->table('languages')49 ->where('show', true)50 ->select()51 ->fetchAssoc('code');52
array ( )
388389 if ($hook[0][0] === '@') {390 $serviceName = substr($hook[0], 1);391 $hook[0] = $this->container->$serviceName;392393 } else {394 $hook[0] = new $hook[0]($this);395 }396 }397398 $parameters = (array) $this->parameters;399 if (empty($hook[2]) === false) {400 $parameters = array_merge((array) $hook[2], $parameters);401 }402403 if (is_string($hook) === true) {404 call_user_func_array($hook, $parameters);405406 } else {407 call_user_func_array(array($hook[0], $hook[1]), $parameters);408 }409 }410 }411412413 /**414 * Presmerovanie požiadavky415 *416 * @param string|null adresa kam presmerovať, ak je null presmeruje sa na aktuálnu adresu417 * @param int HTTP kód
array ( 0 => array ( 0 => 'object (onionCMS\\Core\\Libs\\onionCMS)', 1 => 'init', ), 1 => array ( ), )
99 $this->container->addService('router', '\Onion\Application\Router', array($this->request, $routeFactory));100 $this->router = $this->container->getFactory('router')->create();101102 $this->configure($configuration);103 $this->container->addService('app', $this);104105 $escape = new \Onion\Templating\Escape;106 $this->container->addService('escape', $escape);107 $view = new \Onion\Templating\View($this->container);108 $this->container->addService('view', $view);109110 $this->container->addServices($configuration['system.services']);111 }112113 /**114 * Spustenie aplikácie115 */116 public function run()117 {118 $this->runHooks('system.hooks.onStart');119120 $this->currentRoute = $this->router->findCurrentRoute();121122 if ($this->currentRoute === null) {123 $this->notFound('Not found!');124 }125126 $this->startSession();127128 $this->runHooks('system.hooks.beforeCreateController');
array ( 0 => array ( 0 => array ( 0 => '@onionCMS', 1 => 'init', ), ), )
130 WWW_DIR.'/js/jquery.dropotron.min.js',131 WWW_DIR.'/js/skel.min.js',132 //WWW_DIR.'/js/respond.min.js',133 WWW_DIR.'/js/util.js',134 WWW_DIR.'/js/main.js',135 ),136 'less' => array(137 //WWW_DIR.'/less/main.less'138 ),139 'css' => array(140 WWW_DIR.'/scss/main.css',141 //WWW_DIR.'/scss/paginator.scss'142 )143 )144 )145 );146147 $app = new \Onion\Application($configuration);148149 $app->run();150 exit;
array ( )
1213 // absolute filesystem path to the libraries14 define('LIBS_DIR', realpath(WWW_DIR.'/../vendor'));1516 // absolute filesystem path to the web root17 define('ONION_DIR', LIBS_DIR.'/Onion');1819 // absolute filesystem path to the application root20 define('APP_DIR', WWW_DIR.'/../app');2122 // absolute filesystem path to the temporary files23 define('TEMP_DIR', realpath(WWW_DIR.'/../temp'));2425 // absolute filesystem path to the cache26 define('CACHE_DIR', realpath(WWW_DIR.'/../cache'));2728 define('ONIONCMS_DIR', realpath(ONION_DIR.'/../onionCMS'));2930 // load bootstrap file31 require ONIONCMS_DIR.'/bootstrap.php';
array ( 0 => '/srv/http/dev/studiopl/vendor/onionCMS/bootstrap.php', )
array ( 'USER' => 'http', 'HOME' => '/srv/http', 'SCRIPT_NAME' => '/studiopl/public_html/index.php', 'REQUEST_URI' => '/studiopl/public_html/', 'QUERY_STRING' => '', 'REQUEST_METHOD' => 'GET', 'SERVER_PROTOCOL' => 'HTTP/1.1', 'GATEWAY_INTERFACE' => 'CGI/1.1', 'REMOTE_PORT' => '44402', 'SCRIPT_FILENAME' => '//srv/http/dev/studiopl/public_html/index.php', 'SERVER_ADMIN' => 'webmaster@webstranky.net', 'CONTEXT_DOCUMENT_ROOT' => '/srv/http/dev', 'CONTEXT_PREFIX' => '', 'REQUEST_SCHEME' => 'https', 'DOCUMENT_ROOT' => '/srv/http/dev', 'REMOTE_ADDR' => '35.187.190.226', 'SERVER_PORT' => '443', 'SERVER_ADDR' => '192.168.1.10', 'SERVER_NAME' => '88.212.45.6', 'SERVER_SOFTWARE' => 'Apache/2.4.46 (Unix) OpenSSL/1.1.1i', 'SERVER_SIGNATURE' => '', 'PATH' => '/usr/local/sbin:/usr/local/bin:/usr/bin', 'HTTP_X_DATADOG_SAMPLING_PRIORITY' => '1', 'HTTP_X_DATADOG_PARENT_ID' => '15544467312503410229', 'HTTP_X_DATADOG_TRACE_ID' => '9021187959826209072', 'HTTP_COOKIE' => 'PHPSESSID=tub9lbttomjq7huuav0kou775e', 'HTTP_CONNECTION' => 'keep-alive', 'HTTP_ACCEPT' => '*/*', 'HTTP_ACCEPT_ENCODING' => 'gzip, deflate', 'HTTP_USER_AGENT' => 'Mozilla/5.0 (Windows NT 10.0; rv:68.0) Gecko/20100101 Firefox/68.0', 'HTTP_HOST' => '88.212.45.6', 'proxy-nokeepalive' => '1', 'HTTPS' => 'on', 'FCGI_ROLE' => 'RESPONDER', 'PHP_SELF' => '/studiopl/public_html/index.php', 'REQUEST_TIME_FLOAT' => 1611853637.349732, 'REQUEST_TIME' => 1611853637, )