安装Magento时出错

时间:2015-11-25 05:06:19

标签: php magento zend-framework magento2

我已下载Magento社区版和示例数据。我正在使用XAMPP,当我尝试安装Magento时,所有五个步骤都很好,如下所示

enter image description here

当我单击安装按钮时,安装过程将停止,并显示以下错误消息

Module 'Magento_Widget':

Installing schema..  [ERROR] exception 'Zend_Db_Exception'
with message 'Column "code" does not exist in table "widget".'
in C:\xampp\htdocs\Magento\vendor\magento\framework\DB\Adapter\Pdo\Mysql.php:967

Stack trace:
#0 C:\xampp\htdocs\Magento\vendor\magento\module-widget\Setup\InstallSchema.php(102): Magento\Framework\DB\Adapter\Pdo\Mysql->changeColumn('widget', 'code', 'widget_code', Array)
#1 C:\xampp\htdocs\Magento\setup\src\Magento\Setup\Model\Installer.php(798): Magento\Widget\Setup\InstallSchema->install(Object(Magento\Setup\Module\Setup), Object(Magento\Setup\Model\ModuleContext))
#2 C:\xampp\htdocs\Magento\setup\src\Magento\Setup\Model\Installer.php(732): Magento\Setup\Model\Installer->handleDBSchemaData(Object(Magento\Setup\Module\Setup), 'schema') 
#3 [internal function]: Magento\Setup\Model\Installer->installSchema() 
#4 C:\xampp\htdocs\Magento\setup\src\Magento\Setup\Model\Installer.php(331): call_user_func_array(Array, Array) 
#5 C:\xampp\htdocs\Magento\setup\src\Magento\Setup\Controller\Install.php(97): Magento\Setup\Model\Installer->install(Array) 
#6 C:\xampp\htdocs\Magento\vendor\zendframework\zend-mvc\src\Controller\AbstractActionController.php(82): Magento\Setup\Controller\Install->startAction() 
#7 [internal function]: Zend\Mvc\Controller\AbstractActionController->onDispatch(Object(Zend\Mvc\MvcEvent))
#8 C:\xampp\htdocs\Magento\vendor\zendframework\zend-eventmanager\src\EventManager.php(444): call_user_func(Array, Object(Zend\Mvc\MvcEvent))
#9 C:\xampp\htdocs\Magento\vendor\zendframework\zend-eventmanager\src\EventManager.php(205): Zend\EventManager\EventManager->triggerListeners('dispatch', Object(Zend\Mvc\MvcEvent), Object(Closure))
#10 C:\xampp\htdocs\Magento\vendor\zendframework\zend-mvc\src\Controller\AbstractController.php(118): Zend\EventManager\EventManager->trigger('dispatch', Object(Zend\Mvc\MvcEvent), Object(Closure))
#11 C:\xampp\htdocs\Magento\vendor\zendframework\zend-mvc\src\DispatchListener.php(93): Zend\Mvc\Controller\AbstractController->dispatch(Object(Zend\Http\PhpEnvironment\Request), Object(Zend\Http\PhpEnvironment\Response))
#12 [internal function]: Zend\Mvc\DispatchListener->onDispatch(Object(Zend\Mvc\MvcEvent))
#13 C:\xampp\htdocs\Magento\vendor\zendframework\zend-eventmanager\src\EventManager.php(444): call_user_func(Array, Object(Zend\Mvc\MvcEvent))
#14 C:\xampp\htdocs\Magento\vendor\zendframework\zend-eventmanager\src\EventManager.php(205): Zend\EventManager\EventManager->triggerListeners('dispatch', Object(Zend\Mvc\MvcEvent), Object(Closure))
#15 C:\xampp\htdocs\Magento\vendor\zendframework\zend-mvc\src\Application.php(314): Zend\EventManager\EventManager->trigger('dispatch', Object(Zend\Mvc\MvcEvent), Object(Closure))
#16 C:\xampp\htdocs\Magento\setup\index.php(31): Zend\Mvc\Application->run()
#17 {main}

请有人帮我解决此问题

2 个答案:

答案 0 :(得分:3)

问题是,数据库不干净。所以安装时确保数据库为空,现在安装成功。

答案 1 :(得分:0)

  1. 首先,请确保您在数据库详细信息步骤中输入了正确的数据库名称。

  2. 检查您的数据库,它必须是干净的。如果您已经从Magento主题导入了数据库,请清理它或创建一个空数据库。 (注意:在Magento安装期间,数据库应该为空)