Go Back   Linux CentOS, Control Panel, Hot girl, TOP 10 GOOGLE, Server - System - Manager - CentOS, Operation System, SEO, VBB, HACKING and SECURITY - Rao vặt, tuyển dụng, Thiet ke website > Dành cho webmaster > Xây dựng, quản trị diễn đàn > Diễn đàn VBB

Hack gunz.2it.in mới update ngày 2/3/2010 (test by Admin)
Hack map trong Dota - WarCraft 3 (da test ngay 27/01/2010)
Hack gg để chơi map dota cho war 1.23 va 1.24 - vẫn xài tốt
Hướng dẫn Hack gold member tại quán net để mang về nhà
hack map dota cho war3 ver 1.24c va 1.24d, co the chuyen tien
crack windows 7 all version (using activators)
hack cf 1052, hack cf 1053, hack cf 1054 ngay 15/02/2010

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 24-12-2009
Advanced Member
 
Join Date: Jul 2008
Location: Morocco
Posts: 150
Thanks: 2
Thanked 13 Times in 12 Posts
Send a message via ICQ to sannhac
Default Howto convert iso to UTF8 charset

We've just successfully migrated a 6m post VB forum cross server and charset and as I spent a fair amount of time working this out I thought I'd share. There are apparently third party tools to do this but I've read mixed reviews about them.

I found a good step by step on the charset changeover here Converting vBulletin to UTF-8 though there are some errors in what he's done.

To manually make the transition on a linux box, you'll need shell access and here's what needs to be done...
  1. Shut-off forums in admin panel.
  2. Shell into your box and dump all the mysql data minus binary image data
    Quote:
    # mysqldump -u DBUSERNAME -p --opt --skip-set-charset --ignore-table=VBULLETINDBNAME.customavatar --ignore-table=VBULLETINDBNAME.customprofilepic --ignore-table=VBULLETINDBNAME.picture --ignore-table=VBULLETINDBNAME.socialgroupicon --ignore-table=VBULLETINDBNAME.socialgrouppicture VBULLETINDBNAME > VBULLETINDBNAME.sql
  3. Dump the image data
    Quote:
    #mysqldump -u DBUSERNAME -p --opt --default-character-set=latin1 VBULLETINDBNAME customavatar customprofilepic picture sigpic socialgroupicon socialgrouppicture > VBULLETINDBNAME_images.sql
  4. Convert all the characters in the data dump to UTF8 via iconv
    Quote:
    #iconv -c -f windows-1251 -t utf-8 VBULLETINDBNAME.sql > VBULLETINDBNAME_utf8.sql
  5. Change the import script to make sure it imports as UTF8
    Quote:
    #sed –i 's/latin1/utf8/g' VBULLETINDBNAME_utf8.sql
    #sed –i 's/latin1/utf8/g' vogue_forums_untouchable_images.sql
  6. Create your new database on the second server *Obviously make sure your new database is setup with UTF8 as the default collation*
  7. Import your converted dump into the db you just created.
    Quote:
    #mysql -u NEWDBUSER -p –default-character-set=utf8 NEWVBDATABASENAME < VBULLETINDBNAME_utf8.sql
    #mysql -u NEWDBUSER -p –default-character-set=utf8 NEWVBDATABASENAME < VBULLETINDBNAME_images.sql
  8. Now if you've changed domains you'll need to update the settings tables... you can get away with the following - there's two db values you need to change first one is pretty simple:
    Quote:
    mysql> UPDATE setting set value = 'http://hackingart.com' where varname = 'bburl'
  9. The second update is stored as a serilaized value in the datastore table so you need to do a bit of work to get the right return value:
    First grab the data you need to change from the old DB
    Quote:
    mysql>select data from VBULLETINDBNAME.datastore where title = 'options'
    Grab the returning value and throw it in the following php (once you've changed the your new domain bits) script.. then grab the output:
    PHP Code:
    # MYSQL: select data from VBULLETINDBNAME.datastore where title = 'options'
    $the_object 'PUT RESULT OF ABOVE MYSQL QUERY';
    $the_object unserialize($the_object);
    $the_object['homeurl'] = 'http://hackingart.com';
    $the_object['bburl'] = 'http://hackingart.com';
    $the_object['cookie_domain'] = 'hackingart.com';
    echo 
    serialize($the_object); 
  10. Update the datastore table with the output from the above script
    Quote:
    mylsql> UPDATE datastore set data = 'OUTPUT FROM ABOVE - ESCAPE THE SINGLE QUOTES ETC' where title = 'options';
  11. Load up a clean vbulletin latest release in a new vhost on second server
  12. change the /includes/config.php on the new install to reflect the new environment
  13. run through the vbulletin upgrade process at newserver.xxx/install/upgrade.php (disregard warning about wrong version)
  14. Update thread counters (admin -> maintenance -> update counters -> thread then post)
  15. Go to admin panel -> address all issues. (if any hang, log out and in again and they will be shown again for you to run)
  16. If you can't login: Upload the DO_NOT_UPLOAD folder and reset the cookie_domain using the newserver.xxx/DO_NOT_UPLOAD/tools.php script
  17. If forum not displaying use the tools (and you've updated thread counts etc in admin/maintenance) reset the caches using the tools.php page
  18. update the default character set (Admin CP -> Languages & Phrases -> Language Manager -> [Edit Settings] -> HTML Character Set) change ISO-8991 to UTF8
  19. delete the DO_NOT_UPLOAD folder from your server
  20. delete the install directory from server

Now you're be right to go with a UTF8 forum

Last edited by sannhac; 24-12-2009 at 08:23 PM.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT +8. The time now is 02:34 PM.


© Diễn đàn HackingArt (HA) được xây dựng và phát triển bởi các thành viên.
+ Diễn đàn HackingArt là nơi trao đổi của các webmaster chuyên nghiệp.