Jump to content

[phpBB3]SQL Noob here, trying to change my forum to utf8....


Recommended Posts

I have a forum in which I'm tired of people complaining to me about getting php errors when they type certain characters.  I tried really hard to make changes so it wouldn't return the error, and now I can preview messages just fine, but I can't actually post anything at all now.

 

phpMyAdmin - 2.11.9.5

 

I've been told by people that I need to type

 

mysql_query("SET NAMES 'utf8'");

 

as a query. 

 

I assume that THIS would be the place where I would type a query:

 

noob.gif

 

But when I do, I get:

 

noob3.gif

 

 

When I did some searching on this forum about utf8, I saw lines and lines and lines of "query code" and was overwhelmed to the point of shaking.

 

Initially I had went through and individually changed latin1_swedish_ci to utf8_unicode_ci...

 

myphpadmin2.gif

 

But then when I went to check the main page, it showed this:

 

unicode.gif

 

And I was unable to find any way to change those entries from latin1_swedish_ci to utf8_unicode_ci.  Then someone told me about

 

mysql_query("SET NAMES 'utf8'");

 

Which, as I stated earlier, doesn't work, it returns an error message.

 

Is there some easy way to change this to utf8, or is it a long process that I should probably look into paying someone to make changes to my forum?

Ummm. Which version of phpbb are you using, because phpBB3 supports UTF8 natively. Perhaps it is time to upgrade...

I'm using phpBB3.

 

I found some of the settings I had seen people talk about on the forum in my config.php file, but when I put

mysql_query("SET NAMES 'utf8'");

into it, it puts a whole bunch of error messages on the forum at the top of the screen when I go to it....

 

When I make it:

 

mysql_query("SET NAMES 'utf8'", $conn);

 

it puts THIS at the top of the screen when I go to my forum....

 

Warning: mysql_query(): supplied argument is not a valid MySQL-Link resource in /home/kizzum5/public_html/forum/config.php on line 14

[phpBB Debug] PHP Notice: in file /includes/functions.php on line 3973: Cannot modify header information - headers already sent by (output started at /config.php:14)

I think the best place to ask these questions would be here:

http://www.phpbb.com/support/forums/

Thanks....

 

The main thing I'm trying to figure out is how to change those values in the database from latin1_swedish_ci to utf8_unicode_ci

 

 

Just changing the character set/collation of existing tables won't change the data in the tables, it will just make it non-displayable.

 

Since a fresh install of phpbb3 has all the tables with the utf8 character set and collation, best guess is that you got to this point through an upgrade.

 

You will need to do an export of your existing data, convert the data and the tables, and import the data back in to get this to work. There might be a phpbb mod or a utility to help with this, but your best bet would be to export your existing data in a format that can be imported into a new installation of phpbb3.

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.