Coder Social home page Coder Social logo

Comments (8)

xingliguang avatar xingliguang commented on May 1, 2024

我发现切换到主机管理界面,就会报上面的错,能不能将建表语句修改一下呢?

CREATE TABLE cc_UserCustom (
UserName varchar(16) NOT NULL default '',
DefaultApplication int(11) NOT NULL default '0',
DefaultColumn text NOT NULL default '',
DefaultPageSize int(2) NOT NULL default '20',
DefaultField varchar(512) NOT NULL default '' COMMENT '主机查询字段',
DefaultCon text NOT NULL default '' COMMENT '主机查询条件', #这里的错误
Description varchar(256) NOT NULL default '',
SetGseCol int(1) NOT NULL DEFAULT '0',
PRIMARY KEY (UserName)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC COMMENT='用户定制表';
改为:
CREATE TABLE cc_UserCustom (
UserName varchar(16) NOT NULL default '',
DefaultApplication int(11) NOT NULL default '0',
DefaultColumn text NOT NULL default '',
DefaultPageSize int(2) NOT NULL default '20',
DefaultField varchar(512) NOT NULL default '' COMMENT '主机查询字段',
DefaultCon varchar(512) NOT NULL default '' COMMENT '主机查询条件', #改成这样?
Description varchar(256) NOT NULL default '',
SetGseCol int(1) NOT NULL DEFAULT '0',
PRIMARY KEY (UserName)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC COMMENT='用户定制表';
@lowenitt

from bk-cmdb.

xingliguang avatar xingliguang commented on May 1, 2024

@lowenitt 我将上面表结构改为了如下:
DROP TABLE IF EXISTS cc_UserCustom;
CREATE TABLE cc_UserCustom (
UserName varchar(16) NOT NULL default '',
DefaultApplication int(11) NOT NULL default '0',
DefaultColumn varchar(512) NOT NULL default '', #原来是text
DefaultPageSize int(2) NOT NULL default '20',
DefaultField varchar(512) NOT NULL default '' COMMENT '主机查询字段',
DefaultCon varchar(512) NOT NULL default '' COMMENT '主机查询条件', #原来是text
Description varchar(256) NOT NULL default '',
SetGseCol int(1) NOT NULL DEFAULT '0',
PRIMARY KEY (UserName)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC COMMENT='用户定制表';
重新创建此表,点击“主机管理”页面,log中不会出现第一次描述中的那种错误了,不知道我这种修改,会不会影响后续平台的使用?
但是无法添加新用户的情况依然存在。

from bk-cmdb.

owenlxu avatar owenlxu commented on May 1, 2024

嗯,明白你的意思了,你可以把字段长度设置长一点,比如1024 ,然后发起pull request ,我们鼓励大家和我们一起改进系统和代码

from bk-cmdb.

xingliguang avatar xingliguang commented on May 1, 2024

@lowenitt 那么,想问一下, 无法添加用户的情况,如何解决呢?

from bk-cmdb.

owenlxu avatar owenlxu commented on May 1, 2024

请更新下代码,如果输入有错误,会提示的

from bk-cmdb.

xingliguang avatar xingliguang commented on May 1, 2024

@lowenitt 我是这样更新的代码,不知道符合要求不:
重新clone 代码,使用新的代码,没有重新导入数据(bk-cmdb.sql),没有重新执行初始化数据
(php index.php /cli/Init/initUserData )然后重启nginx和php,重新添加用户:
image
点击“新增”按钮,页面没响应。
也已经将index.php 中改为了 ini_set('display_errors', 1);
没有看到错误日志,日志中内容如下:
INFO - 2016-12-29 10:45:31 --> Encryption: OpenSSL initialized with method AES-128-CBC.
INFO - 2016-12-29 10:45:31 --> Encryption Class Initialized
INFO - 2016-12-29 10:45:31 --> Database Driver Class Initialized
DEBUG - 2016-12-29 10:45:31 --> Login class already loaded. Second attempt ignored.
DEBUG - 2016-12-29 10:45:31 --> Login class already loaded. Second attempt ignored.
INFO - 2016-12-29 10:45:31 --> File loaded: /data/htdocs/cc_openSource/application/views/account/index.php
INFO - 2016-12-29 10:45:31 --> File loaded: /data/htdocs/cc_openSource/application/views/layout.php
INFO - 2016-12-29 10:45:31 --> Final output sent to browser
DEBUG - 2016-12-29 10:45:31 --> Total execution time: 0.2387
INFO - 2016-12-29 10:54:08 --> Config Class Initialized
INFO - 2016-12-29 10:54:08 --> Hooks Class Initialized
DEBUG - 2016-12-29 10:54:08 --> UTF-8 Support Enabled
INFO - 2016-12-29 10:54:08 --> Utf8 Class Initialized
INFO - 2016-12-29 10:54:08 --> URI Class Initialized
INFO - 2016-12-29 10:54:08 --> Router Class Initialized
INFO - 2016-12-29 10:54:08 --> Output Class Initialized
INFO - 2016-12-29 10:54:08 --> Security Class Initialized
DEBUG - 2016-12-29 10:54:08 --> Global POST, GET and COOKIE data sanitized
INFO - 2016-12-29 10:54:08 --> Input Class Initialized
INFO - 2016-12-29 10:54:08 --> Language Class Initialized
INFO - 2016-12-29 10:54:08 --> Loader Class Initialized
DEBUG - 2016-12-29 10:54:08 --> Config file loaded: /data/htdocs/cc_openSource/application/config/errorcode.php
INFO - 2016-12-29 10:54:08 --> Session: Class initialized using 'files' driver.
DEBUG - 2016-12-29 10:54:08 --> Session class already loaded. Second attempt ignored.
DEBUG - 2016-12-29 10:54:08 --> Session class already loaded. Second attempt ignored.
INFO - 2016-12-29 10:54:08 --> Controller Class Initialized
INFO - 2016-12-29 10:54:08 --> Parser Class Initialized
INFO - 2016-12-29 10:54:08 --> Language file loaded: language/english/zh_cn_lang.php
DEBUG - 2016-12-29 10:54:08 --> Login class already loaded. Second attempt ignored.
DEBUG - 2016-12-29 10:54:08 --> Encryption: Auto-configured driver 'openssl'.
INFO - 2016-12-29 10:54:08 --> Encryption: OpenSSL initialized with method AES-128-CBC.
INFO - 2016-12-29 10:54:08 --> Encryption Class Initialized
INFO - 2016-12-29 10:54:08 --> Database Driver Class Initialized
DEBUG - 2016-12-29 10:54:08 --> Login class already loaded. Second attempt ignored.
DEBUG - 2016-12-29 10:54:08 --> Login class already loaded. Second attempt ignored.
INFO - 2016-12-29 10:54:08 --> File loaded: /data/htdocs/cc_openSource/application/views/account/index.php
INFO - 2016-12-29 10:54:08 --> File loaded: /data/htdocs/cc_openSource/application/views/layout.php
INFO - 2016-12-29 10:54:08 --> Final output sent to browser
DEBUG - 2016-12-29 10:54:08 --> Total execution time: 0.1178
INFO - 2016-12-29 10:54:10 --> Config Class Initialized
INFO - 2016-12-29 10:54:10 --> Hooks Class Initialized
DEBUG - 2016-12-29 10:54:10 --> UTF-8 Support Enabled
INFO - 2016-12-29 10:54:10 --> Utf8 Class Initialized
INFO - 2016-12-29 10:54:10 --> URI Class Initialized
INFO - 2016-12-29 10:54:10 --> Router Class Initialized
INFO - 2016-12-29 10:54:10 --> Output Class Initialized
INFO - 2016-12-29 10:54:10 --> Security Class Initialized
DEBUG - 2016-12-29 10:54:10 --> Global POST, GET and COOKIE data sanitized
INFO - 2016-12-29 10:54:10 --> Input Class Initialized
INFO - 2016-12-29 10:54:10 --> Language Class Initialized
INFO - 2016-12-29 10:54:10 --> Loader Class Initialized
DEBUG - 2016-12-29 10:54:10 --> Config file loaded: /data/htdocs/cc_openSource/application/config/errorcode.php
INFO - 2016-12-29 10:54:10 --> Session: Class initialized using 'files' driver.
DEBUG - 2016-12-29 10:54:10 --> Session class already loaded. Second attempt ignored.
DEBUG - 2016-12-29 10:54:10 --> Session class already loaded. Second attempt ignored.
INFO - 2016-12-29 10:54:10 --> Controller Class Initialized
INFO - 2016-12-29 10:54:10 --> Parser Class Initialized
INFO - 2016-12-29 10:54:10 --> Language file loaded: language/english/zh_cn_lang.php
DEBUG - 2016-12-29 10:54:10 --> Login class already loaded. Second attempt ignored.
DEBUG - 2016-12-29 10:54:10 --> Encryption: Auto-configured driver 'openssl'.
INFO - 2016-12-29 10:54:10 --> Encryption: OpenSSL initialized with method AES-128-CBC.
INFO - 2016-12-29 10:54:10 --> Encryption Class Initialized
INFO - 2016-12-29 10:54:10 --> Database Driver Class Initialized
DEBUG - 2016-12-29 10:54:10 --> Login class already loaded. Second attempt ignored.
DEBUG - 2016-12-29 10:54:10 --> Login class already loaded. Second attempt ignored.
INFO - 2016-12-29 10:54:10 --> File loaded: /data/htdocs/cc_openSource/application/views/account/index.php
INFO - 2016-12-29 10:54:10 --> File loaded: /data/htdocs/cc_openSource/application/views/layout.php
INFO - 2016-12-29 10:54:10 --> Final output sent to browser
DEBUG - 2016-12-29 10:54:10 --> Total execution time: 0.1170

from bk-cmdb.

sunssy avatar sunssy commented on May 1, 2024

描述:
点击“用户管理”页面,然后点击“新增用户”,填写好用户信息后,点击新增无报错无反应,也无法成功添加用户。
image

日志如下:
INFO - 2017-02-10 14:42:58 --> Config Class Initialized
INFO - 2017-02-10 14:42:58 --> Hooks Class Initialized
DEBUG - 2017-02-10 14:42:58 --> UTF-8 Support Enabled
INFO - 2017-02-10 14:42:58 --> Utf8 Class Initialized
INFO - 2017-02-10 14:42:58 --> URI Class Initialized
INFO - 2017-02-10 14:42:58 --> Router Class Initialized
INFO - 2017-02-10 14:42:58 --> Output Class Initialized
INFO - 2017-02-10 14:42:58 --> Security Class Initialized
DEBUG - 2017-02-10 14:42:58 --> Global POST, GET and COOKIE data sanitized
INFO - 2017-02-10 14:42:58 --> Input Class Initialized
INFO - 2017-02-10 14:42:58 --> Language Class Initialized
INFO - 2017-02-10 14:42:58 --> Loader Class Initialized
DEBUG - 2017-02-10 14:42:58 --> Config file loaded: /data/webapp/bk_cmdb/application/config/errorcode.php
INFO - 2017-02-10 14:42:58 --> Session: Class initialized using 'files' driver.
DEBUG - 2017-02-10 14:42:58 --> Session class already loaded. Second attempt ignored.
DEBUG - 2017-02-10 14:42:58 --> Session class already loaded. Second attempt ignored.
INFO - 2017-02-10 14:42:58 --> Controller Class Initialized
INFO - 2017-02-10 14:42:58 --> Parser Class Initialized
INFO - 2017-02-10 14:42:58 --> Language file loaded: language/english/zh_cn_lang.php
DEBUG - 2017-02-10 14:42:58 --> Login class already loaded. Second attempt ignored.
DEBUG - 2017-02-10 14:42:58 --> Encryption: Auto-configured driver 'openssl'.
INFO - 2017-02-10 14:42:58 --> Encryption: OpenSSL initialized with method AES-128-CBC.
INFO - 2017-02-10 14:42:58 --> Encryption Class Initialized
INFO - 2017-02-10 14:42:58 --> Database Driver Class Initialized
DEBUG - 2017-02-10 14:42:58 --> Encryption class already loaded. Second attempt ignored.
DEBUG - 2017-02-10 14:42:58 --> Login class already loaded. Second attempt ignored.
DEBUG - 2017-02-10 14:42:58 --> Login class already loaded. Second attempt ignored.
INFO - 2017-02-10 14:42:58 --> File loaded: /data/webapp/bk_cmdb/application/views/account/index.php
INFO - 2017-02-10 14:42:58 --> File loaded: /data/webapp/bk_cmdb/application/views/layout.php
INFO - 2017-02-10 14:42:58 --> Final output sent to browser
DEBUG - 2017-02-10 14:42:58 --> Total execution time: 0.0944

from bk-cmdb.

owenlxu avatar owenlxu commented on May 1, 2024

尝试更新下版本吧

from bk-cmdb.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.