1
Anonymous
Unable to connect to database (databasefactory.php line 34)
  • 2004/5/7 21:56

  • Anonymous

  • Posts: 0

  • Since:


Hi, could someone please help. I have been building my site for last couple of days and it has been up fine. I have just tried to get to the page and I get the following error on a blank page.

Unable to connect to database in file class/database/databasefactory.php line 34

I have (using cpanel)
Checked my databases (mysql check and repair) and they are ok and Changed permissions to 777 for the database files (should I do this
Followed the wiki help link, but I cant find anywhere to choose "php debugging"

The last thing I did was load Noah's Classifieds onto one of my subdomains and gave it it's own database.

Is there anything else I can do
Thanks from a new guy

2
Bender
Re: Unable to connect to database (databasefactory.php line 34)
  • 2004/5/7 22:10

  • Bender

  • Home away from home

  • Posts: 1899

  • Since: 2003/3/10



Administration --> Preferences --> General Settings --> Debug Mode

is your friend to activate PHP Debugging mode.


3
Anonymous
Re: Unable to connect to database (databasefactory.php line 34)
  • 2004/5/7 22:14

  • Anonymous

  • Posts: 0

  • Since:


Bender
Thanks for the quick reply
but (thers always a but)
I cant get to my admin panel, will keep trying but would still appreciate any help
pete

4
Bender
Re: Unable to connect to database (databasefactory.php line 34)
  • 2004/5/7 22:37

  • Bender

  • Home away from home

  • Posts: 1899

  • Since: 2003/3/10


Sorry missread.

So you cant even directly access yoursite.tld/admin as i see.

Hmmm ... tried reuploading the databasefactory.php file?


Did you read this in the wiki?

A: To turn on debugging try the following things:
=
1. If you can get to admininstration menu, go to Preferences, select 'Main', and find the section on debugging options. Choose "PHP Debugging"

2. If you can't get to the administration page, but have access to mysql, try the query "UPDATE xoops_config SET conf_value=1 WHERE conf_name = 'debug_mode'". Be sure to make sure "xoops_config" matches the name of the config table in your installation.

3. If you can't get to the administration page, and don't want to mess with mysql, but don't mind messing with PHP, then edit the file "include/common.php". Near line 83, change "error_reporting(0);" to "error_reporting(E_ALL);".

4. If this still doesn't work, your server or hoster may have turned off debugging in "/etc/php.ini" (linux) or "WIN_DIRECTORY/php.ini" (windows). Make sure there is a line in there "display_errors On".

5. If you don't have access to change this file (e.g. on shared hosting), then if the server uses the "apache" webserver, you can create a file called ".htaccess" to override the settings locally. This file should contain the line: "php_flag display_errors on". The tricky part is WHERE to put this file. Look at the URL you are having problems with. Put the file in the corresponding directory. e.g. If it is "someplace.com/xoops/" or "someplace.com/xoops/index.php" then you need to put the file in the main XOOPS directory. If it is something like "someplace.com/xoops/modules/system/admin.php" then put it in "modules/system" subdirectory of your XOOPS installation. etc.


Cause i think 3. could apply here. (?)

5
rabideau
Re: Unable to connect to database (databasefactory.php line 34)
  • 2004/5/7 22:39

  • rabideau

  • Home away from home

  • Posts: 1042

  • Since: 2003/4/25



Login

Who's Online

200 user(s) are online (130 user(s) are browsing Support Forums)


Members: 0


Guests: 200


more...

Donat-O-Meter

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

Latest GitHub Commits