• There is NO official Otland's Discord server and NO official Otland's server list. The Otland's Staff does not manage any Discord server or server list. Moderators or administrator of any Discord server or server lists have NO connection to the Otland's Staff. Do not get scammed!

Windows (dirty fix) Empty webpage using and Znote AAC 1.5_SVN on github (from 2nd feb)

exura

New Member
Joined
Feb 2, 2014
Messages
10
Reaction score
0
Hi,
I've set this up on a tfs 0.2.3 with znote aac 1.4_public using the same coral uniserver, just one day ago.

But with the znote aac 1.5_svn on github (the one updated 2nd of feb) and with TFS 1.0 I get an empty page entering localhost in the webpage. (before and after changing the config.php).

It turns out that the added mysqli scripts doesn't use the die() function, thus continues the script when the sql can't connect and viola: no output!

So as a fix change this, add an exit() in the $connect declaration.
Also, I haven't got the mysql_real_escape_string to work so I commented it out.

Anyone knows how to fix the mysql_real_escape_string using mysqli_real_escape_string?


Code:
$connect = new mysqli($config['sqlHost'], $config['sqlUser'], $config['sqlPassword'], $config['sqlDatabase']);
if ($connect->connect_errno) {
  echo "Failed to connect to MySQL: (" . $connect->connect_errno . ") " . $connect->connect_error . $install;
  exit("Exiting!!!!");
}
/*
function mysql_real_escape_string($escapestr) {
  global $connect;
  return mysqli_real_escape_string($connect, $escapestr);
}
*/
 
Back
Top