80064

安装失败,数据库创建错误'SQLSTATE[42000]:

回帖
回帖数 2
阅读数 8799
发表时间 2011-03-24 21:19:31
🌲
萨马兰德楼主
为什么会这样?

Fatal error: Uncaught exception 'PDOException' with message

'SQLSTATE[42000]: Syntax error or access violation: 1101 BLOB/TEXT column 'desc'

can't have a default value' in

D:projectEasyPHPwwwzentaomoduleinstallmodel.php:305 Stack trace: #0

D:projectEasyPHPwwwzentaomoduleinstallmodel.php(305):

PDO->query('CREATE TABLE IF...') #1

D:projectEasyPHPwwwzentaomoduleinstallmodel.php(191):

installModel->createTable('5.0') #2

D:projectEasyPHPwwwzentaomoduleinstallcontrol.php(95):

installModel->checkConfig() #3 [internal function]: install->step3() #4

D:projectEasyPHPwwwzentaoframeworkrouter.class.php(1111):

call_user_func_array(Array, Array) #5

D:projectEasyPHPwwwzentaowwwinstall.php(38): router->loadModule() #6

{main} thrown in D:projectEasyPHPwwwzentaomoduleinstallmodel.php

on line 305


系统环境:
System checking





Items

Current

Result

How to fix



PHP version

5.3.3

OK(√)





PDO extension

Loaded

OK(√)





PDO_MySQL extension

Loaded

OK(√)





Temp directory

Exists Writable

OK(√)





Upload directory.

Exists Writable

OK(√)



Welcome to the MySQL monitor. Commands end with ; or g.
Your MySQL connection id is 13 to server version: 5.0.27-community-nt

2个回复
🍟
春哥沙发
找到zentao/db/zentao.sql
60 CREATE TABLE IF NOT EXISTS `zt_build` (
61 `id` mediumint(8) unsigned NOT NULL auto_increment,
62 `company` mediumint(8) unsigned NOT NULL,
63 `product` mediumint(8) unsigned NOT NULL default '0',
64 `project` mediumint(8) unsigned NOT NULL default '0',
65 `name` char(150) NOT NULL,
66 `scmPath` char(255) NOT NULL,
67 `filePath` char(255) NOT NULL,
68 `date` date NOT NULL,
69 `builder` char(30) NOT NULL default '',
70 `desc` text NOT NULL default '',
把70行的Default '',去掉。试试。

2011-03-24 22:27:26 王春生 回帖
🌇
王祥勇板凳
看看
2011-04-13 16:35:09 王祥勇 回帖
联系我们
联系人
丁芝/高级客户经理
电话(微信)
17663906485
QQ号码
1481227768
联系邮箱
dingzhi@chandao.com
返回顶部
客服头像
丁芝
高级客户经理
客服微信
17663906485
1481227768
统一服务热线 4006-8899-23
我要提问提问有任何问题,您都可以在这里提问。问题反馈反馈点击这里,让我们聆听您的建议与反馈。