Accessing the wrong database

This is an archive of the phpBB 2.0.x support forum. Support for phpBB2 has now ended.
Forum rules
Following phpBB2's EoL, this forum is now archived for reference purposes only.
Please see the following announcement for more information: viewtopic.php?f=14&t=1385785
cybrid23
Former Team Member
Posts: 9877
Joined: Wed Jun 29, 2005 5:55 am
Location: Somewhere in the Midwest...
Contact:

Post by cybrid23 » Thu Oct 13, 2005 8:13 pm

So, the username and DB name are the same.

if you change them both to phpbb1 what errors do you get?
---Never leave home without a towel and your peril sensitive sunglasses.
---Do Not PM Me For Support. It will go unanswered.
Thanks.

denofsha
Registered User
Posts: 22
Joined: Thu Oct 13, 2005 2:56 pm
Contact:

Post by denofsha » Thu Oct 13, 2005 11:27 pm

cybrid23 wrote: So, the username and DB name are the same.

if you change them both to phpbb1 what errors do you get?


Warning: mysql_connect(): Access denied for user: 'denofsha_phpbb1@localhost' (Using password: YES) in /home/denofsha/public_html/phpBB/db/mysql4.php on line 48

Warning: mysql_error(): supplied argument is not a valid MySQL-Link resource in /home/denofsha/public_html/phpBB/db/mysql4.php on line 330

Warning: mysql_errno(): supplied argument is not a valid MySQL-Link resource in /home/denofsha/public_html/phpBB/db/mysql4.php on line 331
phpBB : Critical Error

Could not connect to the database

cybrid23
Former Team Member
Posts: 9877
Joined: Wed Jun 29, 2005 5:55 am
Location: Somewhere in the Midwest...
Contact:

Post by cybrid23 » Fri Oct 14, 2005 12:39 am

Ahhhh....Good.

So, in MyQLadmin, change the password for user denofsha_phpbb1

Then, put the same password in the config.php. So you should have:

Code: Select all

$dbms = 'mysql4';

$dbhost = 'localhost';
$dbname = 'denofsha_phpbb1';
$dbuser = 'denofsha_phpbb1';
$dbpasswd = 'new password'

$table_prefix = 'phpbb_';

define('PHPBB_INSTALLED', true);
And that should do it
---Never leave home without a towel and your peril sensitive sunglasses.
---Do Not PM Me For Support. It will go unanswered.
Thanks.

denofsha
Registered User
Posts: 22
Joined: Thu Oct 13, 2005 2:56 pm
Contact:

Post by denofsha » Fri Oct 14, 2005 1:35 am

Well, I managed to do that... and now I have a new error message:

phpBB : Critical Error

Error creating new session

DEBUG MODE

SQL Error : 1054 Unknown column 'session_admin' in 'field list'

INSERT INTO phpbb_sessions (session_id, session_user_id, session_start, session_time, session_ip, session_page, session_logged_in, session_admin) VALUES ('54667a47eceb76d4cef330bfac061b59', -1, 1129253587, 1129253587, '185bd94c', 0, 0, 0)

Line : 172
File : sessions.php

User avatar
Marshalrusty
Project Manager
Project Manager
Posts: 29252
Joined: Mon Nov 22, 2004 10:45 pm
Location: New York City
Name: Yuriy Rusko
Contact:

Post by Marshalrusty » Fri Oct 14, 2005 1:38 am

This happens when a new version of the phpBB files is used with an old database. To update the database:
1) Upload the install folder to the root folder of your forum (the one with the folders 'admin', 'cache', 'db', 'includes', 'language', etc.)
2) Point to the file in your browser. (http://{your_domain}/{root_path}/install/update_to_latest.php)
3) Delete the install folder
Have comments/praise/complaints/suggestions? Please feel free to PM me.

Need private help? Hire me for all your phpBB and web development needs

denofsha
Registered User
Posts: 22
Joined: Thu Oct 13, 2005 2:56 pm
Contact:

Post by denofsha » Fri Oct 14, 2005 1:50 am

It's working! Thank you!

It's still *hacked,* but suddenly I'm feeling a whole lot less stressed about that. I'm going to go search for that post I think I saw about the actual hacking. Thank you for all the help!

User avatar
Marshalrusty
Project Manager
Project Manager
Posts: 29252
Joined: Mon Nov 22, 2004 10:45 pm
Location: New York City
Name: Yuriy Rusko
Contact:

Post by Marshalrusty » Fri Oct 14, 2005 1:51 am

Post a link to your site and I will save you the trouble of searching for a fix.
Have comments/praise/complaints/suggestions? Please feel free to PM me.

Need private help? Hire me for all your phpBB and web development needs

denofsha
Registered User
Posts: 22
Joined: Thu Oct 13, 2005 2:56 pm
Contact:

Post by denofsha » Fri Oct 14, 2005 2:27 am

Well, I fixed the biggest part, I think (they had deleted the admin, and changed one of the forum descriptions to a redirect), but now clicking to try to read a message brings you to the "who's online" page...

http://www.tdos.org/phpBB/

User avatar
Marshalrusty
Project Manager
Project Manager
Posts: 29252
Joined: Mon Nov 22, 2004 10:45 pm
Location: New York City
Name: Yuriy Rusko
Contact:

Post by Marshalrusty » Fri Oct 14, 2005 3:03 am

Reupload a fresh copy of the viewtopic.php file
Have comments/praise/complaints/suggestions? Please feel free to PM me.

Need private help? Hire me for all your phpBB and web development needs

denofsha
Registered User
Posts: 22
Joined: Thu Oct 13, 2005 2:56 pm
Contact:

Post by denofsha » Fri Oct 14, 2005 9:39 am

Marshalrusty wrote: Reupload a fresh copy of the viewtopic.php file


Okay, I've just tried that, and it doesn't seem to have changed anything. Any other ideas?

Locked

Return to “2.0.x Support Forum”