$e PDOException (8) "SQLSTATE[HY000] [1045] Access denied for user 'admin'@'172.31.12.116' (using...
  • Source
  • Properties (8)
  • Available methods (10)
  • try {
    if ($database == "master") {
    if (!empty($this->connections['master'])) {
    return true;
    }
    $this->connections['master'] = new \PDO(
    'mysql:host=' . DATABASE_MASTER_HOST . ';dbname=' . DATABASE_MASTER_DATABASE . ";charset=utf8",
    DATABASE_MASTER_USERNAME,
    DATABASE_MASTER_PASSWORD,
    $databaseOptions
    );
    } else {
    if (!empty($this->connections["$database"])) {
  • protected message -> string (91) "SQLSTATE[HY000] [1045] Access denied for user 'admin'@'172.31.12.116' (using...
    SQLSTATE[HY000] [1045] Access denied for user 'admin'@'172.31.12.116' (using password: YES)
    
    private string -> string (0) ""
    protected code -> integer 1045
    protected file -> string (52) "/home/users/panda/framework.panda/Panda/Database.php"
    • File (19.21KB)
    • -rw-rw-r-- 1002 1002 19.21KB Oct 03 17:48 /home/users/panda/framework.panda/Panda/Database.php
      
    protected line -> integer 71
    private trace -> Debug Backtrace (13)
    .../Panda/Database.php:71 PDO->__construct(string $dsn, string $username = null, string $password = null, array $options = null)
    • Source
    • try {
      if ($database == "master") {
      if (!empty($this->connections['master'])) {
      return true;
      }
      $this->connections['master'] = new \PDO(
      'mysql:host=' . DATABASE_MASTER_HOST . ';dbname=' . DATABASE_MASTER_DATABASE . ";charset=utf8",
      DATABASE_MASTER_USERNAME,
      DATABASE_MASTER_PASSWORD,
      $databaseOptions
      );
      } else {
      if (!empty($this->connections["$database"])) {
    .../Panda/Database.php:199 Panda\Database->connect($database, $errorCount0)
    • Source
    • if (!empty($return) && !is_array($return)) {
      return $return;
      }
      }
      $this->logQuery($database, [$query, $vars]);
      $this->connect($database);
      $prepared = $this->connections["$database"]->prepare($query);
      if (!$prepared) {
      return;
      }
      $prepared->execute($vars);
      $row = $prepared->fetchAll(\PDO::FETCH_ASSOC);
    .../Panda/Database.php:480 Panda\Database->single($database, $query = null, $vars = array(), $options = array())
    • Source
    • if (preg_match("/insert /i", $query) || preg_match("/update /i", $query) || preg_match("/replace /i", $query)) {
      $options['master'] = 1;
      }
      if (empty($options['master']) && empty($options['force']) && empty($options['parent'])) {
      return $this->single("masterReplica",$query,$vars,$options);
      }
      return $this->single("master",$query,$vars,$options);
      }
      /**
      * master_multi function.
      *
    .../Panda/Main.php:1128 Panda\Database->master_single($query = null, $vars = array(), $options = array())
    • Source
    • if ($ip == "localhost") {
      $ip = "127.0.0.1";
      return [];
      }
      $query = "select info from ipCache where ip = ? and timestamp > ?";
      $info = $this->db->master_single($query, [$ip, max(GEO_IP_UPDATE_TIME, (time() - (time() % 3600)) - 30 * 86400)], ['cached' => true]);
      if (!empty($info) && is_string($info)) {
      $info = json_decode($info, true);
      return $info;
      }
    .../Panda/Main.php:117 Panda\Main->ipInfo($ip = null)
    • Source
    • $this->mobileDetect = new \Mobile_Detect();
      // contry code setting
      $this->countryCode = null; // $_SERVER['HTTP_CF_IPCOUNTRY'] ?? $_SERVER['HTTP_X_GEO'] ?? null;
      $this->regionCode = null; // $_SERVER['HTTP_CF_IPREGION'] ?? $_SERVER['HTTP_X_GEO_REGION'] ?? null;
      if (empty($this->countryCode)) {
      \Panda\Template::data("setIP", $this->ip());
      $temp = $this->ipInfo();
      if (!empty($temp['country']['iso_code'])) {
      $this->countryCode = $temp['country']['iso_code'];
      }
      if (!empty($temp['subdivisions'][0]['iso_code'])) {
      $this->regionCode = $temp['subdivisions'][0]['iso_code'];
      }
      }
    .../Panda/Main.php:236 Panda\Main->doConstruct()
    • Source
    • */
      public static function init() {
      #echo "maintenance";
      #exit;
      if (null === self::$instance) {
      self::$instance = new self();
      # make sure this only ever happens once
      self::$instance->doConstruct();
      }
      return self::$instance;
      }
      /**
    .../Panda/Template.php:42 Panda\Main::init()
    • Source
    • * @return void
      */
      public function __construct() {
      # Twig constructor moved to doProcess
      if (!self::$twig) {
      # let's set some defaults
      $main = \Panda\Main::init();
      if (!empty($main->domain)) {
      $this->setVar("domain", $main->domain);
      }
      if (!empty($main->primaryDomain)) {
      $this->setVar("primaryDomain", $main->primaryDomain);
    .../Panda/Template.php:104 Panda\Template->__construct()
    • Source
    • *
      * @access public
      * @static
      * @return the singleton copy of \Panda\Main
      */
      public static function init() {
      if (null === self::$instance) {
      self::$instance = new self();
      }
      return self::$instance;
      }
      /**
    .../Panda/Template.php:1202 Panda\Template::init()
    • Source
    • * @return void
      */
      public static function data($var = null, $value = null) {
      if (!$var) {
      return;
      }
      $self = \Panda\Template::init();
      $data = $self->getVar("data");
      if (empty($data)) {
      $data = [];
      }
      if (is_array($var)) {
    .../Panda/Debug.php:65 Panda\Template::data($var = null, $value = null)
    • Source
    • if ($res['elapsed'] > 4 && php_sapi_name() !== 'cli') {
      if (!defined("PANDACUB") || \Panda\Template::get("viewDev") || \Panda\Template::getData("viewDev")) {
      // $query = "insert into randomLog(event,timestamp,data) values(?,?,?)";
      // $main = \Panda\Main::init();
      // $main->db->master_do($query, ['longrequest', microtime(true), json_encode(['server' => $_SERVER, 'fields' => \Panda\Query::fields(null, true),'debug' => $res], JSON_PRETTY_PRINT)]);
      }
      }
      \Panda\Template::data("pandaDebug", $res);
      return $res;
      }
      public static function reset($resetStart = false) {
      $self = \Panda\Debug::init();
      $self->events = [];
      $self->subEvent = null;
    .../Panda/Debug.php:82 Panda\Debug::output()
    • Source
    • }
      $self->lastTime = null;
      }
      public static function log($event) {
      $self = \Panda\Debug::init();
      $self->_log($event);
      return $self->output();
      }
      public static function sub($event) {
      $self = \Panda\Debug::init();
      if (empty($self->events)) {
      return $self->_log($event);
      }
    .../router.panda.tech/index.php:12 Panda\Debug::log($event)
    • Source
    • if ($_SERVER['SERVER_NAME'] == "api.pandacub.tech" || $_SERVER['SERVER_NAME'] == "api.cubpanda.com") {
      require_once(dirname(__FILE__) . "/../api.panda.tech/index.php");
      exit;
      }
      }
      require_once(dirname(__FILE__) . "/../framework.panda/loader.php");
      \Panda\Debug::log("ROUTER START");
      use \Panda\Main;
      use \Panda\Router;
      use \Panda\Template;
      # create main object
      $main = \Panda\Main::init();
    <ROOT>/index.php:2 require_once()
    • Source
    • Arguments
    • <?php
      require_once(dirname(__FILE__) . "/../index.php");
    • 0 => string (45) "/home/users/panda/router.panda.tech/index.php"
      • File (2.7KB)
      • -rw-rw-r-- 1002 1002 2.7KB Sep 22 09:01 /home/users/panda/router.panda.tech/index.php
        
    private previous -> null
    public errorInfo -> array (3)
    $e->errorInfo
    0 => string (5) "HY000"
    $e->errorInfo[0]
    1 => integer 1045
    $e->errorInfo[1]
    2 => string (68) "Access denied for user 'admin'@'172.31.12.116' (using password: YES)"
    $e->errorInfo[2]
  • public __construct(string $message = '', int $code0, Throwable $previous = null)
    new \PDOException(string $message = '', int $code0, Throwable $previous = null)
    public __wakeup()
    final public getMessage(): string
    $e->getMessage()
    final public getCode()
    $e->getCode()
    final public getFile(): string
    $e->getFile()
    final public getLine(): int
    $e->getLine()
    final public getTrace(): array
    $e->getTrace()
    final public getPrevious(): Throwable
    $e->getPrevious()
    final public getTraceAsString(): string
    $e->getTraceAsString()
    public __toString(): string
    (string) $e