zhuifengshaonianhanlu / pikachu

一个好玩的Web安全-漏洞测试平台
Apache License 2.0
3.75k stars 744 forks source link

bug: 非默认3306端口数据库连接失败 #37

Open akirawooo opened 1 year ago

akirawooo commented 1 year ago

/inc/config.inc.php配置数据库host,user,password,dbname,dbport; image /install.php 初始化19行,22行均未读取对应dbport进行连接,导致初始化失败; image patch: 11行后添加$dbport=DBPORT; 19行修改为if(!@mysqli_connect($dbhost, $dbuser, $dbpw, "", $dbport)){ 22行修改为$link=mysqli_connect(DBHOST, DBUSER, DBPW, "", DBPORT);

/index.php 14行同理未读取对应dbport进行连接,导致数据库读取失败; image patch: 14行修改为mysqli_connect(DBHOST,DBUSER,DBPW,DBNAME,DBPORT);

foresvandv commented 5 months ago

6 硬控我半小时 配置文件的port变量压根不传给mysqli_connect()