News:

Bored?  Looking to kill some time?  Want to chat with other SMF users?  Join us in IRC chat or Discord

Main Menu

After Upgrade To SMF 2 My Member Names Became "????"!

Started by SAFAD, July 04, 2009, 02:35:02 PM

Previous topic - Next topic

SAFAD

Hi All
I Don't Know Why& How I Did This
I Just DId It
No Back Ups Nothing More Than My Dead Forum

All My Members Upgraded To ???? Only The English Ones Didn't (Arabic )
But The Categories Topics Evrything Else was Good
I Entred Phpmyadmin
Then i Found Not All The Tables Are UTF8 They Was Latin1
i thinked About It A Lil
Then I Dicided To Convert To UTF8
There Was 76 Table
So I Mad A Script And Converted Em All In No Time :d

But At The End It Is All The Same
Please AnyOne Help Me
Best Regards
Best Regards
Sadaoui "SAFAD" Abderrahim - Lead Developer @ Electron Inc.

Arantor


SAFAD

uploaded full upgrade package from the download section
run upgrade.php
PS : I Didn't Find "Use UTF-8 Charset "Option When Converting
Then Delete Upgrade Files And See The New World
Best Regards
Sadaoui "SAFAD" Abderrahim - Lead Developer @ Electron Inc.

Arantor

You haven't answered my question: you've said you wrote a script to do the conversion:
Quote from: SAFAD on July 04, 2009, 02:35:02 PM
So I Mad A Script And Converted Em All In No Time :d

What did this script have in it?

SAFAD

no
i didn't make a script to upgrade
i did it to convert charset to utf-8
and this after i did all the possible to fix it from the forums

this is the content

Quote

<?php
//connection code
mysql_connect("localhost","usr","pw");
mysql_select_db("db");

// convert code
$res = mysql_query("SHOW TABLES");
while ($row = mysql_fetch_array($res))
{
    foreach ($row as $key => $table)
    {
        mysql_query("ALTER TABLE " . $table . " CONVERT TO CHARACTER SET utf8 COLLATE utf8_general_ci");
        echo $key . " =&gt; " . $table . " CONVERTED<br />";
    }
}
?>


thats all
Best Regards
Sadaoui "SAFAD" Abderrahim - Lead Developer @ Electron Inc.

Arantor

From phpMyAdmin, go into your database, and execute the following query and please tell me what it says.

SELECT * FROM smf_settings WHERE variable = 'global_character_set'

Of course if your table isn't called smf_settings, please edit the query to reflect the settings table.

SAFAD

Quote from: Arantor on July 04, 2009, 03:57:52 PM
From phpMyAdmin, go into your database, and execute the following query and please tell me what it says.

SELECT * FROM smf_settings WHERE variable = 'global_character_set'

Of course if your table isn't called smf_settings, please edit the query to reflect the settings table.
ok ok
but bro
i can handle silly things like

QuoteOf course if your table isn't called smf_settings, please edit the query to reflect the settings table.

:d:d:d
Best Regards
Sadaoui "SAFAD" Abderrahim - Lead Developer @ Electron Inc.

SAFAD

O
It Shows a table

variable is global_charcter_set
and value is UTF-8

Best Regards
Sadaoui "SAFAD" Abderrahim - Lead Developer @ Electron Inc.

Norv

Please check, for the tables that were utf8, what character set is set, for each of their text columns.
If there's a chance to recover the data, then each of the columns must also be converted.

But before doing this and any other operations, please, make a backup of the database, to avoid further losses.
To-do lists are for deferral. The more things you write down the later they're done... until you have 100s of lists of things you don't do.

File a security report | Developers' Blog | Bug Tracker


Also known as Norv on D* | Norv N. on G+ | Norv on Github

SAFAD

I Didn't Understand You Correctly
There Was Alot Of Clomuns character set : latin1_swidish_ci
and some else : utf8_general_ci

Is This What Did You Mean ?
Best Regards
Sadaoui "SAFAD" Abderrahim - Lead Developer @ Electron Inc.

Norv

I'm afraid that is exactly what I meant, you still have columns that are latin1.

All these three must be utf8: the database itself, the tables (you made a conversion script for them), and the columns in the tables.

But please, before anything else, make a backup of the database.
Also, I understand you have no recent backup. But do you have an older backup? When was the last backup made?
To-do lists are for deferral. The more things you write down the later they're done... until you have 100s of lists of things you don't do.

File a security report | Developers' Blog | Bug Tracker


Also known as Norv on D* | Norv N. on G+ | Norv on Github

SAFAD

hmmmm
i don't remember exact
but far long much that i can't back it up
more than 100 member registred (really rarly to hapen to me)
and maybe another more 200 topic

and don't think they are till now latin1
i converted em to UTF-8

I Will Make A BackUp & Wait The Next Step From You
Best Regards
Sadaoui "SAFAD" Abderrahim - Lead Developer @ Electron Inc.

SAFAD

Best Regards
Sadaoui "SAFAD" Abderrahim - Lead Developer @ Electron Inc.

Norv

Well, honestly I'm afraid the data that doesn't appear anymore in this database is already corrupted and cannot be recovered. So please keep that old backup at hand. You may need it.

But before giving up, I propose to try to make sure the conversion to utf8 is complete. (and maybe, just maybe there will be something that will prove the pessimism to be wrong.)

Please tell what the following query results in:

show create database your_database_name;

To-do lists are for deferral. The more things you write down the later they're done... until you have 100s of lists of things you don't do.

File a security report | Developers' Blog | Bug Tracker


Also known as Norv on D* | Norv N. on G+ | Norv on Github

SAFAD

Its Allways On Hand
AnyWay
I Can't Create DB From Any PHP Script
Cuz My Acoun't Doesn't Have Previligies
I Can By My CPanel (Confixx)

Best Regards
Sadaoui "SAFAD" Abderrahim - Lead Developer @ Electron Inc.

Norv

Please, try running the statement. It only shows what "create database" did when the current database was created. It doesn't try to create another. (please replace "database_name" with your current database)
To-do lists are for deferral. The more things you write down the later they're done... until you have 100s of lists of things you don't do.

File a security report | Developers' Blog | Bug Tracker


Also known as Norv on D* | Norv N. on G+ | Norv on Github

SAFAD

ah ok
Quote
CREATE DATABASE `:)` /*!40100 DEFAULT CHARACTER SET utf8 */

UTF-8
Best Regards
Sadaoui "SAFAD" Abderrahim - Lead Developer @ Electron Inc.

Norv

Okay.
Now, please select your database, and look at its "structure" in phpMyAdmin: you will see the list of tables.
You said before they are all utf8, can you please say though, which were latin1 ?

For each of them, please look at the table's structure. You will see the column definitions. Or, you can run:

show full columns from table_name;

Are there any of the columns latin1?
To-do lists are for deferral. The more things you write down the later they're done... until you have 100s of lists of things you don't do.

File a security report | Developers' Blog | Bug Tracker


Also known as Norv on D* | Norv N. on G+ | Norv on Github

SAFAD

Members table was Latin1

there is no latin1
there is NULL
and UTF8_generale_ci

Here Is A Pic



Best Regards
Sadaoui "SAFAD" Abderrahim - Lead Developer @ Electron Inc.

Norv

Ah okay, thank you.

The data in this table, in phpMyAdmin, does it also show as " ??? "? For all text-based columns, or only member names?
To-do lists are for deferral. The more things you write down the later they're done... until you have 100s of lists of things you don't do.

File a security report | Developers' Blog | Bug Tracker


Also known as Norv on D* | Norv N. on G+ | Norv on Github

Advertisement: