Duplicate entry '1711728111' for key 'PRIMARY'INSERT INTO `ps_today_online` (`timestamp`, `ip`, `path`) VALUES ('1711728111', '44.211.24.81', '')
at line 791 in file classes/db/Db.php
786. if ($webservice_call && $errno) {
787. $dbg = debug_backtrace();
788. WebserviceRequest::getInstance()->setError(500, '[SQL Error] '.$this->getMsgError().'. From '.(isset($dbg[3]['class']) ? $dbg[3]['class'] : '').'->'.$dbg[3]['function'].'() Query was : '.$sql, 97);
789. } elseif (_PS_DEBUG_SQL_ && $errno && !defined('PS_INSTALLATION_IN_PROGRESS')) {
790. if ($sql) {
791. throw new PrestaShopDatabaseException($this->getMsgError().'<br /><br /><pre>'.$sql.'</pre>');
792. }
793.
794. throw new PrestaShopDatabaseException($this->getMsgError());
795. }
796. }
420. $this->result = $this->_query($sql);
421. }
422. }
423.
424. if (_PS_DEBUG_SQL_) {
425. $this->displayError($sql);
426. }
427.
428. return $this->result;
429. }
430.
Argument [0] INSERT INTO `ps_today_online` (`timestamp`, `ip`, `path`) VALUES ('1711728111', '44.211.24.81', '')
758. if ($sql instanceof DbQuery) {
759. $sql = $sql->build();
760. }
761.
762. $this->result = false;
763. $result = $this->query($sql);
764. if ($use_cache && $this->is_cache_enabled) {
765. Cache::getInstance()->deleteQuery($sql);
766. }
767.
768. if (_PS_DEBUG_SQL_) {
Argument [0] INSERT INTO `ps_today_online` (`timestamp`, `ip`, `path`) VALUES ('1711728111', '44.211.24.81', '')
509. $sql = $insert_keyword.' INTO `'.$table.'` ('.$keys_stringified.') VALUES '.implode(', ', $values_stringified);
510. if ($type == Db::ON_DUPLICATE_KEY) {
511. $sql .= ' ON DUPLICATE KEY UPDATE '.substr($duplicate_key_stringified, 0, -1);
512. }
513.
514. return (bool)$this->q($sql, $use_cache);
515. }
516.
517. /**
518. * Executes an UPDATE query
519. *
Argument [0] INSERT INTO `ps_today_online` (`timestamp`, `ip`, `path`) VALUES ('1711728111', '44.211.24.81', '') Argument [1] 1
100.
101. if($onlip1 !== $client_ip) {
102. Db::getInstance()->insert('today_online', array(
103. 'timestamp' => pSQL($server_time),
104. 'ip' => pSQL($client_ip),
105. 'path' => pSQL($PHP_SELF)
106. ));
107. }
108.
109. Db::getInstance()->delete("today_online", "timestamp < '".$timeout."' AND ip != '".$client_ip."'");
110.
Argument [0] ps_today_online Argument [1] Array ( [0] => Array ( [timestamp] => 1711728111 [ip] => 44.211.24.81 [path] => ) )
586. }
587. }
588.
589. // Immediately return the result if we do not log performances
590. if (!Module::$_log_modules_perfs) {
591. return $module->{$method}($params);
592. }
593.
594. // Store time and memory before and after hook call and save the result in the database
595. $time_start = microtime(true);
596. $memory_start = memory_get_usage(true);
Argument [0]
543.
544. // Call hook method
545. if ($hook_callable) {
546. $display = Hook::coreCallHook($moduleInstance, 'hook'.$hook_name, $hook_args);
547. } elseif ($hook_retro_callable) {
548. $display = Hook::coreCallHook($moduleInstance, 'hook'.$retro_hook_name, $hook_args);
549. }
550.
551. // Live edit
552. if (!$array_return && $array['live_edit'] && Tools::isSubmit('live_edit') && Tools::getValue('ad')
553. && Tools::getValue('liveToken') == Tools::getAdminToken('AdminModulesPositions'
Argument [0] Argument [1] hookleftcolumn Argument [2]
576. // These hooks aren't used for the mobile theme.
577. // Needed hooks are called in the tpl files.
578. $this->context->smarty->assign(array(
579. 'HOOK_HEADER' => Hook::exec('displayHeader'),
580. 'HOOK_TOP' => Hook::exec('displayTop'),
581. 'HOOK_LEFT_COLUMN' => ($this->display_column_left ? Hook::exec('displayLeftColumn') : ''),
582. 'HOOK_RIGHT_COLUMN' => ($this->display_column_right ? Hook::exec('displayRightColumn', array('cart' => $this->context->cart)) : ''),
583. ));
584. } else {
585. $this->context->smarty->assign('HOOK_MOBILE_HEADER', Hook::exec('displayMobileHeader'));
586. }
Argument [0] displayLeftColumn
118. /**
119. * Initializes page content variables
120. */
121. public function initContent()
122. {
123. parent::initContent();
124.
125. $this->setTemplate(_PS_THEME_DIR_.'category.tpl');
126.
127. if ($this->errors) {
128. return;
184. if (!$this->content_only && ($this->display_header || (isset($this->className) && $this->className))) {
185. $this->initHeader();
186. }
187.
188. if ($this->viewAccess()) {
189. $this->initContent();
190. } else {
191. $this->errors[] = Tools::displayError('Access denied.');
192. }
193.
194. if (!$this->content_only && ($this->display_footer || (isset($this->className) && $this->className))) {
362. if (isset($params_hook_action_dispatcher)) {
363. Hook::exec('actionDispatcher', $params_hook_action_dispatcher);
364. }
365.
366. // Running controller
367. $controller->run();
368. } catch (PrestaShopException $e) {
369. $e->displayMessage();
370. }
371. }
372.
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();