Link to database cannot be established:SQLSTATE[HY000] [2006] MySQL server has gone away
at line 118 in file classes/db/DbPDO.php
113. {
114. try {
115. $this->link = $this->_getPDO($this->server, $this->user, $this->password, $this->database, 5);
116. }
117. catch (PDOException $e) {
118. throw new PrestaShopException('Link to database cannot be established:'.$e->getMessage());
119. }
120.
121. // UTF-8 support
122. if($this->link->exec('SET NAMES \'utf8mb4\'') === false) {
123. throw new PrestaShopException('Fatal error: no utf-8 support. Please check your server configuration.');
338. if(!defined('_PS_DEBUG_SQL_')) {
339. define('_PS_DEBUG_SQL_', false);
340. }
341.
342. if($connect) {
343. $this->connect();
344. }
345. }
346.
347. /**
348. * Disable the use of the cache
252. $class = Db::getClass();
253. self::$instance[$id_server] = new $class(
254. self::$_servers[$id_server]['server'],
255. self::$_servers[$id_server]['user'],
256. self::$_servers[$id_server]['password'],
257. self::$_servers[$id_server]['database']
258. );
259. }
260.
261. return self::$instance[$id_server];
262. }
Argument [0] **hidden_server** Argument [1] sql9151_2 Argument [2] **hidden_password** Argument [3] **hidden_database**
344. $found_uri = '';
345. $is_main_uri = false;
346. $host = Tools::getHttpHost();
347. $request_uri = rawurldecode($_SERVER['REQUEST_URI']);
348.
349. $result = Db::getInstance()->executeS('
350. SELECT s.id_shop, CONCAT(su.physical_uri, su.virtual_uri) AS uri, su.domain, su.main
351. FROM '._DB_PREFIX_.'shop_url su
352. '.PS_JOIN_TYPE.' JOIN '._DB_PREFIX_.'shop s
353. ON(s.id_shop = su.id_shop)
354. WHERE (
157.
158. $context = Context::getContext();
159.
160. /* Initialize the current Shop */
161. try {
162. $context->shop = Shop::initialize();
163. $context->theme = new Theme((int)$context->shop->id_theme);
164. if((Tools::isEmpty($theme_name = $context->shop->getTheme())
165. || !Validate::isLoadedObject($context->theme))
166. && !defined('_PS_ADMIN_DIR_')
167. ) {
21. * @author PhenixSuite <contact@phenixsuite.com>
22. * @copyright 2022-2024 PhenixSuite
23. * @license https://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
24. */
25.
26. require(dirname(__FILE__).'/config/config.inc.php');
27. Dispatcher::getInstance()->dispatch();
Argument [0] /home/www/config/config.inc.php