1
Stitch19
PLEASE HELP ??? (This page cannot be displayed due to an internal error.)
  • 2004/12/18 10:59

  • Stitch19

  • Just popping in

  • Posts: 81

  • Since: 2004/12/18


Hi...
My site problem is that when i opened it this message apears:

This page cannot be displayed due to an internal error.

If you are the administrator of this site, please visit the XOOPS Troubleshooting Page for assistance.

Error [Xoops]: Unable to connect to database in file class/database/databasefactory.php line 34

So i go to the .php file i opened it with wordpad and i do not know what is the problem and what to do ???
Here is the .php file:
class XoopsDatabaseFactory
{

function XoopsDatabaseFactory()
{
}

/**
* Get a reference to the only instance of database class and connects to DB
*
* if the class has not been instantiated yet, this will also take
* care of that
*
* @static
* @staticvar object The only instance of database class
* @return object Reference to the only instance of database class
*/
function &getDatabaseConnection()
{
static $instance;
if (!isset($instance)) {
$file = XOOPS_ROOT_PATH.'/class/database/'.XOOPS_DB_TYPE.'database.php';
require_once $file;
if (!defined('XOOPS_DB_PROXY')) {
$class = 'Xoops'.ucfirst(XOOPS_DB_TYPE).'DatabaseSafe';
} else {
$class = 'Xoops'.ucfirst(XOOPS_DB_TYPE).'DatabaseProxy';
}
$instance =& new $class();
$instance->setLogger(XoopsLogger::instance());
$instance->setPrefix(XOOPS_DB_PREFIX);
if (!$instance->connect(xoops1)) {
trigger_error("Unable to connect to database", E_USER_ERROR);
}
}
return $instance;
}

/**
* Gets a reference to the only instance of database class. Currently
* only being used within the installer.
*
* @static
* @staticvar object The only instance of database class
* @return object Reference to the only instance of database class
*/
function &getDatabase()
{
static $database;
if (!isset($database)) {
$file = XOOPS_ROOT_PATH.'/class/database/'.XOOPS_DB_TYPE.'database.php';
require_once $file;
if (!defined('XOOPS_DB_PROXY')) {
$class = 'Xoops'.ucfirst(XOOPS_DB_TYPE).'DatabaseSafe';
} else {
$class = 'Xoops'.ucfirst(XOOPS_DB_TYPE).'DatabaseProxy';
}
$database =& new $class();
}
return $database;
}


}
?>




And at line 34 writes:
trigger_error("Unable to connect to database", E_USER_ERROR);


PLEASE WHAT TO DO ??????????????????????

2
irmtfan
Re: PLEASE HELP ??? (This page cannot be displayed due to an internal error.)
  • 2004/12/18 11:05

  • irmtfan

  • Module Developer

  • Posts: 3419

  • Since: 2003/12/7


please do a serach before posting. FROM FAQ:
https://xoops.org/modules/smartfaq/faq.php?faqid=279

3
Herko
Re: PLEASE HELP ??? (This page cannot be displayed due to an internal error.)
  • 2004/12/18 11:05

  • Herko

  • XOOPS is my life!

  • Posts: 4238

  • Since: 2002/2/4 1


It means that the server your site is on is unable to connect to the database. That is something XOOPS cannot infuence. Contact your hosting provider to see if the database server is down (happens every now and again.

Herko

Login

Who's Online

374 user(s) are online (321 user(s) are browsing Support Forums)


Members: 0


Guests: 374


more...

Donat-O-Meter

Stats
Goal: $100.00
Due Date: Nov 30
Gross Amount: $0.00
Net Balance: $0.00
Left to go: $100.00
Make donations with PayPal!

Latest GitHub Commits