MyBB Community Forums

Full Version: Deleted or overwrited your config?
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
You can easily create it again in this way:

Open a new file and put the following code in it:

<?php
/**
 * Database configuration
 */

$config['dbtype'] = 'mysql';
$config['hostname'] = 'localhost';
$config['username'] = '';
$config['password'] = '';
$config['database'] = '';
$config['table_prefix'] = 'mybb_';

/**
 * Admin CP directory
 *  For security reasons, it is recommended you
 *  rename your Admin CP directory. You then need
 *  to adjust the value below to point to the
 *  new directory.
 */

$config['admin_dir'] = 'admin';

/**
 * Hide all Admin CP links
 *  If you wish to hide all Admin CP links
 *  on the front end of the board after
 *  renaming your Admin CP directory, set this
 *  to 1.
 */

$config['hide_admin_links'] = 0;

/**
 * Data-cache configuration
 *  The data cache is a temporary cache
 *  of the most commonly accessed data in MyBB.
 *  By default, the database is used to store this data.
 *
 *  If you wish to use the file system (inc/cache directory)
 *  you can change the value below to 'files' from 'db'.
 */

$config['cache_store'] = 'db';

/**
 * Super Administrators
 *  A comma separated list of user IDs who cannot
 *  be edited, deleted or banned in the Admin CP.
 *  The administrator permissions for these users
 *  cannot be altered either.
 */

$config['super_admins'] = '1';
 
?>

Just fill in all the details again, save it as config.php and upload it to your /inc folder!

Which data should you put in the config?

First, these 3 settings:
Quote:$config['username'] = '';
$config['password'] = '';
$config['database'] = '';

... are just the details of your (MySQL) database.

'table_prefix' 'dbtype' and 'hostname' are already filled in, in most circumstances they're filled in correctly now.

Secondly:

Quote:$config['admin_dir'] = 'admin';

You can use this to change your admin directory. You'll also have to change your folder name on your ftp (admin).

Quote:$config['hide_admin_links'] = 0;

Use this if you want to hide the admin cp link for other administrators.
Oh nice idea to have this in a thread Big Grin
More details would be good as well - which one does what, what a user should input in the different variables, where they should input it. Many are confused with this.
CraKteR Wrote:More details would be good as well - which one does what, what a user should input in the different variables, where they should input it. Many are confused with this.

Indeed ... i agree
Last night I updates the wiki on this topic. http://wiki.mybboard.net/index.php/Inc/config.php I also have a script available here for people that don't feel confident on editing there config.php file.