DibiDriverException #2013

Lost connection to MySQL server at 'reading initial communication packet', system error: 0

Source file

File: /var/www/kreatura/data/www/watchdeluxe.sk/www/libs/dibi/drivers/mysql.php   Line: 105

Line  98:                    $this->connection = @mysql_connect($host$config['username'], $config['password'], TRUE$config['options']); // intentionally @
Line  99:                } else {
Line 100:                    $this->connection = @mysql_pconnect($host$config['username'], $config['password'], $config['options']); // intentionally @
Line 101:                }
Line 102:            }
Line 103:    
Line 104:            if (!is_resource($this->connection)) {
Line 105:                throw new DibiDriverException(mysql_error(), mysql_errno());
Line 106:            }
Line 107:    
Line 108:            if (isset($config['charset'])) {
Line 109:                $ok FALSE;
Line 110:                if (function_exists('mysql_set_charset')) {
Line 111:                    // affects the character set used by mysql_real_escape_string() (was added in MySQL 5.0.7 and PHP 5.2.3)
Line 112:                    $ok = @mysql_set_charset($config['charset'], $this->connection); // intentionally @

Call stack

  1. libs/DibiConnection.php (124) source   DibiMySqlDriver-> connect (arguments )

  2. libs/DibiConnection.php (235) source   DibiConnection-> connect ()

  3. dibi/dibi.php (287) source   DibiConnection-> query (arguments )

  4. app/bootstrap.php (40) source   dibi:: query (arguments )

  5. www/index.php (14) source   require (arguments )

Nette Application

Environment

HTTP request

HTTP response