-Поиск по дневнику

Поиск сообщений в Westermann_Whitehead

 -Подписка по e-mail

 

 -Статистика

Статистика LiveInternet.ru: показано количество хитов и посетителей
Создан: 06.06.2020
Записей:
Комментариев:
Написано: 114


Mambo China Community-Mambo Communication-◆Teach you how to resolve garbled characters and installation failure brought on by 453h installed in UTF8 database above mysql four.1 ◆-powered by Discuz!.txt

Понедельник, 15 Июня 2020 г. 10:22 + в цитатник

◆Teach you how you can resolve the garbled characters and installation failure caused by 453h installed in UTF8 database above mysql4.1 ◆

Looking to set up mambo4.53h version these days, because my database is mysq4.1 or above, as well as the set character set is UTF8. Following trying to install quite a few occasions, I discovered the following conditions:

1. Set the database to latin1, usually do not modify any files, irrespective of whether you select gb2312 or utf8 for the duration of installation, the installation could be completed, and also the webpage displays usually, but if you appear in the information table by means of phpmyadmin, each of the Chinese in it are garbled, which is, That stated, by saving within the latin1 character set, Chinese net pages can be displayed generally, but actually, Chinese is garbled within the database. And can not be backed up by phpmyadmin (the files backed up, regardless of what code is changed, the Chinese is garbled). So this really is not kingly, I didn't pick to consider.

2. Set pendrive recovery software set to utf8 with no modifying any files. Irrespective of irrespective of whether you choose gb2312 or utf8 in the course of installation, an error of 1071specifiedkeytoolongmaxlength1000bytes appears. And as long as the database character set is set to utf8, (utf8 is really a characterset stored as 3bytes, latin1 is stored as 1bytes), whether you modify the installation/sql/mambo.sql or other files in line with some opinions inside the forum, it will seem In the event the crucial exceeds 1000 bytes, the installation cannot continue.

My intention was to install the Chinese utf8 version of manbo to facilitate integration with other applications. So right after querying google, forum and a few other details, after attempting, I ultimately chose to pick manbo's utf8 character set above mysql4.1, plus the character set can also be successfully installed within the utf8 database. The webpage shows that the Chinese is regular, with out garbled characters, and when querying the database table with phpmyadmin, all Chinese is also displayed ordinarily and saved in utf8. The following is my answer, for reference only:


1st set the database character set to utf8,

CODE:[Copytoclipboard]ALTERDATABASEDEFAULTCHARACTERSETutf8COLLATEutf8_general_ci or directly adjust it via phpmyadmin.

Modify the installation/sql/mambo.sql file:

Find all

CODE:[Copytoclipboard]TYPE=MyISAM; Replace with

CODE:[Copytoclipboard]TYPE=MyISAMDEFAULTCHARSET=utf8COLLATE=utf8_general_ci;Obtain

CODE:[Copytoclipboard]UNIQUEKEY`section_value_value_aro`(`section_value`,`value`) and

CODE:[Copytoclipboard]UNIQUEKEY`#__gacl_section_value_value_aro`(`section_value`,`value`), and comment out or delete these two lines of code with #, whatever~


Under this code, that is definitely

CODE:[Copytoclipboard]#Tablestructurefortable`#__core_acl_aro_groups` above, add the following four lines of code in order:

CODE:[Copytoclipboard]ALTERTABLE`#__core_acl_aro`CHANGE`section_value,,section_value`VARCHAR(240)CHARACTERSETlatin1COLLATElatin1_binNOTNULLdefault‘0‘;

CODE:[Copytoclipboard]ALTERTABLE`#__core_acl_aro`CHANGE`value``value`VARCHAR(240)CHARACTERSETlatin1COLLATElatin1_binNOTNULLdefault‘‘;

CODE:[Copytoclipboard]ALTERTABLE`#__core_acl_aro`ADDUNIQUE`section_value_value_aro`(`section_value`,`value`);

CODE:[Copytoclipboard]ALTERTABLE`#__core_acl_aro`ADDUNIQUE`#__gacl_section_value_value_aro`(`section_value`,`value`);------------------------- ----

Modify the includes/database.php file:
Obtain

CODE:[Copytoclipboard]$this-_table_prefix=$table_prefix; add the following 3 lines of code under this line of code:

CODE:[Copytoclipboard]mysql_query('SETNAMES‘utf8‘',$this-_resource);

CODE:[Copytoclipboard]mysql_query('SETCHARACTERSETutf8',$this-_resource);

CODE:[Copytoclipboard]mysql_query('SETCOLLATION_CONNECTION=‘utf8_general_ci’',$this-_resource); Save after modification.

When installing, select UTF8 as the encoding format for installation.


Just after this modification, it may be installed usually, along with the Chinese show and storage in the database are regular. If you want to integrate discuz or other programs, you are able to also select the UTF8 version, plus the Chinese user name will not seem through registration soon after the integration, but Soon after registration, it seems as garbled characters.

Precautions
Just after this approach is modified, please make the corresponding modifications to includes/database.php when upgrading manbo, otherwise an error will take place.

The above remedy is really a compromise, which will exceed 1000bytes, and will not impact the section_value and worth fields within the mos_core_acl_aro table, which can be stored and displayed in the Chinese information table, and processed in latin1. file recovery from pen drive are processed in utf8. deleted file recovery software from pen drive will allow a smooth installation, and mysql will not have an effect on the show and storage of Chinese. My server environment is: apache_2.0.55-win32php4.three.10mysql5.0.15ZendOptimizer-2.6.0-WindowsMamboV4[1].five.3h_Global
Operating program: winxpsp2

The adjustments had been produced absolutely inside the manner on the master, and also the installation process went smoothly, but when I performed the following operations on the management platform, the following error message appeared:
Operation: [Content] -> [All Content material Items]
Error: DBfunctionfailedwitherrornumber1054
Unknowncolumn'c.access'in'onclause'SQL=SELECTc.*,g.nameASgroupname,cc.name,u.nameASeditor,f.content_idASfrontpage,s.titleASsection_name,v.nameASauthorFROMmos_contentASc,mos_categoriesAScc,mos_sectionsASsLEFTJOINmos_groupsASgONg.JO id=c.checked_outLEFTJOINmos_usersASvONv.id=c.created_byLEFTJOINmos_content_frontpageASfONf.content_id=c.idWHEREc.state=0ANDc.catid=cc.idANDcc.section=s.idANDs.scope='content'ORDERBYs.title,c.catid,ccorder ,cc.title,c.orderingLIMIT0,10

I don’t know if I have ever encountered this scenario.
Option:

Within this file

administrator\\components\\com_content\\admin.content material.php

turn up

.'\
FROM#__contentASc,#__categoriesAScc,#__sectionsASs'

Replace with

.'\
FROM#__categoriesAScc,#__sectionsASs,#__contentASc'

There are 2 areas to replace

Метки:  

 

Добавить комментарий:
Текст комментария: смайлики

Проверка орфографии: (найти ошибки)

Прикрепить картинку:

 Переводить URL в ссылку
 Подписаться на комментарии
 Подписать картинку