1
jw716
Error, Can't access site!
  • 2004/9/21 21:41

  • jw716

  • Just popping in

  • Posts: 64

  • Since: 2004/5/1 2


I know this must have been answered here more than once but did a search and can't find answer.
Quote:
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

clas/database/databasefactory.php line 34 doesn't really tell me anything.
30    $instance =& new $class();
31            $instance->setLogger(XoopsLogger::instance());
32            $instance->setPrefix(XOOPS_DB_PREFIX);
33            if (!$instance->connect()) {
34                trigger_error("Unable to connect to database"E_USER_ERROR);
35            }
36        }
37        return $instance;


Address =http://www.ibewtravelers.net/IBEW/
This site has been up and running good without any changes in a while. Also have 2 other web pages using XOOPS at the same URI and the are working fine.
I have checked the mainfile.php and the information there to acess the db hasn't changed.
Don't know what to do next other than reinstalling the program then uploading last nights backup on the db.

Any help about what to do before I do that?

2
Stewdio
Re: Error, Can't access site!
  • 2004/9/21 21:58

  • Stewdio

  • Community Support Member

  • Posts: 1560

  • Since: 2003/5/7 1


Check your mainfile.php and make sure all settings are correct.

If you are sure they are, check other scripts on your domain that also use mySQL. If they can not function, then you have an issue with your servers sql data center and should contact your provider. In most case they have taken it down for a backup, or a restart and is only temporary.

3
jw716
Re: Error, Can't access site!
  • 2004/9/21 22:07

  • jw716

  • Just popping in

  • Posts: 64

  • Since: 2004/5/1 2


Two other web pages that use the same db, working good.
Checked mainfile.php and everything is correct.

4
Stewdio
Re: Error, Can't access site!
  • 2004/9/21 22:33

  • Stewdio

  • Community Support Member

  • Posts: 1560

  • Since: 2003/5/7 1


Ok so we know everything is ok on the host side of things. Double check and recheck that mainfile.php, it's very important. It's the only thing it could be and nothing else.

No trailing slashes, and make sure everything is 'between the quotes'. Once again, double check spelling and check your SQL via the admin panel on your host to be sure of the proper user/pass.

Your file should look exactly as below with your own settings.

// XOOPS Physical Path
// Physical path to your main XOOPS directory WITHOUT trailing slash
define('XOOPS_ROOT_PATH', '/path/to/your/root)';

// XOOPS Virtual Path (URL)
// Virtual path to your main XOOPS directory WITHOUT trailing slash
define('XOOPS_URL', 'http://www.yourdomain.com');

// Database
// Choose the database to be used
define('XOOPS_DB_TYPE', 'mysql');

// Table Prefix
// This prefix will be added to all new tables created to avoid name conflict in the database. If you are unsure, just use the default 'xoops'.
define('XOOPS_DB_PREFIX', 'xoops');

// Database Hostname
// Hostname of the database server. If you are unsure, 'localhost' works in most cases.
define('XOOPS_DB_HOST', 'localhost');

// Database Username
// Your database user account on the host
define('XOOPS_DB_USER', 'your_DB_userName');

// Database Password
// Password for your database user account
define('XOOPS_DB_PASS', 'yourPassword');

// Database Name
// The name of database on the host. The installer will attempt to create the database if not exist
define('XOOPS_DB_NAME', 'your_DB_name');

5
jw716
Re: Error, Can't access site!
  • 2004/9/21 23:13

  • jw716

  • Just popping in

  • Posts: 64

  • Since: 2004/5/1 2


OK, did find and correct the error.
Found a whitespace in the mainfile.php in the database name.
This was after the db name and the ' at the end of the name.
Somehow it got changed
Read
define('XOOPS_DB_NAME', 'ibewtr2_ibewtravelers');
Removed the space after ibewtravelers and everythng worked good again.

Thanks for the help.

6
Stewdio
Re: Error, Can't access site!
  • 2004/9/22 0:25

  • Stewdio

  • Community Support Member

  • Posts: 1560

  • Since: 2003/5/7 1


Glad to see your back in business.

7
jw716
Re: Error, Can't access site!
  • 2004/9/22 2:47

  • jw716

  • Just popping in

  • Posts: 64

  • Since: 2004/5/1 2


One added problem.
xcgal, debug!

Found it! Fixed it!

8
Sheeoni
Re: Error, Can't access site!
  • 2004/9/22 16:40

  • Sheeoni

  • Just popping in

  • Posts: 21

  • Since: 2004/5/3 1


Oh my gosh, I am having the same exact problems.. It started when my host bought a new server and transferred my site, and nothing has worked since Friday. It has been almost a week. =( I am very upset and want to fix this immediately. Can anyone help me with this same problem? I am modifying my information as the post above has explained, but what is the XOOPS Database name exactly?

9
jw716
Re: Error, Can't access site!
  • 2004/9/22 16:51

  • jw716

  • Just popping in

  • Posts: 64

  • Since: 2004/5/1 2


That would be the name of your database.
The database name your XOOPS portal uses.

10
Sheeoni
Re: Error, Can't access site!
  • 2004/9/22 16:55

  • Sheeoni

  • Just popping in

  • Posts: 21

  • Since: 2004/5/3 1


This is the MySQL database name that is used?

Login

Who's Online

117 user(s) are online (55 user(s) are browsing Support Forums)


Members: 0


Guests: 117


more...

Donat-O-Meter

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

Latest GitHub Commits