MyBB Community Forums

Full Version: Config.Default.PHP problem
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hello all,
I just downloaded MyBB 1.4.3 and checked out the "Config.default.php" file in: mybb_1403\Upload\inc\

But, it appears to be 0KB, and when I open the file with notepad it comes up completely blank.

I've re-downloaded the file several times and it's the same result.

Can I please get some assistance?

Thank-you!
It's supposed to be a blank file.

Think of it as a memory card, and your forum as a video game.
When you save data, it goes to that file. (Which is why you should NEVER override or delete it).

Also, be sure to rename it to config.php

V What he said.
It is blank when you first get it because the installer writes to it Smile
Ahh, I could've sworn older versions had data.

Oh well, thanks!
They might have had data in, can't remember now... but anyways, now, when the installer is run and you enter the database info, it's written to - make sure it's CHMODd to 666 to do that, and also make sure you rename it to just config.php

Edit: If you are ever in need, here is a sample config.php:

<?php
/**
 * Database configuration
 *
 * Please see the MyBB Wiki for advanced
 * database configuration for larger installations
 * http://wiki.mybboard.net/
 */

$config['database']['type'] = 'mysql';
$config['database']['hostname'] = 'localhost';
$config['database']['username'] = 'mysql-username';
$config['database']['password'] = 'mysql-password';
$config['database']['database'] = 'database-name';
$config['database']['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 (cache/ directory), MemCache or eAccelerator
 *  you can change the value below to 'files', 'memcache' or 'eaccelerator' 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';

/**
 * Database Encoding
 *  If you wish to set an encoding for MyBB uncomment 
 *  the line below (if it isn't already) and change
 *  the current value to the mysql charset:
 *  http://dev.mysql.com/doc/refman/5.1/en/charset-mysql.html
 */

$config['db_encoding'] = 'utf8';
 
/**
 * Automatic Log Pruning
 *  The MyBB task system can automatically prune
 *  various log files created by MyBB.
 *  To enable this functionality for the logs below, set the
 *  the number of days before each log should be pruned.
 *  If you set the value to 0, the logs will not be pruned.
 */

$config['log_pruning'] = array(
	'admin_logs' => 365, // Administrator logs
	'mod_logs' => 365, // Moderator logs
	'task_logs' => 30, // Scheduled task logs
	'mail_logs' => 180, // Mail error logs
	'user_mail_logs' => 180, // User mail logs
	'promotion_logs' => 180 // Promotion logs
);

?>

Let the installer create it the first time, but if you ever lose it and can't get another one (as it's blank) use this Smile
(2008-11-13, 08:50 AM)Clair Wrote: [ -> ]Also, be sure to rename it to config.php

The installer will attempt to rename it first and will alert you to rename it if it cannot.