It appears that you're running an Ad-Blocker. This site is monetized by Advertising and by User Donations; we ask that if you find this site helpful that you whitelist us in your Ad-Blocker, or make a Donation to help aid in operating costs.

Database Error Only Visible to Forum Administrators · Article

What is Covered in This Article

Summary
I Already have MySQL Logging Enabled
I never enabled MySQL Logging prior to my problem
Default /includes/config.inc.php File


 

Summary


This error is commonly caused by a connection issue with the MySQL database which is generally due to incorrect entries for the server name, database name or password set in the UBB.threads /includes/config.inc.php file.

This issue can also be caused by errors in the tables contained in the database such as missing or corrupted tables or a corrupted UBB.threads /includes/config.inc.php file or caused by moving to a new hosting service or just a upgrade of hosting service applications by your host.

The displayed message is a generic error message designed to protect your path and query information from casual viewers who happen upon the error. Unless you have enabled the "Control Panel -> Primary Settings -> MySQL Logging" option prior to the problem it'll be of little help. Unfortunately most users won't enable MySQL Error Logging until after they have a problem.
Note
Enable this feature early on before you have a problem.


You can get around this issue on a temporary basis if you have not enabled MYSQL logging prior to having a problem and get the dreaded message "Database error only visible to forum administrators" by viewing the "I never enabled MySQL Logging prior to my problem" section below.


 

I Already have MySQL Logging Enabled


This is the good part since you already enabled MYSQL logging. All you need to do is FTP to the folder where they are saved and view them with a "plain text" editor like Notepad or EditPlus.
Note
Do not edit files in non-plain-text editors, such as Microsoft Word, Libre Office, Wordpad, etc.)


Or if you are able to, access the UBB.threads Control Panel and view the error logs.
Note
This only works if you enabled the error logs to begin with and the Control Panel works.



 

I never enabled MySQL Logging prior to my problem


Most users end up here for some sort of resolution, but there is still hope; a trigger is built into the "/libs/mysql.inc.php" file which allows the MySQL error to be shown to the browser. Once you enable this trigger you'll need to disable it once you're done as all queries that have errors will now display in plain text for all of your users to see.

Fire up your FTP client (such as FileZilla) and edit the value in "/libs/mysql.inc.php" that says "$showerror = 0;" and change it to read "$showerror = 1;". You'll want to make sure that any time you edit a file in UBB.uhreads that you use something like Notepad or EditPlus. Other editors such as HTML Editors, Word Processors, or Wordpad could add extra data to the file which will break it until they're removed.

Now, once you've uploaded the file back to the server, you can go back to the page that was spitting out an error and see what's wrong and what may need to be repaired. You should think about enabling MySQL logging in threads to save future heartache.

Note
This will also display the message to all other visitors to your site what the error and paths are. So you don't want to leave this set for a extended period of time beyond the troubleshooting stage.



 

Default /includes/config.inc.php File


In case you need to re-create your config file from scratch. Here is a default example to get you started; it is by no means complete nor correct for your desired configuration, but it should get you up and running after a disaster. You will need to edit all the URLs, database information (such as the database location, database name, database username and the database password), as well as any other initial settings that you'll want enabled.

Remember to use a plain text editor such as Notepad or EditPlus that will not add formatting to the file.



After you save this file and upload to your server you should go to the UBB.threads Control Panel and review/edit and save every option even if they appear correct. So that it will force the data to be updated to the database tables and/or config file.


Note
There is a separate article for those of you with a "Unable to connect to the database!" issue.

Posted By Gremelin Posted on October 2nd, 2014 · Updated on January 13th, 2017
▼ Sponsored Links ▼
▲ Sponsored Links ▲

Comments

( Posted)