Hi. PhpDig version 1.8.0 already has the following code in the config file:
PHP Code:
if ((isset($relative_script_path)) && ($relative_script_path != ".") && ($relative_script_path != "..")) {
exit();
}
if (eregi("config.php",$_SERVER['SCRIPT_FILENAME']) || eregi("config.php",$_SERVER['REQUEST_URI'])) {
exit();
}
The code that gives the "Unable to connect to database : Check the connection script" errror is the following:
PHP Code:
// Connection configuration
define('PHPDIG_DB_PREFIX','<dbprefix>');
define('PHPDIG_DB_HOST','<host>');
define('PHPDIG_DB_USER','<user>');
define('PHPDIG_DB_PASS','<pass>');
define('PHPDIG_DB_NAME','<database>');
//connection to the MySql server
$id_connect = @mysql_connect(PHPDIG_DB_HOST,PHPDIG_DB_USER,PHPDIG_DB_PASS);
if (!$id_connect) {
die("Unable to connect to database : Check the connection script.\n");
}
Try calling the PhpDig version 1.8.0 connect.php file from the browser. If it throws the "Unable to connect to database : Check the connection script" error, then that means that the database variables are not properly configured.