Unhandled exception: Ponkrac\MysqlQueryException

Unhandled exception: Ponkrac\MysqlQueryException
MESSAGEMySQL connection: SQL query execution has failed.
mysql_errno1062
mysql_errstrDuplicate entry '\x12\xBFUb' for key 'ux$ipv4_address'
sql_stringINSERT INTO http_ipv4_list(ipv4_address) VALUES(X'12BF5562')
sqlstate23000


Exception class inheritance tree
#5class Ponkrac\MysqlQueryException
#4class Ponkrac\MysqlServerException
#3class Ponkrac\MysqlException
#2class Ponkrac\Exception
#1class Exception


Call stack item #0
METHOD
public Ponkrac\MysqlQueryException->__construct (???)
FILE/srv/www/users/10033/ponkrac.net/slovnik/Libs/Ponkrac/lib_ponkrac_mysql_driver.php (line 290)
 280:             {
 281:                 $message = "MySQL connection: SQL query execution has failed.";
 282:                 $exception_data_info =
 283:                 [
 284:                     "message"       => $message,
 285:                     "sqlstate"      => $this->_mysqli_object->sqlstate,
 286:                     "mysql_errno"   => (string)$this->_mysqli_object->errno,
 287:                     "mysql_errstr"  => $this->_mysqli_object->error,
 288:                     "sql_string"    => $sql_string
 289:                 ];
 290:                 throw new MysqlQueryException($message, $exception_data_info);
 291:             }
 292:         }
 293:         elseif ($php_query_result instanceof \mysqli_result)
 294:         {
 295:             $new_mysql_data_recordset = new MysqlDataRecordset($this, $php_query_result, $sql_string);


Call stack item #1
METHOD
public Ponkrac\MysqlConnection->exec (Ponkrac\String)
FILE/srv/www/users/10033/ponkrac.net/slovnik/Libs/Ponkrac/lib_ponkrac_http_bootstrap.php (line 279)
 269:             $data_row = $mysql_connection->exec($select_sql_cmd)->fetchRow();
 270:             if (\is_object($data_row))
 271:                 $remote_http_ipv4_id = $data_row->toInt4("http_ipv4_id");
 272:             else
 273:             {
 274:                 $insert_sql_cmd = $mysql_connection->formatSql
 275:                 (
 276:                     "INSERT INTO http_ipv4_list(ipv4_address) VALUES(%X)",
 277:                     [$remote_ip_address->toByteArray()]
 278:                 );
 279:                 $mysql_connection->exec($insert_sql_cmd);
 280:
 281:                 $data_row = $mysql_connection->exec($select_sql_cmd)->fetchRow();
 282:                 if (!\is_object($data_row))
 283:                     throw new HttpBootstrapFailed("Ipv4 address is not in list.");
 284:                 $remote_http_ipv4_id = $data_row->toInt4("http_ipv4_id");


Call stack item #2
METHOD
private static Ponkrac\_HttpZeroBootstrapController::_process_RemoteIp (Ponkrac\MysqlConnection, Ponkrac\IpAddress)
FILE/srv/www/users/10033/ponkrac.net/slovnik/Libs/Ponkrac/lib_ponkrac_http_bootstrap.php (line 129)
 119:         $controller_context["mysql_connection"] = $mysql_connection;
 120:
 121:     /*  ~~~ Get http_home. ~~~  */
 122:
 123:         $http_home = self::_process_HttpHome($mysql_connection, $config_param_array);
 124:         $controller_context["http_home"] = $http_home;
 125:
 126:     /*  ~~~ Get http_ipv4_id and http_ipv6_id. ~~~  */
 127:
 128:         $remote_ip_address = $http_request->getRemoteIp();
 129:         list($remote_http_ipv4_id, $remote_http_ipv6_id) = self::_process_RemoteIp($mysql_connection, $remote_ip_address);
 130:         $controller_context["remote_http_ipv4_id"] = $remote_http_ipv4_id;
 131:         $controller_context["remote_http_ipv6_id"] = $remote_http_ipv6_id;
 132:
 133:     /*  ~~~ Process http_global_session ~~~  */
 134:


Call stack item #3
METHOD
public Ponkrac\_HttpZeroBootstrapController->processHttpRequest (array)
FILE/srv/www/users/10033/ponkrac.net/slovnik/Libs/Ponkrac/lib_ponkrac_http_zero_bootstrap.php (line 41)
  31:
  32:         $php_http_request = PhpHttpRequestMessage::s_getInstance();
  33:         $php_http_response = PhpHttpResponseMessage::s_getInstance();
  34:
  35:         $controller_context =
  36:         [
  37:             "http_request"      => $php_http_request,
  38:             "http_response"     => $php_http_response
  39:         ];
  40:
  41:         $http_zero_controller->processHttpRequest($controller_context);
  42:
  43:     }
  44:     catch (\Exception $exception_object)
  45:     {
  46:         throw $exception_object;


Call stack item #4
METHOD
Ponkrac\processHttpZeroBootstrap (Ponkrac\_HttpZeroBootstrapController)
FILE/srv/www/users/10033/ponkrac.net/slovnik/Libs/Ponkrac/lib_ponkrac_http_bootstrap.php (line 437)
 427:     }
 428: }
 429:
 430: //############################################################################################################
 431: //### Bootstrap function.
 432: //############################################################################################################
 433:
 434: function processHttpBootstrap(IHttpController $http_controller, array $config_param_array)
 435: {
 436:     $http_zero_controller = new _HttpZeroBootstrapController($http_controller, $config_param_array);
 437:     processHttpZeroBootstrap($http_zero_controller);
 438: }
 439:
 440: //############################################################################################################
 441: //### Class HttpController.
 442: //############################################################################################################


Call stack item #5
METHOD
Ponkrac\processHttpBootstrap (HttpRouter\HttpFrontRouter, array)
FILE/srv/www/users/10033/ponkrac.net/slovnik/Routers/HttpRouter.php (line 124)
 114: }
 115:
 116: //############################################################################################################
 117:
 118: function _main_()
 119: {
 120:     $config_param_array = $GLOBALS["config_param_array"];
 121:     unset($GLOBALS["config_param_array"]);
 122:
 123:     $http_front_router = new HttpFrontRouter();
 124:     \Ponkrac\processHttpBootstrap($http_front_router, $config_param_array);
 125: }
 126:
 127: _main_();
 128:
 129: //############################################################################################################


Call stack item #6
METHOD
HttpRouter\_main_ ()
FILE/srv/www/users/10033/ponkrac.net/slovnik/Routers/HttpRouter.php (line 127)
 117:
 118: function _main_()
 119: {
 120:     $config_param_array = $GLOBALS["config_param_array"];
 121:     unset($GLOBALS["config_param_array"]);
 122:
 123:     $http_front_router = new HttpFrontRouter();
 124:     \Ponkrac\processHttpBootstrap($http_front_router, $config_param_array);
 125: }
 126:
 127: _main_();
 128:
 129: //############################################################################################################
 130:
 131: ?>
 132: