MyBB Community Forums

Full Version: fixing UTF-8 in config and I cant login!
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
according to WIKI I fixed commented code in config.php to use utf-8 tools in admin. Immediately after doing that I see a login page in admin although I was logged in! then I reenter my U/P and I'm seeing login page again!
what did I miss?!
First you have to insert this code BEFORE the ?>
/**
 * 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';

This code has the commented code fixed. Then enter to your Admin CP and perform the conversion.
not fixed and not work for me please rewrite new code
thanks for your try but I did that as I mentioned above but still problem exists. I think that, this is some sort a bug :-s


(2008-08-28, 07:48 AM)NoRules Wrote: [ -> ]First you have to insert this code BEFORE the ?>
/**
 * 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';

This code has the commented code fixed. Then enter to your Admin CP and perform the conversion.
May you copy/paste your config.php here?

Perhaps it has something worng inside it...
(2008-08-29, 07:17 AM)NoRules Wrote: [ -> ]May you copy/paste your config.php here?

Perhaps it has something worng inside it...

<?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']['database'] = '**********';
$config['database']['table_prefix'] = '******';

$config['database']['hostname'] = 'localhost';
$config['database']['username'] = '********';
$config['database']['password'] = '********';

/**
 * 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'] = '';

/**
 * 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)
 *  you can change the value below to 'files', 'memcache' or 'eaccelerator' from 'db'.
 */

$config['cache_store'] = '';

/**
 * Memcache configuration
 *  If you are using memcache as your data-cache,
 *  you need to configure the hostname and port
 *  of your memcache server below.
 *
 * If not using memcache, ignore this section.
 */

$config['memcache_host'] = 'localhost';
$config['memcache_port'] = 11211;

/**
 * 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'] = '';

/**
 * 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['database']['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' => 0, // 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
);

?>
Well...., there is the error:

you have:
      $config['database']['encoding'] = 'utf8';

and must be (so replace this line with the new one):
$config['db_encoding'] = 'utf8'; 

Now let see if it works Smile
thanks for your try but problem still is there.
when I put "$config['db_encoding'] = 'utf8'; " in my config file, I get this error:

Your current setup of MyBB is not setup to use this tool yet. Please see the wiki for more information on how to set it up.

and when I put "$config['database']['encoding'] = 'utf8'; " there, I get a login page :
Your IP address is not valid for this session!
Wich version of MyBB are you using?

The
$config['db_encoding'] = 'utf8'; 
must be the last line before
?>