Link to database cannot be established: SQLSTATE[HY000] [1044] Access denied for user 'bmh_user'@'localhost' to database 'bmh'
at line 136 in file classes/db/DbPDO.php
131. public function connect()
132. {
133. try {
134. $this->link = $this->getPDO($this->server, $this->user, $this->password, $this->database, 5);
135. } catch (PDOException $e) {
136. throw new PrestaShopException('Link to database cannot be established: ' . $e->getMessage());
137. }
138.
139. $this->link->exec('SET SESSION sql_mode = \'\'');
140.
141. return $this->link;
325. if (!defined('_PS_DEBUG_SQL_')) {
326. define('_PS_DEBUG_SQL_', false);
327. }
328.
329. if ($connect) {
330. $this->connect();
331. }
332. }
333.
334. /**
335. * 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. }
Argument [0] **hidden_server** Argument [1] bmh_user Argument [2] **hidden_password** Argument [3] **hidden_database**
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));
1331. private static function findShopByHost($host)
1332. {
1333. $sql = 'SELECT s.id_shop, CONCAT(su.physical_uri, su.virtual_uri) AS uri, su.domain, su.main
1334. FROM ' . _DB_PREFIX_ . 'shop_url su
1335. LEFT JOIN ' . _DB_PREFIX_ . 'shop s ON (s.id_shop = su.id_shop)
1336. WHERE (su.domain = \'' . pSQL($host) . '\' OR su.domain_ssl = \'' . pSQL($host) . '\')
1337. AND s.active = 1
1338. AND s.deleted = 0
1339. ORDER BY LENGTH(CONCAT(su.physical_uri, su.virtual_uri)) DESC';
1340.
1341. $result = Db::getInstance()->executeS($sql);
Argument [0] www.bharatmusichouse.com
332. $found_uri = '';
333. $is_main_uri = false;
334. $host = Tools::getHttpHost(false, false, true);
335. $request_uri = rawurldecode($_SERVER['REQUEST_URI']);
336.
337. $result = self::findShopByHost($host);
338.
339. // If could not find a matching, try with port
340. if (empty($result)) {
341. $host = Tools::getHttpHost(false, false, false);
342. $result = self::findShopByHost($host);
Argument [0] www.bharatmusichouse.com
113.
114. $context = Context::getContext();
115.
116. /* Initialize the current Shop */
117. try {
118. $context->shop = Shop::initialize();
119. } catch (PrestaShopException $e) {
120. $e->displayMessage();
121. }
122. define('_THEME_NAME_', $context->shop->theme->getName());
123. 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/bmh/public_html/config/config.inc.php