|
如果要安装演示数据需要先安装演示数据库,然后再安装Magento,记得环境尽量接近程序包里面的php.ini.sample的设置要求,演示数据库管理员是admin,密码是123123,如果发现登陆不了,可以注册一个用户名后,将新注册的用户名密码字段值覆盖掉管理员的密码即可。
安装完magento后浏览前台时会出现下面的错误:
(继续)
SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry ‘765’ for key ‘PRIMARY’
Trace:
#0 C:\xampp\htdocs\okkare\lib\Zend\Db\Statement.php(283): Zend_Db_Statement_Pdo->_execute(Array)
#1 C:\xampp\htdocs\okkare\lib\Zend\Db\Adapter\Abstract.php(457): Zend_Db_Statement->execute(Array)
#2 C:\xampp\htdocs\okkare\lib\Zend\Db\Adapter\Pdo\Abstract.php(230): Zend_Db_Adapter_Abstract->query(’INSERT INTO `lo...’, Array)
#3 C:\xampp\htdocs\okkare\lib\Varien\Db\Adapter\Pdo\Mysql.php(258): Zend_Db_Adapter_Pdo_Abstract->query(’INSERT INTO `lo...’, Array)
#4 C:\xampp\htdocs\okkare\lib\Zend\Db\Adapter\Abstract.php(535): Varien_Db_Adapter_Pdo_Mysql->query(’INSERT INTO `lo...’, Array)
#5 C:\xampp\htdocs\okkare\app\code\core\Mage\Core\Model\Mysql4\Abstract.php(349): Zend_Db_Adapter_Abstract->insert(’log_visitor’, Array)
#6 C:\xampp\htdocs\okkare\app\code\core\Mage\Core\Model\Abstract.php(251): Mage_Core_Model_Mysql4_Abstract->save(Object(Mage_Log_Model_Visitor))
#7 C:\xampp\htdocs\okkare\app\code\core\Mage\Log\Model\Visitor.php(157): Mage_Core_Model_Abstract->save()
#8 C:\xampp\htdocs\okkare\app\code\core\Mage\Core\Model\App.php(1166): Mage_Log_Model_Visitor->initByRequest(Object(Varien_Event_Observer))
#9 C:\xampp\htdocs\okkare\app\Mage.php(301): Mage_Core_Model_App->dispatchEvent(’controller_acti...’, Array)
#10 C:\xampp\htdocs\okkare\app\code\core\Mage\Core\Controller\Varien\Action.php(410): Mage::dispatchEvent(’controller_acti...’, Array)
#11 C:\xampp\htdocs\okkare\app\code\core\Mage\Core\Controller\Front\Action.php(45): Mage_Core_Controller_Varien_Action->preDispatch()
#12 C:\xampp\htdocs\okkare\app\code\core\Mage\Core\Controller\Varien\Action.php(356): Mage_Core_Controller_Front_Action->preDispatch()
#13 C:\xampp\htdocs\okkare\app\code\core\Mage\Core\Controller\Varien\Router\Standard.php(163): Mage_Core_Controller_Varien_Action->dispatch(’index’)
#14 C:\xampp\htdocs\okkare\app\code\core\Mage\Core\Controller\Varien\Front.php(158): Mage_Core_Controller_Varien_Router_Standard->match(Object(Mage_Core_Controller_Request_Http))
#15 C:\xampp\htdocs\okkare\app\Mage.php(457): Mage_Core_Controller_Varien_Front->dispatch()
#16 C:\xampp\htdocs\okkare\index.php(52): Mage::run()
#17 {main}
这个问题很多网友都有遇到,解决的办法很简单,到phpmyadmin中打开magento的数据库,选择所有的表,执行修复。到前台再刷新一次即Ok。
另外记得要在后台缓存管理中将产品目录缓存更新一下才能看到产品页。不然前台很多页面无法看到。
|
|