1
yavor
Cannot connect to database
  • 2005/4/29 1:03

  • yavor

  • Just popping in

  • Posts: 2

  • Since: 2005/4/29


Hi people,
I'm newb here, but i've used XOOPS about half year. I had two FreeBSD 5.3 boxes, first was the webserver with XOOPS (Apache 2.0.50, PHP 4.3.9, XOOPS 2.0.92), on the second was MySQL database server (4.0.21 installed through the ports tree). But some days ago my boss said: "it's time to upgrade!" and bought new more powerfull server box. I had the task to merge all stuff from the two old boxes to the new one. I installed FreeBSD 5.3 again and all needed programs and start to restore the XOOPS site. I was made all required for that, following the FAQ about the site migration and database backup and restore. I've downloaded all file structure, after that through phpmyadmin exported the database.
I've uploaded all files through AceFTP to the new machine and imported the xoops's database again through phpmyadmin. But when i try to open my site, i see this:

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

Line 34 from this file is the following:

trigger_error("Unable to connect to database", E_USER_ERROR);^M

I'm not a programmer and dont know what is that meaning.
I notice something strange, when i tryed to run the new site but with the old database (from the old machine) it was OK!?) But when I set some IP address, which is assigned to the new machine (i've four IP's addigned) in mainfile.php it doesn't works and the message from above makes me crazy
Does anyone see what am I doing wrong? Any suggestions?
I'll be thankfull because I like XOOPS and I want keep useing it
P.S. Sorry for the bad english

2
tripmon
Re: Cannot connect to database
  • 2005/4/30 1:14

  • tripmon

  • Module Developer

  • Posts: 462

  • Since: 2004/2/28


I think this can be caused by mainfile.php settings.

Verify that the current settings exactly match the old ones if the same database is being used.

3
Spin2Win
Re: Cannot connect to database
  • 2005/5/2 2:29

  • Spin2Win

  • Just popping in

  • Posts: 2

  • Since: 2005/4/17


I'm getting the same error!

I just set up the site yesterday, and have been setting up the site.

Today, when I first tried to access the site, I got:

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 C:\websites\iceimage.ca\class\database\databasefactory.php line 34


My site is running on Windows, and I'm using IE. Pressing F5 (refresh) causes the problem to clear.

Hmmm...Maybe I'll go to the XOOPS troubleshooting page for assistance, but if anyone can point me in the right direction, I'd appreciate it!

4
Spin2Win
Re: Cannot connect to database
  • 2005/5/2 13:56

  • Spin2Win

  • Just popping in

  • Posts: 2

  • Since: 2005/4/17


Okay. After a bit of reading, I see that the "Unable to connect" is defined as a "blank page error".

I can turn on My-SQL debugging and see if anything comes up, but the error can not consistently be reproduced (and hasn't come up yet with debugging turned on).

Unfortunately, my ISP installed My-SQL and PHP, and even XOOPS (2.0.10), so I haven't been able to check those versions. At least I know the server is Windows IIS, and I can ftp to the site!

5
yavor
Re: Cannot connect to database
  • 2005/5/2 23:28

  • yavor

  • Just popping in

  • Posts: 2

  • Since: 2005/4/29


I've solved my problem, when i started MySQL server with the --skip-nerworking option and installed php4-extensions port everything was OK. But I dont know what exactly was the problem.

Login

Who's Online

308 user(s) are online (271 user(s) are browsing Support Forums)


Members: 0


Guests: 308


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