ray52 Posted December 9, 2016 Share Posted December 9, 2016 Mijn hosting bedrijf heeft de server opnieuw ingericht en hier php 5.6 op gezet. Nu krijg ik diverse foutmeldingen, die ik eerst niet had: [PrestaShopDatabaseException]Duplicate entry '0' for key 'PRIMARY' INSERT INTO `ps_connections` (`id_guest`, `id_page`, `ip_address`, `http_referer`, `id_shop`, `id_shop_group`, `date_add`) VALUES ('758341', '2', '1308112600', '', '1', '1', '2016-12-09 18:25:08') 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. } DbCore->displayError - [line 425 - classes/db/Db.php] - [1 Arguments] DbCore->query - [line 763 - classes/db/Db.php] - [1 Arguments] DbCore->q - [line 514 - classes/db/Db.php] - [2 Arguments] DbCore->insert - [line 487 - classes/ObjectModel.php] - [3 Arguments] ObjectModelCore->add - [line 158 - classes/Connection.php] ConnectionCore::setNewConnection - [line 86 - classes/Connection.php] - [1 Arguments] ConnectionCore::setPageConnection - [line 142 - modules/statsdata/statsdata.php] - [1 Arguments] StatsData->getScriptCustomerPagesViews - [line 81 - modules/statsdata/statsdata.php] - [1 Arguments] StatsData->hookFooter - [line 587 - classes/Hook.php] - [1 Arguments] HookCore::coreCallHook - [line 544 - classes/Hook.php] - [3 Arguments] HookCore::exec - [line 1022 - classes/controller/FrontController.php] - [1 Arguments] FrontControllerCore->initFooter - [line 195 - classes/controller/Controller.php] ControllerCore->run - [line 367 - classes/Dispatcher.php] DispatcherCore->dispatch - [line 28 - index.php] Volgens hun ligt dat aan de php code en daar mogen ze niets aan veranderen. Het rare is dat ik de site ook op mijn thuis server heb draaien, met php 5.6.25 en mysql 5.7.14 en daar heb ik deze problemen niet. Kan iemand misschien wat inzicht geven in deze foutmeldingen? Ray Link to comment Share on other sites More sharing options...
ray52 Posted December 9, 2016 Author Share Posted December 9, 2016 Auto increment staat toch in de sql normaal? Mijn tabel : CREATE TABLE `ps_connections` ( `id_connections` int(10) unsigned NOT NULL, `id_shop_group` int(11) unsigned NOT NULL DEFAULT '1', `id_shop` int(11) unsigned NOT NULL DEFAULT '1', `id_guest` int(10) unsigned NOT NULL, `id_page` int(10) unsigned NOT NULL, `ip_address` bigint(20) DEFAULT NULL, `date_add` datetime NOT NULL, `http_referer` varchar(255) DEFAULT NULL, PRIMARY KEY (`id_connections`), KEY `id_guest` (`id_guest`), KEY `date_add` (`date_add`), KEY `id_page` (`id_page`)) ENGINE=InnoDB DEFAULT CHARSET=utf8; Ik heb hier de tabel leeg gemaakt en AUTO INCREMENT aangezet. DIt werkt nu. Echter ik heb een zelfde probleem in de admin module. Daar werkt het meeste, echter ik kan niet in de Modules komen HIer krijg ik de melding: [PrestaShopDatabaseException]Duplicate entry '0' for key 'PRIMARY' INSERT INTO `ps_configuration` (`id_shop_group`, `id_shop`, `name`, `value`, `date_add`, `date_upd`) VALUES (NULL, NULL, 'update_dboptimization', '1481311362', '2016-12-09 20:22:42', '2016-12-09 20:22:42') Ook hier staat geen auto increment in. Tabel kan ik echter niet leeg gooien. Als ik auto increment wil aanzetten krijg ik : Fout in query:#1062 - ALTER TABLE causes auto_increment resequencing, resulting in duplicate entry '1' for key 'PRIMARY' Hoe kan ik dat omzeilen? Link to comment Share on other sites More sharing options...
ray52 Posted December 9, 2016 Author Share Posted December 9, 2016 Ik heb het al opgelost, ik heb de backup aangepast met AUTO_INCREMENT erin en alle tabellen verwijderd en hierna weer een import gedaan. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now