I think it may be a database connection issue. I can connect to my database with other php pages using MY db_con.php. I'm not sure how to alter the whiteboard.class.php to use my db_con.php.
my db_con.php
<?
$db_hostname = "localhost";
$db_name = "my_data";
$db_username = "user";
$db_password = "pass";
$db_link = @mysql_connect($db_hostname, $db_username, $db_password);
$db_get = mysql_select_db($db_name, $db_link);
?>
the config.php that came with the script
<?
// defines database connection data
define("DB_HOST", "localhost");
define("DB_USER", "user");
define("DB_PASSWORD", "pass");
define("DB_DATABASE", "my_data");
?>
the relevent part of whiteboard.class.php
// load configuration file
require_once('config.php');
// load error handling file
require_once('error_handler.php');
// class handles server side whiteboard support functionality
class Whiteboard
{
// database handler
private $mMysqli;
// define the number of maximum records in the table
private $mMaxLoad = 5000;
/* constructor opens database connection */
function __construct()
{
$this->mMysqli = new mysqli(DB_HOST, DB_USER, DB_PASSWORD, DB_DATABASE);
}
/* destructor, closes database connection */
function __destruct()
{
$this->mMysqli->close();
}
/*
The checkLoad method clears the whiteboard table if
it contains more than a specified number of records
*/
public function checkLoad()
{
// build the SQL query to get the number of lines
$check_load = 'SELECT SUM(length) total_length FROM whiteboard';
// execute the SQL query
$result = $this->mMysqli->query($check_load);
$row = $result->fetch_array(MYSQLI_ASSOC);