Jump to content

PrestashopDatabaseException Page d'erreur


Recommended Posts

Bonjour, surprise ce matin en voulant me connecter pour continuer mes travaux sur mon site...

Une page d'erreur s'affiche:

 

[PrestaShopDatabaseException]

Failed to read auto-increment value from storage engine

INSERT INTO `ps_guest` (`id_operating_system`, `id_web_browser`, `id_customer`, `javascript`, `screen_resolution_x`, `screen_resolution_y`, `screen_color`, `sun_java`, `adobe_flash`, `adobe_director`, `apple_quicktime`, `real_player`, `windows_media`, `accept_language`, `mobile_theme`) VALUES ('2', '3', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '', '0')

at line 623 in file classes/db/Db.php

617. 			WebserviceRequest::getInstance()->setError(500, '[SQL Error] '.$this->getMsgError().'. From '.(isset($dbg[3]['class']) ? $dbg[3]['class'] : '').'->'.$dbg[3]['function'].'() Query was : '.$sql, 97);618. 		}619. 		else if (_PS_DEBUG_SQL_ && $errno && !defined('PS_INSTALLATION_IN_PROGRESS'))620. 		{621. 			if ($sql)622. 				throw new PrestaShopDatabaseException($this->getMsgError().'<br /><br /><pre>'.$sql.'</pre>');623. 			throw new PrestaShopDatabaseException($this->getMsgError());624. 		}625. 	}626. 627. 	/**

 

Je suis perdu...

 

 

Je viens de vouloir me connecter a mon back office, je ne peux pas aller sur la partie "module"... je ne peux donc rien faire de ce coter là...

 

voiçi le message dans le back office quand je clique sur "Module" :

 

[PrestaShopDatabaseException]

Got error -1 from storage engine
 

		UPDATE `ps_module` m		SET m.version = '1.3.0'		WHERE m.name = 'statslive'

at line 623 in file classes/db/Db.php

617. 			WebserviceRequest::getInstance()->setError(500, '[SQL Error] '.$this->getMsgError().'. From '.(isset($dbg[3]['class']) ? $dbg[3]['class'] : '').'->'.$dbg[3]['function'].'() Query was : '.$sql, 97);618. 		}619. 		else if (_PS_DEBUG_SQL_ && $errno && !defined('PS_INSTALLATION_IN_PROGRESS'))620. 		{621. 			if ($sql)622. 				throw new PrestaShopDatabaseException($this->getMsgError().'<br /><br /><pre>'.$sql.'</pre>');623. 			throw new PrestaShopDatabaseException($this->getMsgError());624. 		}625. 	}626. 627. 	/**

 

Edited by JoeDev1 (see edit history)
Link to comment
Share on other sites

The ps_guest table has wrong schema. Compare it with this:

CREATE TABLE IF NOT EXISTS `ps_guest` (
  `id_guest` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `id_operating_system` int(10) unsigned DEFAULT NULL,
  `id_web_browser` int(10) unsigned DEFAULT NULL,
  `id_customer` int(10) unsigned DEFAULT NULL,
  `javascript` tinyint(1) DEFAULT '0',
  `screen_resolution_x` smallint(5) unsigned DEFAULT NULL,
  `screen_resolution_y` smallint(5) unsigned DEFAULT NULL,
  `screen_color` tinyint(3) unsigned DEFAULT NULL,
  `sun_java` tinyint(1) DEFAULT NULL,
  `adobe_flash` tinyint(1) DEFAULT NULL,
  `adobe_director` tinyint(1) DEFAULT NULL,
  `apple_quicktime` tinyint(1) DEFAULT NULL,
  `real_player` tinyint(1) DEFAULT NULL,
  `windows_media` tinyint(1) DEFAULT NULL,
  `accept_language` varchar(8) DEFAULT NULL,
  `mobile_theme` tinyint(1) NOT NULL DEFAULT '0',
  PRIMARY KEY (`id_guest`),
  KEY `id_customer` (`id_customer`),
  KEY `id_operating_system` (`id_operating_system`),
  KEY `id_web_browser` (`id_web_browser`)
) ENGINE=InnoDB  DEFAULT CHARSET=utf8 AUTO_INCREMENT=4 ;
Link to comment
Share on other sites

I just checked

 

CREATE TABLE IF NOT EXISTS `ps_guest` (
  `id_guest` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `id_operating_system` int(10) unsigned DEFAULT NULL,
  `id_web_browser` int(10) unsigned DEFAULT NULL,
  `id_customer` int(10) unsigned DEFAULT NULL,
  `javascript` tinyint(1) DEFAULT '0',
  `screen_resolution_x` smallint(5) unsigned DEFAULT NULL,
  `screen_resolution_y` smallint(5) unsigned DEFAULT NULL,
  `screen_color` tinyint(3) unsigned DEFAULT NULL,
  `sun_java` tinyint(1) DEFAULT NULL,
  `adobe_flash` tinyint(1) DEFAULT NULL,
  `adobe_director` tinyint(1) DEFAULT NULL,
  `apple_quicktime` tinyint(1) DEFAULT NULL,
  `real_player` tinyint(1) DEFAULT NULL,
  `windows_media` tinyint(1) DEFAULT NULL,
  `accept_language` varchar(8) DEFAULT NULL,
  `mobile_theme` tinyint(1) NOT NULL DEFAULT '0',
  PRIMARY KEY (`id_guest`),
  KEY `id_customer` (`id_customer`),
  KEY `id_operating_system` (`id_operating_system`),
  KEY `id_web_browser` (`id_web_browser`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

Link to comment
Share on other sites

Open the SQL tab, insert this query to the window and then click the Go button (tested):

SELECT (MAX(id_guest) + 1) INTO @counter FROM ps_guest;
SET @sql = CONCAT('ALTER TABLE ps_guest AUTO_INCREMENT=',@counter);
PREPARE s FROM @sql; EXECUTE s; DEALLOCATE PREPARE s;
Edited by tuk66 (see edit history)
Link to comment
Share on other sites


when I click then SQL INSERT :

INSERT INTO `ps_guest`(`id_guest`, `id_operating_system`, `id_web_browser`, `id_customer`, `javascript`, `screen_resolution_x`, `screen_resolution_y`, `screen_color`, `sun_java`, `adobe_flash`, `adobe_director`, `apple_quicktime`, `real_player`, `windows_media`, `accept_language`, `mobile_theme`) VALUES ([value-1],[value-2],[value-3],[value-4],[value-5],[value-6],[value-7],[value-8],[value-9],[value-10],[value-11],[value-12],[value-13],[value-14],[value-15],[value-16])

 

Link to comment
Share on other sites

is what I have to put it like this ?

SELECT (MAX(id_guest) + 1) INTO @counter FROM ps_guest;

SET @sql = CONCAT('ALTER TABLE ps_guest AUTO_INCREMENT=',@counter);

PREPARE s FROM @sql; EXECUTE s; DEALLOCATE PREPARE s;INSERT INTO `ps_guest`(`id_guest`, `id_operating_system`, `id_web_browser`, `id_customer`, `javascript`, `screen_resolution_x`, `screen_resolution_y`, `screen_color`, `sun_java`, `adobe_flash`, `adobe_director`, `apple_quicktime`, `real_player`, `windows_media`, `accept_language`, `mobile_theme`) VALUES ([value-1],[value-2],[value-3],[value-4],[value-5],[value-6],[value-7],[value-8],[value-9],[value-10],[value-11],[value-12],[value-13],[value-14],[value-15],[value-16])

Link to comment
Share on other sites

is what I need to delete and only what you wrote me?

SELECT * FROM `ps_guest` WHERE 1 SELECT (MAX(id_guest) + 1) INTO @counter FROM ps_guest;

SET @sql = CONCAT('ALTER TABLE ps_guest AUTO_INCREMENT=',@counter);

PREPARE s FROM @sql; EXECUTE s; DEALLOCATE PREPARE s;

 

Or only :

 

SELECT (MAX(id_guest) + 1) INTO @counter FROM ps_guest;

SET @sql = CONCAT('ALTER TABLE ps_guest AUTO_INCREMENT=',@counter);

PREPARE s FROM @sql; EXECUTE s; DEALLOCATE PREPARE s;

 

thank you

Link to comment
Share on other sites

J'ai mis 300 articles en ventes sur mon site, avec 3 photos par article, est ce qu'il ce pourrait que ce soit la cause du probleme ?

Mais je pense pas la base de donnée n'a pas l'air pleine.

 

Mon hebergeur me dit que tout est ok... :(

 

Je rappel que hier soir tout fonctionnait nickel! et là ce matin :

 

[PrestaShopDatabaseException]

Failed to read auto-increment value from storage engine

 

 

 

Le site aurait du etre mis en ligne la semaine prochaine :( 

Link to comment
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...