Link to database cannot be established: SQLSTATE[HY000] [2002] Connection refused
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;
375. }
376.
377. $this->result = $this->_query($sql);
378.
379. if (!$this->result && $this->getNumberError() == 2006) {
380. $this->connect();
381. $this->result = $this->_query($sql);
382. }
383.
384. if (_PS_DEBUG_SQL_) {
385. $this->displayError($sql);
655.
656. return $result;
657. }
658. }
659.
660. $this->result = $this->query($sql);
661. if (!$this->result) {
662. $result = false;
663. } else {
664. $result = $this->nextRow($this->result);
665. }
Argument [0] SELECT state FROM ps_4ftPiMT1_feature_flag WHERE name = 'multiple_image_format' LIMIT 1
689. {
690. if ($sql instanceof DbQuery) {
691. $sql = $sql->build();
692. }
693.
694. $result = $this->getRow($sql, $use_cache);
695. if (false === $result) {
696. return false;
697. }
698.
699. return array_shift($result);
Argument [0] SELECT state FROM ps_4ftPiMT1_feature_flag WHERE name = 'multiple_image_format' LIMIT 1 Argument [1] 1
100. "SELECT state FROM %sfeature_flag WHERE name = '%s'",
101. _DB_PREFIX_,
102. pSQL($name)
103. );
104.
105. return (bool) Db::getInstance()->getValue($query);
106. }
107. }
Argument [0] SELECT state FROM ps_4ftPiMT1_feature_flag WHERE name = 'multiple_image_format'
55. private $isMultipleImageFormatFeatureActive;
56.
57. public function __construct(Link $link)
58. {
59. $this->link = $link;
60. $this->isMultipleImageFormatFeatureActive = FeatureFlag::isEnabled(FeatureFlagSettings::FEATURE_FLAG_MULTIPLE_IMAGE_FORMAT);
61. }
62.
63. /**
64. * @param array $product
65. * @param Language $language
Argument [0] multiple_image_format
87. {
88. $context = Context::getContext();
89. $this->priceFormatter = new PriceFormatter();
90. $this->link = $context->link;
91. $this->translator = $context->getTranslator();
92. $this->imageRetriever = new ImageRetriever($this->link);
93. $this->taxConfiguration = new TaxConfiguration();
94. }
95.
96. /**
97. * @return bool
Argument [0]
Link Object
(
[allow:protected] => 1
[url:protected] => /index.php
[protocol_link] => https://
[protocol_content] => https://
[ssl_enable:protected] => 1
[urlShopId:protected] =>
)
206. } else {
207. $useSSL = $this->ssl;
208. }
209.
210. $this->objectPresenter = new ObjectPresenter();
211. $this->cart_presenter = new CartPresenter();
212. $this->templateFinder = new TemplateFinder($this->context->smarty->getTemplateDir(), '.tpl');
213. $this->stylesheetManager = new StylesheetManager(
214. [_PS_THEME_URI_, _PS_PARENT_THEME_URI_, __PS_BASE_URI__],
215. new ConfigurationAdapter()
216. );
241. *
242. * @return Controller
243. */
244. public static function getController($class_name, $auth = false, $ssl = false)
245. {
246. return new $class_name($auth, $ssl);
247. }
248.
249. public function __construct()
250. {
251. if (null === $this->display_header) {
499. }
500.
501. // Instantiate controller
502. try {
503. // Loading controller
504. $controller = Controller::getController($controller_class);
505.
506. // Execute hook dispatcher
507. Hook::exec('actionDispatcher', $params_hook_action_dispatcher);
508.
509. // Running controller
Argument [0] CategoryController
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();