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_) {
608. }
609.
610. return $this->execute($sql, $use_cache);
611. }
612.
613. $this->result = $this->query($sql);
614.
615. if (!$this->result) {
616. $result = false;
617. } else {
618. if (!$array) {
Argument [0]
SELECT * FROM `snsps_hook_module_exceptions`
WHERE `id_shop` IN (1)
2247. if (!Cache::isStored($cache_id)) {
2248. $exceptions_cache = [];
2249. $sql = 'SELECT * FROM `' . _DB_PREFIX_ . 'hook_module_exceptions`
2250. WHERE `id_shop` IN (' . implode(', ', Shop::getContextListShopID()) . ')';
2251. $db = Db::getInstance();
2252. $result = $db->executeS($sql, false);
2253. while ($row = $db->nextRow($result)) {
2254. if (!$row['file_name']) {
2255. continue;
2256. }
2257. $key = $row['id_hook'] . '-' . $row['id_module'];
Argument [0]
SELECT * FROM `snsps_hook_module_exceptions`
WHERE `id_shop` IN (1)
Argument [1]
867. $registeredHookName = static::getNameById($hookRegistration['id_hook']);
868. }
869.
870. // Check permissions
871. if ($check_exceptions) {
872. $exceptions = Module::getExceptionsStatic($hookRegistration['id_module'], $hookRegistration['id_hook']);
873.
874. $controller_obj = Context::getContext()->controller;
875. if ($controller_obj === null) {
876. $controller = null;
877. } else {
Argument [0] 95 Argument [1] 690
509. // Loading controller
510. $controller = Controller::getController($controller_class);
511.
512. // Execute hook dispatcher
513. if (isset($params_hook_action_dispatcher)) {
514. Hook::exec('actionDispatcher', $params_hook_action_dispatcher);
515. }
516.
517. // Running controller
518. $controller->run();
519.
Argument [0]
actionDispatcher
Argument [1]
Array
(
[controller_type] => 1
[controller_class] => CategoryController
[is_module] => 0
[cookie] => Cookie Object
(
[_content:protected] => Array
(
[date_add] => 2026-09-27 04:04:01
[id_lang] => 2
)
[_name:protected] => PrestaShop-7effe314ee1ba8c0f93c33977592e9d0
[_expire:protected] => 1792199041
[_domain:protected] => andoni.ro
[_path:protected] => /
[cipherTool:protected] => PhpEncryption Object
(
)
[_modified:protected] => 1
[_allow_writing:protected] => 1
[_salt:protected] => jbfWqxLw8DKdr4eCJTu98j00QB5RvLSJ
[_standalone:protected] =>
[_secure:protected] => 1
)
[cart] =>
)
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();