Unable to connect to the database!

Thread Solved

Join Date: Sep 2008
Posts: 33
Reputation: jyotiu is an unknown quantity at this point 
Solved Threads: 0
jyotiu jyotiu is offline Offline
Light Poster

Unable to connect to the database!

 
0
  #1
Apr 25th, 2009
have recently migrated my ubb forum website(http://2aforum.com/) to a new web hosting server, i have placed the files on new server and i think directory structure is right and also set up the database through phpmyadmin, and changed config file accordingly but still i am getting this error
UBB Message We encountered a problem. The reason reported was
Script:
Line#:
SQL Error:
SQL Error #:
Query: Unable to connect to the database!


I think all the info that i have filled in config file here:

'DATABASE_SERVER' => 'db.aa.0000000.hostedresource.com',
'DATABASE_USER' => 'abcd',
'DATABASE_PASSWORD' => 'cccc',
'DATABASE_NAME' => 'ssddd',
is correct because i tried to connect to db through another script and it did worked and retrieved the data so i am totally confused what i am doing wrong.. confused can anybody help
Reply With Quote Quick reply to this message  
Join Date: Apr 2008
Posts: 75
Reputation: mustafaneguib is an unknown quantity at this point 
Solved Threads: 3
mustafaneguib mustafaneguib is offline Offline
Junior Poster in Training

Re: Unable to connect to the database!

 
0
  #2
Apr 25th, 2009
first and foremost, do not display ur config file here. some one might hack ur system.

check your database, and your files. can u include ur code here where the problem occurs?

according to the link that u provided, the messages says that


UBB Message We encountered a problem. The reason reported was
Script: /home/content/j/o/h/johncardillo/html/forum/forums/libs/user.inc.php
Line#: 445
SQL Error: Table '2aforum_data2.ubbt_USERS' doesn't exist
SQL Error #: 1146
the rest of the message (not included) shows the structure of ur table. this also a security threat.
If one has not had the chance to do assembly prgramming then he has not had the chance to do programming at all.
Reply With Quote Quick reply to this message  
Join Date: Jul 2005
Posts: 78
Reputation: chrisranjana is an unknown quantity at this point 
Solved Threads: 3
chrisranjana chrisranjana is offline Offline
Junior Poster in Training

Re: Unable to connect to the database!

 
0
  #3
Apr 26th, 2009
'DATABASE_SERVER' => 'db.aa.0000000.hostedresource.com',

are you sure you need to specify the full host name while connecting ? Have you checked with your webhost ?
Chris, Director, Chrisranjana.com
Web developers and software programmers.
Reply With Quote Quick reply to this message  
Join Date: Sep 2007
Posts: 1,436
Reputation: cwarn23 has a spectacular aura about cwarn23 has a spectacular aura about cwarn23 has a spectacular aura about 
Solved Threads: 134
cwarn23's Avatar
cwarn23 cwarn23 is offline Offline
Nearly a Posting Virtuoso

Re: Unable to connect to the database!

 
0
  #4
Apr 26th, 2009
Depending on how your web host is set up, you may need to change the database server to localhost At least that is what most web hosts would have it set to.
Try not to bump 10 year old threads as it can be really annoying.
Like php then read my website at http://syntax.cwarn23.net/
Star-Trek-Atlantis - now that's what I call a movie ^_^
My favourite PC. - MacGyver Fan
Bad english note: dis-iz-2b4u
Reply With Quote Quick reply to this message  
Join Date: Mar 2005
Posts: 12
Reputation: foryounow is an unknown quantity at this point 
Solved Threads: 1
foryounow foryounow is offline Offline
Newbie Poster

Re: Unable to connect to the database!

 
0
  #5
Apr 26th, 2009
Originally Posted by mustafaneguib View Post
first and foremost, do not display ur config file here. some one might hack ur system.

check your database, and your files. can u include ur code here where the problem occurs?

according to the link that u provided, the messages says that




the rest of the message (not included) shows the structure of ur table. this also a security threat.
This shows that database connected successfully, so that it knows that table is not existed.
Reply With Quote Quick reply to this message  
Join Date: Sep 2008
Posts: 33
Reputation: jyotiu is an unknown quantity at this point 
Solved Threads: 0
jyotiu jyotiu is offline Offline
Light Poster

Re: Unable to connect to the database!

 
0
  #6
May 2nd, 2009
There was problem in web hosting actually that is why the program could not connect to the database. earlier the server was Linux based on old hosting but when moved to new hosting somehow windows hosting was opted that created all the problem.
Reply With Quote Quick reply to this message  
Reply

This thread has been marked solved.
Perhaps start a new thread instead?
Message:


Thread Tools Search this Thread



About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC