Link to database cannot be established: SQLSTATE[HY000] [2002] Connection refused
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;
374. }
375.
376. $this->result = $this->_query($sql);
377.
378. if (!$this->result && $this->getNumberError() == 2006) {
379. if ($this->connect()) {
380. $this->result = $this->_query($sql);
381. }
382. }
383.
384. if (_PS_DEBUG_SQL_) {
658.
659. return $result;
660. }
661. }
662.
663. $this->result = $this->query($sql);
664. if (!$this->result) {
665. $result = false;
666. } else {
667. $result = $this->nextRow($this->result);
668. }
Argument [0] SELECT su.physical_uri, su.virtual_uri, su.domain, su.domain_ssl FROM pss8_shop s LEFT JOIN pss8_shop_url su ON (s.id_shop = su.id_shop) WHERE s.id_shop = 1 AND s.active = 1 AND s.deleted = 0 AND su.main = 1 LIMIT 1
200. if (!Cache::isStored($cache_id)) {
201. $row = Db::getInstance()->getRow('
202. SELECT su.physical_uri, su.virtual_uri, su.domain, su.domain_ssl
203. FROM ' . _DB_PREFIX_ . 'shop s
204. LEFT JOIN ' . _DB_PREFIX_ . 'shop_url su ON (s.id_shop = su.id_shop)
205. WHERE s.id_shop = ' . (int) $this->id . '
206. AND s.active = 1 AND s.deleted = 0 AND su.main = 1');
207. Cache::store($cache_id, $row);
208. } else {
209. $row = Cache::retrieve($cache_id);
210. }
Argument [0] SELECT su.physical_uri, su.virtual_uri, su.domain, su.domain_ssl FROM pss8_shop s LEFT JOIN pss8_shop_url su ON (s.id_shop = su.id_shop) WHERE s.id_shop = 1 AND s.active = 1 AND s.deleted = 0 AND su.main = 1 LIMIT 1
130. public function __construct($id = null, $id_lang = null, $id_shop = null)
131. {
132. parent::__construct($id, $id_lang, $id_shop);
133.
134. if ($this->id) {
135. $this->setUrl();
136. if ($this->theme == null) {
137. $this->setTheme();
138. }
139. }
140. }
410. if (!isset($_SERVER['REMOTE_ADDR']) || empty($_SERVER['REMOTE_ADDR'])) {
411. $_SERVER['REMOTE_ADDR'] = '127.0.0.1';
412. }
413. }
414. } else {
415. $shop = new Shop($id_shop);
416. if (!Validate::isLoadedObject($shop) || !$shop->active) {
417. // No shop found ... too bad, let's redirect to default shop
418. $default_shop = new Shop(Configuration::get('PS_SHOP_DEFAULT'));
419.
420. // Hmm there is something really bad in your Prestashop !
Argument [0] 1
123.
124. $context = Context::getContext();
125.
126. /* Initialize the current Shop */
127. try {
128. $context->shop = Shop::initialize();
129. } catch (PrestaShopException $e) {
130. $e->displayMessage();
131. }
132. define('_THEME_NAME_', $context->shop->theme->getName());
133. 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/r97005alco/dezvolt2.alcooldiscount.ro/config/config.inc.php