Link to database cannot be established:SQLSTATE[HY000] [2002] php_network_getaddresses: getaddrinfo failed: Temporary failure in name resolution
at line 102 in file classes/db/DbPDO.php
97. public function connect()
98. {
99. try {
100. $this->link = $this->_getPDO($this->server, $this->user, $this->password, $this->database, 5);
101. } catch (PDOException $e) {
102. throw new PrestaShopException('Link to database cannot be established:'.$e->getMessage());
103. }
104.
105. // UTF-8 support
106. if ($this->link->exec('SET NAMES \'utf8\'') === false) {
107. throw new PrestaShopException('PrestaShop Fatal error: no utf-8 support. Please check your server configuration.');
314. if (!defined('_PS_DEBUG_SQL_')) {
315. define('_PS_DEBUG_SQL_', false);
316. }
317.
318. if ($connect) {
319. $this->connect();
320. }
321. }
322.
323. /**
324. * Disable the use of the cache
235. self::$instance[$id_server] = new $class(
236. self::$_servers[$id_server]['server'],
237. self::$_servers[$id_server]['user'],
238. self::$_servers[$id_server]['password'],
239. self::$_servers[$id_server]['database']
240. );
241. }
242.
243. return self::$instance[$id_server];
244. }
245.
Argument [0] **hidden_server** Argument [1] smarthouse-g_1 Argument [2] **hidden_password** Argument [3] **hidden_database**
61. * @param bool $htmlOK Does data contain HTML code ? (optional)
62. * @return string Sanitized data
63. */
64. function pSQL($string, $htmlOK = false)
65. {
66. return Db::getInstance()->escape($string, $htmlOK);
67. }
68.
69. function bqSQL($string)
70. {
71. return str_replace('`', '\`', pSQL($string));
324. $request_uri = rawurldecode($_SERVER['REQUEST_URI']);
325.
326. $sql = 'SELECT s.id_shop, CONCAT(su.physical_uri, su.virtual_uri) AS uri, su.domain, su.main
327. FROM '._DB_PREFIX_.'shop_url su
328. LEFT JOIN '._DB_PREFIX_.'shop s ON (s.id_shop = su.id_shop)
329. WHERE (su.domain = \''.pSQL($host).'\' OR su.domain_ssl = \''.pSQL($host).'\')
330. AND s.active = 1
331. AND s.deleted = 0
332. ORDER BY LENGTH(CONCAT(su.physical_uri, su.virtual_uri)) DESC';
333.
334. $result = Db::getInstance()->executeS($sql);
Argument [0] www.smarthousegb.com
109.
110. $context = Context::getContext();
111.
112. /* Initialize the current Shop */
113. try {
114. $context->shop = Shop::initialize();
115. $context->theme = new Theme((int)$context->shop->id_theme);
116. if ((Tools::isEmpty($theme_name = $context->shop->getTheme()) || !Validate::isLoadedObject($context->theme)) && !defined('_PS_ADMIN_DIR_')) {
117. throw new PrestaShopException(Tools::displayError('Current theme unselected. Please check your theme configuration.'));
118. }
119. } catch (PrestaShopException $e) {
22. * @copyright 2007-2017 PrestaShop SA
23. * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
24. * International Registered Trademark & Property of PrestaShop SA
25. */
26.
27. require(dirname(__FILE__).'/config/config.inc.php');
28. Dispatcher::getInstance()->dispatch();
Argument [0] /home/smarthouse-g/ftp/config/config.inc.php