Installation of phpBB forum MySQL and non-latin character support


Here are a few steps to install phpBB without having the problem regarding wrong display of forum topics containing non-latin symbols. This happens, because phpBB converts those symbols in HTML entities like &xxx;. This leads to shorter size of forum ranks and strange looking topics. A possible fix is to convert the whole forum to utf-8 charset.

Database

The database for forum installation should be with charset utf8 and collation for example utf8_general_ci. If you use phpMyAdmin here's how to create it:

Create utf-8 database with phpMyAdmin

and change the charset of an existing database:

Change charset of existing databse with phpMyAdmin

MySQL command for creation is:

CREATE DATABASE `phpbb` DEFAULT CHARACTER SET utf8 COLLATE utf8_general_ci;

and for change:

ALTER DATABASE `test` DEFAULT CHARACTER SET utf8 COLLATE utf8_general_ci
 
A good practice is to create separate database user with privileges only to this database.

Installation

Install the forum by the book - download archived files from http://www.phpbb.com/downloads/ and fill in installation form. Save the config file and remove install and contrib directories. Detailed description can be found here: http://www.phpbb.com/support/documentation/2.0/#section2.

Installing non-latin language

Download language pack from http://www.phpbb.com/languages/?type=20x. Extract it to language directory. Convert all language files from local encoding to utf-8 (you can use this script). Edit file lang_main.php (use utf-8 capable editor) and change encoding line:

$lang['ENCODING'] = "utf-8";

Convert also direktory emails and change Charset line in each of them to:

Charset: utf-8


That's it.

 

No comments yet

Back to articles list

This page was last modified on 2024-04-19 01:40:16