stfual Posted October 4, 2016 Report Share Posted October 4, 2016 Hello Im trying to install and test Textpattern on an Mddh shared hosting account. It basically works but ive had some problems with data corruption in language tables that hold double byte characters. Ive requested support from the application and theyve been helpful but nobody is aware of this problem and the application is part of softalicious and "just works" on some other hosting vendors. When i look at a working system I find the following:- Charset (default/config): latin1/utf8character_set_client: utf8character_set_connection: utf8character_set_database: utf8character_set_filesystem: binarycharacter_set_results: utf8character_set_server: latin1character_set_system: utf8 On my Mddh install they are currently Charset (default/config): latin1/utf8mb4character_set_client: latin1character_set_connection: latin1character_set_database: utf8mb4character_set_filesystem: binarycharacter_set_results: latin1character_set_server: latin1character_set_system: utf8 With support from Mddh I have been able to change “character_set_database” from ‘latin1’ to ‘utf8mb4’ by changing the collation setting in Phpmyadmin after database creation, prior to running install script. It hasn’t changed anything re. the problem. "character_set_connection" looks like it could be a big problem. I note that the default on both systems is latin1. It seems that most hosting systems are set with a default of swedish latin1.Presumably the settings on the working host were either configured by the install script, or manually, or are set in a session script or .ini file.I note that hosts in general now dont allow access to config files for PHP and MySql. Can i set the the others as session variables in .htaccess ? If not Is there any other way to set them on a session basis ? Quote Link to comment Share on other sites More sharing options...
Michael D. Posted October 4, 2016 Report Share Posted October 4, 2016 If you update your ticket with this - basically the part about the connection character set - we can probably advise. My first Google search found this:https://www.toptal.com/php/a-utf-8-primer-for-php-and-mysql I assume it's similar for utf8mb4 From that article: default_charset = "utf-8";I'm guessing that if you add this to your .htaccess file: php_value default_charset "utf8mb4"It may alleviate your issue - as that will cause PHP to use that character set. If it does - then the data is being stored/read from the database properly. If that doesn't alleviate your issue - you may have to specify the character set on the connection. That said - without a ticket I'm just giving my best guess without looking into anything. If you open a ticket I can definitely perform some queries on your database to see if I get garbled/corrupted data back or not from MySQL directly. Quote Link to comment Share on other sites More sharing options...
Michael D. Posted October 4, 2016 Report Share Posted October 4, 2016 It looks like we resolved a similar issue for somebody else yesterday with this in their .htaccess file: AddCharset iso-8859-1 .php php_value default_charset iso-8859-1I assume you would replace "iso-8859-1" with "utf8mb4" like so: AddCharset utf8mb4 .php php_value default_charset utf8mb4If this solves your issue do please reply here and let us know. If it doesn't - do please open a ticket so we can look into it. Quote Link to comment Share on other sites More sharing options...
stfual Posted October 5, 2016 Author Report Share Posted October 5, 2016 Thanks. I'm testing it again today. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.