Link to database cannot be established: %s
at line 964 in file classes/Tools.php
959. * @param bool $htmlentities By default at true for parsing error message with htmlentities
960. */
961. public static function displayError($string = 'Fatal error', $htmlentities = true, Context $context = null)
962. {
963. if (defined('_PS_MODE_DEV_') && _PS_MODE_DEV_) {
964. throw new PrestaShopException($string);
965. } else if ('Fatal error' !== $string) {
966. return $string;
967. }
968.
969. return Context::getContext()->getTranslator()->trans('Fatal error', array(), 'Admin.Notifications.Error');
97. public function connect()
98. {
99. try {
100. $this->link = $this->_getPDO($this->server, $this->user, $this->password, $this->database, 5);
101. } catch (PDOException $e) {
102. die(sprintf(Tools::displayError('Link to database cannot be established: %s'), utf8_encode($e->getMessage())));
103. }
104.
105. // UTF-8 support
106. if ($this->link->exec('SET NAMES \'utf8\'') === false) {
107. die(Tools::displayError('PrestaShop Fatal error: no utf-8 support. Please check your server configuration.'));
Argument [0] Link to database cannot be established: %s
318. if (!defined('_PS_DEBUG_SQL_')) {
319. define('_PS_DEBUG_SQL_', false);
320. }
321.
322. if ($connect) {
323. $this->connect();
324. }
325. }
326.
327. /**
328. * Disable the use of the cache
229. $class = Db::getClass();
230. self::$instance[$id_server] = new $class(
231. self::$_servers[$id_server]['server'],
232. self::$_servers[$id_server]['user'],
233. self::$_servers[$id_server]['password'],
234. self::$_servers[$id_server]['database']
235. );
236. }
237.
238. return self::$instance[$id_server];
239. }
Argument [0] avospanigb69150.mysql.db:3306 Argument [1] avospanigb69150 Argument [2] Osiris69 Argument [3] avospanigb69150
43. * @param bool $htmlOK Does data contain HTML code ? (optional)
44. * @return string Sanitized data
45. */
46. function pSQL($string, $htmlOK = false)
47. {
48. return Db::getInstance()->escape($string, $htmlOK);
49. }
50.
51. function bqSQL($string)
52. {
53. return str_replace('`', '\`', pSQL($string));
334. $request_uri = rawurldecode($_SERVER['REQUEST_URI']);
335.
336. $sql = 'SELECT s.id_shop, CONCAT(su.physical_uri, su.virtual_uri) AS uri, su.domain, su.main
337. FROM '._DB_PREFIX_.'shop_url su
338. LEFT JOIN '._DB_PREFIX_.'shop s ON (s.id_shop = su.id_shop)
339. WHERE (su.domain = \''.pSQL($host).'\' OR su.domain_ssl = \''.pSQL($host).'\')
340. AND s.active = 1
341. AND s.deleted = 0
342. ORDER BY LENGTH(CONCAT(su.physical_uri, su.virtual_uri)) DESC';
343.
344. $result = Db::getInstance()->executeS($sql);
Argument [0] boutique.rdiconnect.fr
115.
116. $context = Context::getContext();
117.
118. /* Initialize the current Shop */
119. try {
120. $context->shop = Shop::initialize();
121. } catch (PrestaShopException $e) {
122. $e->displayMessage();
123. }
124. define('_THEME_NAME_', $context->shop->theme->getName());
125. define('_PARENT_THEME_NAME_', $context->shop->theme->get('parent') ?: '');
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/rdiconne/boutique/config/config.inc.php