Link to database cannot be established: SQLSTATE[HY000] [1045] Access denied for user 'konsolowo_xpn'@'localhost' (using password: YES)
at line 119 in file classes/db/DbPDO.php
114. public function connect()
115. {
116. try {
117. $this->link = $this->getPDO($this->server, $this->user, $this->password, $this->database, 5);
118. } catch (PDOException $e) {
119. throw new PrestaShopException('Link to database cannot be established: ' . $e->getMessage());
120. }
121.
122. $this->link->exec('SET SESSION sql_mode = \'\'');
123.
124. return $this->link;
326. if (!defined('_PS_DEBUG_SQL_')) {
327. define('_PS_DEBUG_SQL_', false);
328. }
329.
330. if ($connect) {
331. $this->connect();
332. }
333. }
334.
335. /**
336. * Disable the use of the cache.
236. $class = Db::getClass();
237. self::$instance[$id_server] = new $class(
238. self::$_servers[$id_server]['server'],
239. self::$_servers[$id_server]['user'],
240. self::$_servers[$id_server]['password'],
241. self::$_servers[$id_server]['database']
242. );
243. }
244.
245. return self::$instance[$id_server];
246. }
42. * @param bool $htmlOK Does data contain HTML code ? (optional)
43. * @return string Sanitized data
44. */
45. function pSQL($string, $htmlOK = false)
46. {
47. return Db::getInstance()->escape($string, $htmlOK);
48. }
49.
50. function bqSQL($string)
51. {
52. return str_replace('`', '\`', pSQL($string));
1353. private static function findShopByHost($host)
1354. {
1355. $sql = 'SELECT s.id_shop, CONCAT(su.physical_uri, su.virtual_uri) AS uri, su.domain, su.main
1356. FROM ' . _DB_PREFIX_ . 'shop_url su
1357. LEFT JOIN ' . _DB_PREFIX_ . 'shop s ON (s.id_shop = su.id_shop)
1358. WHERE (su.domain = \'' . pSQL($host) . '\' OR su.domain_ssl = \'' . pSQL($host) . '\')
1359. AND s.active = 1
1360. AND s.deleted = 0
1361. ORDER BY LENGTH(CONCAT(su.physical_uri, su.virtual_uri)) DESC';
1362.
1363. $result = Db::getInstance()->executeS($sql);
350. $found_uri = '';
351. $is_main_uri = false;
352. $host = Tools::getHttpHost(false, false, true);
353. $request_uri = rawurldecode($_SERVER['REQUEST_URI']);
354.
355. $result = self::findShopByHost($host);
356.
357. // If could not find a matching, try with port
358. if (empty($result)) {
359. $host = Tools::getHttpHost(false, false, false);
360. $result = self::findShopByHost($host);
112.
113. $context = Context::getContext();
114.
115. /* Initialize the current Shop */
116. try {
117. $context->shop = Shop::initialize();
118. } catch (PrestaShopException $e) {
119. $e->displayMessage();
120. }
121. define('_THEME_NAME_', $context->shop->theme->getName());
122. define('_PARENT_THEME_NAME_', $context->shop->theme->get('parent') ?: '');
22. * @author PrestaShop SA and Contributors <contact@prestashop.com>
23. * @copyright Since 2007 PrestaShop SA and Contributors
24. * @license https://opensource.org/licenses/OSL-3.0 Open Software License (OSL 3.0)
25. */
26.
27. require dirname(__FILE__).'/config/config.inc.php';
28. Dispatcher::getInstance()->dispatch();
Argument [0] /home/xpn.pl/public_html/config/config.inc.php