943,987 Members | Top Members by Rank

Ad:
  • PHP Discussion Thread
  • Marked Solved
  • Views: 874
  • PHP RSS
Apr 25th, 2009
0

Unable to connect to the database!

Expand Post »
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
Similar Threads
Reputation Points: 10
Solved Threads: 0
Light Poster
jyotiu is offline Offline
33 posts
since Sep 2008
Apr 25th, 2009
0

Re: Unable to connect to the database!

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


Quote ...
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.
Reputation Points: 14
Solved Threads: 4
Junior Poster in Training
mustafaneguib is offline Offline
97 posts
since Apr 2008
Apr 26th, 2009
0

Re: Unable to connect to the database!

'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 ?
Reputation Points: 11
Solved Threads: 3
Junior Poster in Training
chrisranjana is offline Offline
82 posts
since Jul 2005
Apr 26th, 2009
0

Re: Unable to connect to the database!

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.
Sponsor
Featured Poster
Reputation Points: 410
Solved Threads: 258
Occupation: Genius
cwarn23 is offline Offline
3,004 posts
since Sep 2007
Apr 26th, 2009
0

Re: Unable to connect to the database!

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.
Reputation Points: 10
Solved Threads: 1
Newbie Poster
foryounow is offline Offline
12 posts
since Mar 2005
May 2nd, 2009
0

Re: Unable to connect to the database!

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.
Reputation Points: 10
Solved Threads: 0
Light Poster
jyotiu is offline Offline
33 posts
since Sep 2008

This thread is solved

Either the thread starter or a moderator has marked this thread as solved. You can most likely trust the responses and answers given. There is most likely no reason for any further responses to be posted here. If you have a related question, please start a new thread in this forum instead.

This thread is more than three months old

No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.
Message:
Previous Thread in PHP Forum Timeline: Failed opening required '/aa/bb/libs/functions_forums.inc.php
Next Thread in PHP Forum Timeline: ajax with Html





About Us | Contact Us | Advertise | Acceptable Use Policy
Forum Index | Build Custom RSS Feed


Follow us on Twitter


© 2011 DaniWeb® LLC