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 m.`id_module`, m.`name`, ms.`id_module`as `mshop` FROM `pss8_module` m LEFT JOIN `pss8_module_shop` ms ON m.`id_module` = ms.`id_module` AND ms.`id_shop` = 1
335. $result = Db::getInstance()->executeS('
336. SELECT m.`id_module`, m.`name`, ms.`id_module`as `mshop`
337. FROM `' . _DB_PREFIX_ . 'module` m
338. LEFT JOIN `' . _DB_PREFIX_ . 'module_shop` ms
339. ON m.`id_module` = ms.`id_module`
340. AND ms.`id_shop` = ' . (int) $id_shop);
341. foreach ($result as $row) {
342. static::$modules_cache[$row['name']] = $row;
343. static::$modules_cache[$row['name']]['active'] = ($row['mshop'] > 0) ? 1 : 0;
344. }
345. }
Argument [0] SELECT m.`id_module`, m.`name`, ms.`id_module`as `mshop` FROM `pss8_module` m LEFT JOIN `pss8_module_shop` ms ON m.`id_module` = ms.`id_module` AND ms.`id_shop` = 1
34. $this->need_instance = 0;
35. $this->module_key = '5773105addecedec9e29419fa83ac703';
36. $this->addons_id = ''; //6652
37. $this->ps_versions_compliancy = array('min' => '1.5.0.0', 'max' => '1.7.99.99');
38.
39. parent::__construct();
40.
41. $this->displayName = $this->l('Email your carrier');
42. $this->description = $this->l(
43. 'Send an email to the carrier after an order'
44. );
118. if (count($args) > 0) {
119. return $refl->newInstanceArgs($args);
120. } else {
121. // newInstanceArgs with empty array fails in PHP 5.3 when the class
122. // doesn't have an explicitly defined constructor
123. return $refl->newInstance();
124. }
125. }
126.
127. private function doMake($serviceName, array $alreadySeen = [])
128. {
148. } elseif (!is_string($constructor)) {
149. // user already provided the value, no need to construct it.
150. $service = $constructor;
151. } else {
152. // assume the $constructor is a class name
153. $service = $this->makeInstanceFromClassName($constructor, $alreadySeen);
154. }
155.
156. if ($binding['shared']) {
157. $this->instances[$serviceName] = $service;
158. }
Argument [0] carrieremailer Argument [1] Array ( [carrieremailer] => 1 )
161. }
162. }
163.
164. public function make($serviceName)
165. {
166. return $this->doMake($serviceName, []);
167. }
168. }
Argument [0] carrieremailer Argument [1] Array ( [carrieremailer] => 1 )
60. {
61. if (empty(self::$service_container) || null === self::$service_container) {
62. throw new CoreException('Service container is not set.');
63. }
64.
65. return self::$service_container->make($serviceName);
66. }
67. }
Argument [0] carrieremailer
1186. $r = static::$_INSTANCE[$module_name] = ServiceLocator::get($override);
1187. }
1188. }
1189.
1190. if (!$r && class_exists($module_name, false)) {
1191. $r = static::$_INSTANCE[$module_name] = ServiceLocator::get($module_name);
1192. }
1193.
1194. return $r;
1195. }
1196.
Argument [0] carrieremailer
1165. if (!isset(static::$_INSTANCE[$module_name])) {
1166. if (!Tools::file_exists_no_cache(_PS_MODULE_DIR_ . $module_name . '/' . $module_name . '.php')) {
1167. return false;
1168. }
1169.
1170. return Module::coreLoadModule($module_name);
1171. }
1172.
1173. return static::$_INSTANCE[$module_name];
1174. }
1175.
Argument [0] carrieremailer
916. if (Validate::isLoadedObject($context->employee) && !Module::getPermissionStatic($hookRegistration['id_module'], 'view', $context->employee)) {
917. continue;
918. }
919. }
920.
921. if (!($moduleInstance = Module::getInstanceByName($hookRegistration['module']))) {
922. continue;
923. }
924.
925. if ($use_push && !$moduleInstance->allow_push) {
926. continue;
Argument [0] carrieremailer
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] => ManufacturerController [is_module] => 0 [cookie] => Cookie Object ( [_content:protected] => Array ( [date_add] => 2024-04-26 16:20:02 [id_lang] => 2 ) [_name:protected] => PrestaShop-a70f81068314e61a0692eab9d89b049b [_expire:protected] => 1715865602 [_domain:protected] => .alcooldiscount.ro [_sameSite:protected] => Lax [_path:protected] => / [cipherTool:protected] => PhpEncryption Object ( ) [_modified:protected] => 1 [_allow_writing:protected] => 1 [_salt:protected] => tlpnadbsnluft5bbp3zrasdloqge5wmm [_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();