Zend_Db_Adapter_Exception (2002)
SQLSTATE[HY000] [2002] No such file or directory Zend_Db_Adapter_Exception thrown with message "SQLSTATE[HY000] [2002] No such file or directory" Stacktrace: #16 Zend_Db_Adapter_Exception in /home/mydlazmarianky/live/releases/20170503134921/vendor/zendframework/zendframework1/library/Zend/Db/Adapter/Pdo/Abstract.php:144 #15 PDOException in /home/mydlazmarianky/live/releases/20170503134921/vendor/zendframework/zendframework1/library/Zend/Db/Adapter/Pdo/Abstract.php:129 #14 PDO:__construct in /home/mydlazmarianky/live/releases/20170503134921/vendor/zendframework/zendframework1/library/Zend/Db/Adapter/Pdo/Abstract.php:129 #13 Zend_Db_Adapter_Pdo_Abstract:_connect in /home/mydlazmarianky/live/releases/20170503134921/vendor/zendframework/zendframework1/library/Zend/Db/Adapter/Pdo/Mysql.php:111 #12 Zend_Db_Adapter_Pdo_Mysql:_connect in /home/mydlazmarianky/live/releases/20170503134921/vendor/buxus/legacy-base/buxus/includes/classes/db/buxus_db_adapter_mysql.php:19 #11 BuxusDB_Adapter_Mysql:_connect in /home/mydlazmarianky/live/releases/20170503134921/vendor/zendframework/zendframework1/library/Zend/Db/Adapter/Abstract.php:460 #10 Zend_Db_Adapter_Abstract:query in /home/mydlazmarianky/live/releases/20170503134921/vendor/zendframework/zendframework1/library/Zend/Db/Adapter/Pdo/Abstract.php:238 #9 Zend_Db_Adapter_Pdo_Abstract:query in /home/mydlazmarianky/live/releases/20170503134921/vendor/buxus/legacy-base/buxus/includes/classes/db/buxus_db_adapter_mysql.php:80 #8 BuxusDB_Adapter_Mysql:query in /home/mydlazmarianky/live/releases/20170503134921/vendor/zendframework/zendframework1/library/Zend/Db/Adapter/Abstract.php:828 #7 Zend_Db_Adapter_Abstract:fetchOne in /home/mydlazmarianky/live/releases/20170503134921/vendor/buxus/seourl-legacy/buxus/lib/seo_url/seo_url_base.class.php:1189 #6 SeoUrlBase:getPageType in /home/mydlazmarianky/live/releases/20170503134921/vendor/buxus/seourl-legacy/buxus/lib/seo_url/seo_url_base.class.php:1236 #5 SeoUrlBase:getSeoUrl in /home/mydlazmarianky/live/releases/20170503134921/vendor/buxus/seourl-legacy/buxus/lib/seo_url/seo_url_base.class.php:1392 #4 SeoUrlBase:createUrlForPage in /home/mydlazmarianky/live/releases/20170503134921/vendor/buxus/legacy-base/buxus/includes/generate_functions.php:245 #3 CreateUrlForPage in /home/mydlazmarianky/live/releases/20170503134921/vendor/buxus/seourl-legacy/buxus/lib/seo_url/seo_url_base.class.php:831 #2 SeoUrlBase:getPageId in /home/mydlazmarianky/live/releases/20170503134921/vendor/buxus/core/src/handler/generate_page.php:30 #1 include in /home/mydlazmarianky/live/releases/20170503134921/vendor/buxus/core/src/Buxus/Router/BuxusRouter.php:46 #0 Buxus\Router\BuxusRouter:dispatch in /home/mydlazmarianky/live/releases/20170503134921/public/buxus.php:7
Stack frames (17):
16 Zend_Db_Adapter_Exception
…/­vendor/­zendframework/­zendframework1/­library/­Zend/­Db/­Adapter/­Pdo/­Abstract.php144
15 PDOException
…/­vendor/­zendframework/­zendframework1/­library/­Zend/­Db/­Adapter/­Pdo/­Abstract.php129
14 PDO __construct
…/­vendor/­zendframework/­zendframework1/­library/­Zend/­Db/­Adapter/­Pdo/­Abstract.php129
13 Zend_Db_Adapter_Pdo_Abstract _connect
…/­vendor/­zendframework/­zendframework1/­library/­Zend/­Db/­Adapter/­Pdo/­Mysql.php111
12 Zend_Db_Adapter_Pdo_Mysql _connect
…/­vendor/­buxus/­legacy-base/­buxus/­includes/­classes/­db/­buxus_db_adapter_mysql.php19
11 BuxusDB_Adapter_Mysql _connect
…/­vendor/­zendframework/­zendframework1/­library/­Zend/­Db/­Adapter/­Abstract.php460
10 Zend_Db_Adapter_Abstract query
…/­vendor/­zendframework/­zendframework1/­library/­Zend/­Db/­Adapter/­Pdo/­Abstract.php238
9 Zend_Db_Adapter_Pdo_Abstract query
…/­vendor/­buxus/­legacy-base/­buxus/­includes/­classes/­db/­buxus_db_adapter_mysql.php80
8 BuxusDB_Adapter_Mysql query
…/­vendor/­zendframework/­zendframework1/­library/­Zend/­Db/­Adapter/­Abstract.php828
7 Zend_Db_Adapter_Abstract fetchOne
…/­vendor/­buxus/­seourl-legacy/­buxus/­lib/­seo_url/­seo_url_base.class.php1189
6 SeoUrlBase getPageType
…/­vendor/­buxus/­seourl-legacy/­buxus/­lib/­seo_url/­seo_url_base.class.php1236
5 SeoUrlBase getSeoUrl
…/­vendor/­buxus/­seourl-legacy/­buxus/­lib/­seo_url/­seo_url_base.class.php1392
4 SeoUrlBase createUrlForPage
…/­vendor/­buxus/­legacy-base/­buxus/­includes/­generate_functions.php245
3 CreateUrlForPage
…/­vendor/­buxus/­seourl-legacy/­buxus/­lib/­seo_url/­seo_url_base.class.php831
2 SeoUrlBase getPageId
…/­vendor/­buxus/­core/­src/­handler/­generate_page.php30
1 include
…/­vendor/­buxus/­core/­src/­Buxus/­Router/­BuxusRouter.php46
0 Buxus\Router\BuxusRouter dispatch
…/­public/­buxus.php7
/home/mydlazmarianky/live/releases/20170503134921/vendor/zendframework/zendframework1/library/Zend/Db/Adapter/Pdo/Abstract.php
 
            // always use exceptions.
            $this->_connection->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);
 
        } catch (PDOException $e) {
            /**
             * @see Zend_Db_Adapter_Exception
             */
            require_once 'Zend/Db/Adapter/Exception.php';
            throw new Zend_Db_Adapter_Exception($e->getMessage(), $e->getCode(), $e);
        }
 
    }
 
    /**
     * Test if a connection is active
     *
     * @return boolean
     */
    public function isConnected()
/home/mydlazmarianky/live/releases/20170503134921/vendor/zendframework/zendframework1/library/Zend/Db/Adapter/Pdo/Abstract.php
            $this->_config['driver_options'][PDO::ATTR_PERSISTENT] = true;
        }
 
        try {
            $this->_connection = new PDO(
                $dsn,
                $this->_config['username'],
                $this->_config['password'],
                $this->_config['driver_options']
            );
 
            $this->_profiler->queryEnd($q);
 
            // set the PDO connection to perform case-folding on array keys, or not
            $this->_connection->setAttribute(PDO::ATTR_CASE, $this->_caseFolding);
 
            // always use exceptions.
            $this->_connection->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);
 
        } catch (PDOException $e) {
Exception message: SQLSTATE[HY000] [2002] No such file or directory
/home/mydlazmarianky/live/releases/20170503134921/vendor/zendframework/zendframework1/library/Zend/Db/Adapter/Pdo/Abstract.php
            $this->_config['driver_options'][PDO::ATTR_PERSISTENT] = true;
        }
 
        try {
            $this->_connection = new PDO(
                $dsn,
                $this->_config['username'],
                $this->_config['password'],
                $this->_config['driver_options']
            );
 
            $this->_profiler->queryEnd($q);
 
            // set the PDO connection to perform case-folding on array keys, or not
            $this->_connection->setAttribute(PDO::ATTR_CASE, $this->_caseFolding);
 
            // always use exceptions.
            $this->_connection->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);
 
        } catch (PDOException $e) {
/home/mydlazmarianky/live/releases/20170503134921/vendor/zendframework/zendframework1/library/Zend/Db/Adapter/Pdo/Mysql.php
        }
 
        if (!empty($this->_config['charset'])
            && version_compare(PHP_VERSION, '5.3.6', '<')
        ) {
            $initCommand = "SET NAMES '" . $this->_config['charset'] . "'";
            $this->_config['driver_options'][1002] = $initCommand; // 1002 = PDO::MYSQL_ATTR_INIT_COMMAND
        }
 
        parent::_connect();
    }
 
    /**
     * @return string
     */
    public function getQuoteIdentifierSymbol()
    {
        return "`";
    }
 
/home/mydlazmarianky/live/releases/20170503134921/vendor/buxus/legacy-base/buxus/includes/classes/db/buxus_db_adapter_mysql.php
	 * @var string
	 */
	protected $_defaultStmtClass = 'BuxusDB_Statement_PDO';
	
	protected function _connect() {
        if ($this->_connection) {
            return;
        }
 
		parent::_connect();
		if (array_key_exists("encoding", $this->_config)) {
			$this->_connection->query("SET CHARACTER SET '" . $this->_config['encoding'] . "'");
            $this->_connection->query("SET NAMES '" . $this->_config['encoding'] . "'");
		}
 
//        $this->_connection->query("SET SESSION sql_mode = 'STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION'");
 
        $this->_connection = \Buxus\DebugBar::getInstance()->registerPDO($this->_connection);
	}
	
/home/mydlazmarianky/live/releases/20170503134921/vendor/zendframework/zendframework1/library/Zend/Db/Adapter/Abstract.php
     *
     * @param  mixed  $sql  The SQL statement with placeholders.
     *                      May be a string or Zend_Db_Select.
     * @param  mixed  $bind An array of data to bind to the placeholders.
     * @return Zend_Db_Statement_Interface
     */
    public function query($sql, $bind = array())
    {
        // connect to the database if needed
        $this->_connect();
 
        // is the $sql a Zend_Db_Select object?
        if ($sql instanceof Zend_Db_Select) {
            if (empty($bind)) {
                $bind = $sql->getBind();
            }
 
            $sql = $sql->assemble();
        }
 
/home/mydlazmarianky/live/releases/20170503134921/vendor/zendframework/zendframework1/library/Zend/Db/Adapter/Pdo/Abstract.php
                if (!is_int($name) && !preg_match('/^:/', $name)) {
                    $newName = ":$name";
                    unset($bind[$name]);
                    $bind[$newName] = $value;
                }
            }
        }
 
        try {
            return parent::query($sql, $bind);
        } catch (PDOException $e) {
            /**
             * @see Zend_Db_Statement_Exception
             */
            require_once 'Zend/Db/Statement/Exception.php';
            throw new Zend_Db_Statement_Exception($e->getMessage(), $e->getCode(), $e);
        }
    }
 
    /**
/home/mydlazmarianky/live/releases/20170503134921/vendor/buxus/legacy-base/buxus/includes/classes/db/buxus_db_adapter_mysql.php
	public function query($sql, $bind = array()) {
		if (is_array($bind)) {
			foreach ($bind as $key => $value) {
				if (is_string($key) && is_array($value)) {
					$sql = preg_replace('@' . preg_quote($key) . '@', implode(',', $value), $sql);
					unset($bind[$key]);
				}
			}
		}
		return parent::query($sql, $bind);
	}
}
 
/home/mydlazmarianky/live/releases/20170503134921/vendor/zendframework/zendframework1/library/Zend/Db/Adapter/Abstract.php
    /**
     * Fetches the first column of the first row of the SQL result.
     *
     * @param string|Zend_Db_Select $sql An SQL SELECT statement.
     * @param mixed $bind Data to bind into SELECT placeholders.
     * @return string
     */
    public function fetchOne($sql, $bind = array())
    {
        $stmt = $this->query($sql, $bind);
        $result = $stmt->fetchColumn(0);
        return $result;
    }
 
    /**
     * Quote a raw string.
     *
     * @param string $value     Raw string
     * @return string           Quoted string
     */
/home/mydlazmarianky/live/releases/20170503134921/vendor/buxus/seourl-legacy/buxus/lib/seo_url/seo_url_base.class.php
            if (! isset($this->cache_page_type_ids[$page_id]))
            { // The page type has not defined for this page yet
                $query = "
					SELECT
						page_type_id
         			FROM
         				tblPages
			         WHERE
			         	page_id = :page_id";
                $this->cache_page_type_ids[$page_id] = BuxusDB::get()->fetchOne($query, array(':page_id' => $page_id));
            }
 
            return $this->cache_page_type_ids[$page_id];
        }
 
        return null;
    }
 
    protected function loadRecordFromDB($page_id, $web_host_name) {
        $query = "
/home/mydlazmarianky/live/releases/20170503134921/vendor/buxus/seourl-legacy/buxus/lib/seo_url/seo_url_base.class.php
        if (isset($this->cache_seo_urls[$this->web_host_name][$page_id]))
        { // The SEO URL was generated before
            $result = $this->cache_seo_urls[$this->web_host_name][$page_id];
            if ($this->ignore_protocol) {
                $result = $this->alterUrlForCurrentProtocol($result);
            }
            return $result;
        }
 
        $page_type_id = $this->getPageType($page_id);
 
        if (! $this->isSeoUrlForPageType($page_type_id))
        { // The page type has not SEO URL
            // Save to cache
            $this->cache_seo_urls[$this->web_host_name][$page_id] = null;
 
            return null;
        }
 
        // Read SEO URL from DB
/home/mydlazmarianky/live/releases/20170503134921/vendor/buxus/seourl-legacy/buxus/lib/seo_url/seo_url_base.class.php
 
            if ($page_id == $this->getHomePageId())
            { // It is the home page
                $seo_url_str = $this->default_protocol . $this->web_host_name;
 
                $url_appendix = '/';
            }
            else
            { // It is not the homepage
                $seo_url_str = $this->getSeoUrl($page_id);
 
                // Convert virtual SEO URL from DB to real SEO URL for this web
                $seo_url_str = $this->convertToRealUrl($seo_url_str);
 
                $url_appendix = $this->url_postix . '?page_id=' . $page_id;
 
                if ($this->append_page_id)
                {
                    $url_appendix = $this->url_postix . '?page_id=' . $page_id;
                    $parameter_mark_included = true;
/home/mydlazmarianky/live/releases/20170503134921/vendor/buxus/legacy-base/buxus/includes/generate_functions.php
    $seo_url = SeoUrlBase::getInstance();
    $static_file_name = $seo_url->cleanUrl($static_file_name, true);
 
    return ($quotes . GetSystemOption('C_static_url_prefix') . $static_file_name . '?' . $url_parameter . $quotes);
  }
  else
  {
  	$seo_url = SeoUrlBase::getInstance();
 
	return $seo_url->createUrlForPage($page_id, $url_parameter, $quotes);
  }
}
 
function CreateUrlForImageName($image_name, $quotes = "'", $dummy = false, $modificator = null, $no_custom = false)
{
 
	if ($no_custom == false && function_exists('CustomCreateUrlForImageName'))
	{
		return CustomCreateUrlForImageName($image_name, $quotes, $dummy, $modificator);
	}
/home/mydlazmarianky/live/releases/20170503134921/vendor/buxus/seourl-legacy/buxus/lib/seo_url/seo_url_base.class.php
                    $request_uri_fixed = preg_replace('|^(.*\?)(\|.*&)(page_id=[0-9]+)[&]?(.*)$|', '\\1\\3&\\2\\4', $request_uri);
                }
                else
                {
                    $request_uri_fixed = $request_uri;
                }
 
                $request_uri_fixed = preg_replace('|&$|', '', $request_uri_fixed);
 
                $seo_url_str = CreateUrlForPage($page_id, $query_string, '');
 
                if ($this->ignore_protocol) {
                    $request_url = $real_protocol . $host_name . $request_uri_fixed;
                } else {
                    $request_url = $this->request_protocol . $host_name . $request_uri_fixed;
                }
 
                $request_url = $this->processUrl($request_url);
 
 
/home/mydlazmarianky/live/releases/20170503134921/vendor/buxus/core/src/handler/generate_page.php
    ob_start("ob_gzhandler");
}
\Buxus\DebugBar::getInstance()->stopMeasure('bootstrap');
\Buxus\DebugBar::getInstance()->startMeasure('seo_url_resolver', 'SEO URL resolver');
// SEO URL
global $page_id;
require_once 'lib/seo_url/seo_url.inc.php';
 
$seo_url = SeoUrlBase::getInstance();
$page_id =  $seo_url->getPageId($_SERVER['SERVER_PORT'], $_SERVER['SERVER_NAME'], $_SERVER['REQUEST_URI']);
 
if (!((is_numeric($page_id)) && ($page_id > 0))) {
	//ak nie je nastaveny page_id, hladame page_name
	$page_name = (isset($_GET['page_name']) ? $_GET['page_name'] : '');
		
	if (!empty($page_name)) {
		//funckia skonci, ak nenajde, alebo najde viac
		$page_id = GetPageIdByPageName($page_name);
	} else {
		if (!showCustomError('404')) {
/home/mydlazmarianky/live/releases/20170503134921/vendor/buxus/core/src/Buxus/Router/BuxusRouter.php
            }
        }
        return $this->default_script;
    }
 
    public function dispatch($request_uri) {
        $script = $this->getScript($request_uri);
 
        if (!empty($script)) {
            include($script);
        }
 
        if ($this->default_script != $script) {
            include($this->default_script);
        }
 
        header('HTTP/1.0 404 Not Found');
        echo '404 Not Found';
        exit;
    }
/home/mydlazmarianky/live/releases/20170503134921/public/buxus.php
<?php
define('BASE_BUXUS_DIR', realpath(__DIR__ . '/../'));
require_once (__DIR__ . '/../vendor/autoload.php');
require_once (CORE_BUXUS_DIR . '/src/buxus_bootstrap.php');
 
$router = app('buxus-router');
$router->dispatch($_SERVER['REQUEST_URI']);
 

Environment & details:

Key Value
page_id 35
empty
empty
empty
empty
empty
empty
0. Whoops\Handler\PrettyPageHandler