Coder Social home page Coder Social logo

请求200, 首页显示空白 about bk-cmdb HOT 13 CLOSED

tencent avatar tencent commented on May 1, 2024
请求200, 首页显示空白

from bk-cmdb.

Comments (13)

gavindev avatar gavindev commented on May 1, 2024 2

空白页还有一种可能是$config['sess_save_path'] 指定的路径不能写,可以指定为

$config['sess_save_path'] = '/tmp/session';

from bk-cmdb.

owenlxu avatar owenlxu commented on May 1, 2024 1

可以直接切换
'dbdriver' => 'mysql',
修改下php下的驱动吧

from bk-cmdb.

zhoushiyang avatar zhoushiyang commented on May 1, 2024

切换到工程根目录下执行php index.php /cli/Init/initUserData
没有数据插入到表中,目前整个数据库实例的所有表中均没有数据,是否导致空白的原因,请官方尽快给个答复, 谢谢!

from bk-cmdb.

huangmeng4520 avatar huangmeng4520 commented on May 1, 2024

我的问题和你一样,在日志里面发现问题了,执行php index.php /cli/Init/initUserData命令时,报错了
ERROR - 2016-12-21 15:23:59 --> Severity: error --> Exception: Call to undefined function mysql_connect() /var/www/system/database/drivers/mysql/mysql_driver.php 136

from bk-cmdb.

huangmeng4520 avatar huangmeng4520 commented on May 1, 2024

@tencent-adm

  1. 本人使用docker搭建环境

/config/development/constants.php 里面的配置已经改成主机访问地址
image

创建数据库,导入sql文件执行数据初始化已经完成

执行 php index.php /cli/Init/initUserData 命令时报错

ERROR - 2016-12-21 15:23:59 --> Severity: error --> Exception: Call to undefined function mysql_connect() /var/www/system/database/drivers/mysql/mysql_driver.php 136

导致访问时主机空白 /account/login?cburl= 默认缺少cbcurl参数

from bk-cmdb.

owenlxu avatar owenlxu commented on May 1, 2024

请按以下顺序配置:
1.建数据库,导入项目中提供的sql文件
2.在db.php中配置数据库访问
3.执行命令

from bk-cmdb.

huangmeng4520 avatar huangmeng4520 commented on May 1, 2024

就是按照这个顺序执行的,sql已经导入cmdb库,db.php已经配置。执行命令时日志就报错,我用的php是7.0.2版本。

from bk-cmdb.

huangmeng4520 avatar huangmeng4520 commented on May 1, 2024

就是按照这个顺序执行的,sql已经导入cmdb库,db.php已经配置。执行命令时日志就报错,我用的php是7.0.2版本。

from bk-cmdb.

vipsql avatar vipsql commented on May 1, 2024

同样的问题

from bk-cmdb.

owenlxu avatar owenlxu commented on May 1, 2024

也都是php7 执行命令报错吗?

from bk-cmdb.

raindylong avatar raindylong commented on May 1, 2024

一样的梗,php7.0缺省已经不支持老版本的"mysql"扩展了,php7以后都是推荐直接用pdo_mysql了。

from bk-cmdb.

vipsql avatar vipsql commented on May 1, 2024

php版本7.0+;修改dbdriver=>'mysqli'即可

from bk-cmdb.

zhoushiyang avatar zhoushiyang commented on May 1, 2024

已找到原因,php执行程序的版本过低,执行初始化的时候没有插入数据。

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.