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.');
331. if(!defined('_PS_DEBUG_SQL_')) {
332. define('_PS_DEBUG_SQL_', false);
333. }
334.
335. if($connect) {
336. $this->connect();
337. }
338. }
339.
340. /**
341. * Disable the use of the cache
245. $class = Db::getClass();
246. self::$instance[$id_server] = new $class(
247. self::$_servers[$id_server]['server'],
248. self::$_servers[$id_server]['user'],
249. self::$_servers[$id_server]['password'],
250. self::$_servers[$id_server]['database']
251. );
252. }
253.
254. return self::$instance[$id_server];
255. }
Argument [0] **hidden_server** Argument [1] sql9151_2 Argument [2] **hidden_password** Argument [3] **hidden_database**
346. $found_uri = '';
347. $is_main_uri = false;
348. $host = Tools::getHttpHost();
349. $request_uri = rawurldecode($_SERVER['REQUEST_URI']);
350.
351. $result = Db::getInstance()->executeS('
352. SELECT s.id_shop, CONCAT(su.physical_uri, su.virtual_uri) AS uri, su.domain, su.main
353. FROM '._DB_PREFIX_.'shop_url su
354. LEFT JOIN '._DB_PREFIX_.'shop s
355. ON(s.id_shop = su.id_shop)
356. WHERE (
148.
149. $context = Context::getContext();
150.
151. /* Initialize the current Shop */
152. try {
153. $context->shop = Shop::initialize();
154. $context->theme = new Theme((int)$context->shop->id_theme);
155. if((Tools::isEmpty($theme_name = $context->shop->getTheme()) || !Validate::isLoadedObject($context->theme)) && !defined('_PS_ADMIN_DIR_')) {
156. throw new PrestaShopException(Tools::displayError('Current theme unselected. Please check your theme configuration.'));
157. }
158. }
22. * @copyright 2007-2017 PrestaShop SA
23. * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
24. * International Registered Trademark & Property of PrestaShop SA
25. */
26.
27. require(dirname(__FILE__).'/config/config.inc.php');
28. Dispatcher::getInstance()->dispatch();
Argument [0] /home/www/config/config.inc.php