Previous Thread
Next Thread
Print Thread
Hop To
#261238 03/24/2018 6:44 PM
Joined: Aug 2006
Posts: 583
old hand
old hand
Joined: Aug 2006
Posts: 583
Hi guys, it's been a while since I've been here but I am hoping someone can help me resolve an issue. I have a backup of an older UBB version. I had all the files backed up and the database backed up. I recently had a need to temporarily re-install that from backups to look at something in my forum posts there, but have run into a snag.

I have uploaded all the files and database to my server, but when I try to go to my forum index file I get the following (See attached)/ In case the attachment doesn't work, it basically says:

UBB Message
We encountered a problem. The reason reported was
Database error only visible to forum administrators
Please click back to return to previous page.

My question to you all is, how can I see this error when I can't get logged in? In cPanel, the error log doesn't show any database errors so maybe DB error are accessible from somewhere else? Any help is greatly appreciated.

UPDATE: Upon closer look, I did find a related error in error logs:

[Sat Mar 24 18:26:23.737975 2018] [cgi:error] [pid 11836] [client XX.XX.XX.XX:XXXX] AH01215: PHP Fatal error: Call to a member function error() on null in /home/xyz/public_html/ubforum/libs/mysql.inc.php on line 77: /usr/local/cpanel/cgi-sys/ea-php56, referer: http://www.blahblah.com/ubforum/admin/

Line 77 seems to be the $admin->error( $errstr ) in the following code:

PHP Code
global $admin, $html;

		if (defined('IS_ADMIN')) {
			$admin->error( $errstr );
		} else if (defined('IS_IMPORT') || defined('IS_UPGRADE')) {
			echo '<b>SQL Error:</b> ' . $errstr;
		} else {
			if (!is_object($html)) {
				$html = new html;
			}

			if (defined('NO_WRAPPERS')) $is_bare = true;

			( $is_bare ? $html->not_right_bare( $errstr ) : $html->not_right( $errstr ) );
		}
	} 
Attachments
Screen Shot 2018-03-24 at 4.33.30 PM.jpeg

Last edited by Basil; 03/24/2018 6:56 PM.
Joined: Jun 2006
Posts: 16,292
Likes: 116
UBB.threads Developer
UBB.threads Developer
Joined: Jun 2006
Posts: 16,292
Likes: 116
To display errors when MySQL logging is off (or hasn't been enabled) you'd need to make a small change to an embedded variable
In /libs/mysql.inc.php change:
Code
$showerror = 0;

to
Code
$showerror = 1;

You'll want to reverse this change once everything is worked out.


I am a Web Development Contractor, I do not work for UBBCentral. I have provided free User to User Support since the beginning of these support forums.
Do you need Forum Install or Upgrade Services?
Forums: A Gardeners Forum, Scouters World
UBB.threads: UBBWiki, UBB Styles, UBB.Sitemaps
Longtime Supporter & Resident Post-A-Holic
VNC Web Services: Code Modifications, Upgrades, Styling, Coding Services, Disaster Recovery, and more!
Joined: Aug 2006
Posts: 583
old hand
old hand
Joined: Aug 2006
Posts: 583
Thanks for that! I guess either I didn't download the entire DB or when I tried to re-import it, it didn't import all the way because the error is:

SQL Error: Table 'xyz_threadsv7.ubbt_USERS' doesn't exist

Looks like all the tables didn't import (Or if I screwed up when I did the last backup I may be screwed unless I get lucky and can find an older DB backup.

Joined: Jun 2006
Posts: 16,292
Likes: 116
UBB.threads Developer
UBB.threads Developer
Joined: Jun 2006
Posts: 16,292
Likes: 116
Is the current database named "xyz_threadsv7"?


I am a Web Development Contractor, I do not work for UBBCentral. I have provided free User to User Support since the beginning of these support forums.
Do you need Forum Install or Upgrade Services?
Forums: A Gardeners Forum, Scouters World
UBB.threads: UBBWiki, UBB Styles, UBB.Sitemaps
Longtime Supporter & Resident Post-A-Holic
VNC Web Services: Code Modifications, Upgrades, Styling, Coding Services, Disaster Recovery, and more!
Joined: Aug 2006
Posts: 583
old hand
old hand
Joined: Aug 2006
Posts: 583
Yes and no. the xyz is really something else, but I obfuscated it for posting on a public forum. But the database in question has the exact same name as was in the error. Now, I just tried to re-import the database to see if I can all the tables, but I got this in PhPMyAdmin:

SQL query:


--
-- Dumping data for table `ubbt_ANNOUNCEMENTS`
--

INSERT INTO `ubbt_ANNOUNCEMENTS` (`TOPIC_ID`, `FORUM_ID`) VALUES
(5343, '22'),
(6770, '20'),
(6779, '17'),
(7580, '23'),
(15561, '26'),


MySQL said:

#1062 - Duplicate entry '5343-22' for key 'a_index'


Do I need to delete and re-create a DB before I try to import it again?

Last edited by Basil; 03/24/2018 8:33 PM.
Joined: Jun 2006
Posts: 16,292
Likes: 116
UBB.threads Developer
UBB.threads Developer
Joined: Jun 2006
Posts: 16,292
Likes: 116
Are you attempting to import a backup through PHPMyAdmin? You'll likely hit the PHP max execute time if using a large database.

I would recommend importing a database via command line vs through a web script; I have some instructions in the "Import Database section of the "Migration Guide" at UBBWiki:
Quote
Now that the old files are on the new server, you need to import your database; you can again use PHPMyAdmin or use the command line to import the database. The command line way of doing this (note, this is not the MySQL command line, simply the Linux command line) would be:
Code
mysql -h localhost -uuser -ppass database_name < databasebackupfile.sql


I am a Web Development Contractor, I do not work for UBBCentral. I have provided free User to User Support since the beginning of these support forums.
Do you need Forum Install or Upgrade Services?
Forums: A Gardeners Forum, Scouters World
UBB.threads: UBBWiki, UBB Styles, UBB.Sitemaps
Longtime Supporter & Resident Post-A-Holic
VNC Web Services: Code Modifications, Upgrades, Styling, Coding Services, Disaster Recovery, and more!
Joined: Aug 2006
Posts: 583
old hand
old hand
Joined: Aug 2006
Posts: 583
Ok, I'll try that but I have a sinking feeling that when I did the backup I didn't get the entire DB

Joined: Jun 2006
Posts: 16,292
Likes: 116
UBB.threads Developer
UBB.threads Developer
Joined: Jun 2006
Posts: 16,292
Likes: 116
Entirely possible if you did it through PHPMyAdmin and the database wasnt fully exported. I generally either export/import via command line or SQLYog (when SSH access is not provided).


I am a Web Development Contractor, I do not work for UBBCentral. I have provided free User to User Support since the beginning of these support forums.
Do you need Forum Install or Upgrade Services?
Forums: A Gardeners Forum, Scouters World
UBB.threads: UBBWiki, UBB Styles, UBB.Sitemaps
Longtime Supporter & Resident Post-A-Holic
VNC Web Services: Code Modifications, Upgrades, Styling, Coding Services, Disaster Recovery, and more!
Joined: Jun 2006
Posts: 16,292
Likes: 116
UBB.threads Developer
UBB.threads Developer
Joined: Jun 2006
Posts: 16,292
Likes: 116
It'll also throw an already exists error if you're importing into a database which already has data in it as you cannot import a UBB.threads database over a UBB.threads database.


I am a Web Development Contractor, I do not work for UBBCentral. I have provided free User to User Support since the beginning of these support forums.
Do you need Forum Install or Upgrade Services?
Forums: A Gardeners Forum, Scouters World
UBB.threads: UBBWiki, UBB Styles, UBB.Sitemaps
Longtime Supporter & Resident Post-A-Holic
VNC Web Services: Code Modifications, Upgrades, Styling, Coding Services, Disaster Recovery, and more!
Joined: Dec 2003
Posts: 6,560
Likes: 78
Joined: Dec 2003
Posts: 6,560
Likes: 78
Basil,
You also need to undo the show error that Gizmo showed you.
It is a temporary measure if you don't have error logs turned on.
It will show any member/guest the same info.

Last edited by Ruben; 03/25/2018 5:04 PM.

Blue Man Group
There is no such thing as stupid questions. Just stupid answers
Joined: Aug 2006
Posts: 583
old hand
old hand
Joined: Aug 2006
Posts: 583
Thanks guys. I think I have to conclude that when I backed up the db I did not get the entire db so am essentially dead in the water. Oh well, lesson learned (PS: I did turn off the debug).


Link Copied to Clipboard
ShoutChat
Comment Guidelines: Do post respectful and insightful comments. Don't flame, hate, spam.
Recent Topics
spam issues
by ECNet - 03/19/2024 11:45 PM
Looking for a forum
by azr - 03/15/2024 11:26 PM
Editing Links in Post
by Outdoorking - 03/15/2024 9:31 AM
Question on barkrowler and the like
by Mors - 02/29/2024 6:51 PM
Member Permissions Help
by domspeak - 02/27/2024 6:31 PM
Who's Online Now
0 members (), 396 guests, and 110 robots.
Key: Admin, Global Mod, Mod
Random Gallery Image
Latest Gallery Images
Los Angeles
Los Angeles
by isaac, August 6
3D Creations
3D Creations
by JAISP, December 30
Artistic structures
Artistic structures
by isaac, August 29
Stones
Stones
by isaac, August 19
Powered by UBB.threads™ PHP Forum Software 8.0.0
(Preview build 20230217)