51isoft/bnuoj

小白搭建过程中的问题,求解答

Closed this issue · 1 comments

搞了很久总算编译成功了,感觉距离成功已经很近了,但是遇到了问题,感觉上主要是配置文件怎么设置并不是很清楚,希望有大大能帮我找找哪里做错了。谢谢。。

系统&&问题描述

Debian 8.5 编译成功且后台已运行 但无法抓题。

后端运行截图:

前端错误截图:

目录结构:

--WEB前端
|-----Backend-----Dispatcher
|-----Vjudge

核心配置文件

WEB

//database informations
$config["database"]["type"] = "mysqli";
$config["database"]["host"] = "127.0.0.1";
$config["database"]["port"] = 3306;
$config["database"]["username"] = "root";
$config["database"]["password"] = "pwd";
$config["database"]["table"] = "BNU";

//contact strings ( no spaces )
$config["contact"]["submit"] = "yoursubmitstring";
$config["contact"]["rejudge"] = "yourrejudgestring";
$config["contact"]["error_rejudge"] = "yourerrorjudgestring";
$config["contact"]["challenge"] = "yourchallengestring";
$config["contact"]["pretest"] = "yourpreteststring";
$config["contact"]["test_all"] = "yourtestallstring";

// please manually uncomment the following line if you need external functions
$config["contact"]["dispatcher_token"] = "BNU";

//contact port
$config["contact"]["server"] = "127.0.0.1";
$config["contact"]["port"] = 5907;

//other
$config["OJcode"] = "BNU";
$config["base_url"] = "http://localhost/bnuoj-web-v3/";
$config["base_path"] = "/bnuoj-web-v3/";
$config["base_local_path"] = "/var/www/html/bnuoj-web-v3/";
$config["local_timezone"] = "Asia/Shanghai";
$config["salt_problem_in_contest"] = "[-,-]";
$config["database_debug"] = false;
$config["cookie_prefix"] = "bnuoj_v3_";
$config["default_style"] = "cerulean";
$config["use_latex_render"] = false;

Dispatcher配置文件

Database info

database_ip = 127.0.0.1
database_port = 3306
database_user = root
database_password = pwd
database_table = BNU

Bind port number

port_listen = 5907

Secret connect strings

judge_connect_string = BNU
submit_string = yoursubmitstring
rejudge_string = yourrejudgestring
error_rejudge_string = yourerrorjudgestring
challenge_string = yourchallengestring
pretest_string = yourpreteststring
test_all_string = yourtestallstring

Local judger name

local_identifier = BNU

Dispatcher配置文件

Dispatcher info

dispatcher_ip = 127.0.0.1
dispatcher_port = 5907

Secret connect string

judge_connect_string = BNU

curl timeout, in seconds

max_curl_time = 90

file paths

tmpfile_path = tmpfile/
cookies_path = cookies/
[HDU]

max wait for a run, in seconds

max_wait_time = 120
[[HDU1]]
username = 1111111
password = 0000000,

crccw commented

题目不会自动抓取,把数据库中user表里用户的is_root字段设置为2后,就可以进入后台抓题