Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
#13 2019-01-01 20:26:39
- Rob.
- New Member
- Registered: 2018-12-31
- Posts: 6
Re: Encoding problem
singaz wrote #315869:
About 6 months ago
New hosting I fought for two weeks
I read the forum for two weeks
I found two posts
I fixed my problem
That’s my idea
Thank you Singaz. I have also found these posts, but I didn’t understand them. I don’t know which php file should I edit to patch this missing line (I couldn’t find txplib_db.php in TXP 4.7.2). Moreover for my case encoding was correct for TXP 4.6.2 and the problem appears after upgrading to 4.7.2 (also php from 5.6 to 7.2 – for both php versions problem is the same).
So if anyone have other suggestions – I still need help :( and I open to check new ideas.
Happy New Year for everyone
Offline
#14 2019-01-01 20:36:11
- Rob.
- New Member
- Registered: 2018-12-31
- Posts: 6
Re: Encoding problem
gaekwad wrote #315876:
The trailing
_ci
means character insensitive, which also mangles accented characters, if it was me I would try eitherutf8_bin
orutf8mb4_bin
on a test server and see how that plays.
Could you explain it? What should I do? I guess that you write about hosting settings not TXP settings, don’t you? I have access to DirectAdmin and phpMyAdmin. How can I do a test that you mention?
Offline
Re: Encoding problem
Did you try the htaccess way? you can add AddDefaultCharset utf-8
on the top of the file.
Yiannis
——————————
NeMe | hblack.art | EMAP | A Sea change | Toolkit of Care
I do my best editing after I click on the submit button.
Offline
Re: Encoding problem
colak wrote #315879:
Did you try the htaccess way? you can add
AddDefaultCharset utf-8
on the top of the file.
Or is it possible to copy out the BB sql file, edit to add the “ AddDefaultCharset utf-8” in the sql directly. and then re-import that file.
BACKUP everything before trying.
…. texted postive
Online
#17 2019-01-01 21:39:16
- Rob.
- New Member
- Registered: 2018-12-31
- Posts: 6
Re: Encoding problem
It seems to me that I solved the problem by accident :)
I have found the txplib_db.php in Lib directory and I have tested different settings “utf8_*” in line 223 and 225. Without any success. Then I decided to try to remove this block of code by commenting lines from 217 to 227. I have refreshed the page and now it’s work! I don’t know the explanation but I don’t care – I can continue to work with the blog.
Thank you for your assistance. “Encoding issue” can be mark as SOLVED and CLOSED.
Offline
Re: Encoding problem
Thanks for the report. I’ve never seen this part of the code before, but it looks like it is MySQL 5 specific. In my Diagnostics db version reads as
MySQL: 5.5.5-10.1.37-MariaDB (mariadb.org binary distribution)
which seems to work fine. But in your case it is reported as
MySQL: 10.1.24-MariaDB-cll-lve (MariaDB Server)
so the version is possibly wrongly detected. Needs further testing.
Offline
Re: Encoding problem
Oleg – from memory, I’ve seen MariaDB-cll-lve
appear on cPanel servers, if that helps research.
Last edited by gaekwad (2019-01-02 18:36:59)
Offline
#20 2019-01-02 20:13:58
- singaz
- Member
- Registered: 2017-03-12
- Posts: 150
Re: Encoding problem
Addition.
This is not a problem. The site works fine without errors.
But there is one incomprehensible line (see screenshot):
Initially the site worked on version 4.5.7. The site is constantly updated with the release of new versions of the engine (4.6.0, 4.6.1, 4.6.2 ….. 4.7.2)
I do not remember when the string appeared.
Checked base Notepad ++. There are no words in the database /etc pki /tls /certs /tmp /var /usr /local /php55 /lib /php
Where can these records be stored?
Sorry my horror English. I’m learning textpattern, I’m learning English
Offline
Re: Encoding problem
singaz: The open_basedir
reference is probably from the PHP 5.* era. Has the server run PHP 5 previously and then been updated to PHP 7?
Last edited by gaekwad (2019-01-03 10:36:19)
Offline
#22 2019-01-03 12:32:33
- singaz
- Member
- Registered: 2017-03-12
- Posts: 150
Re: Encoding problem
Yes.
Previously, the server php5.4 (or 5.5) was run with the version txp4.5.7.
After update textpattern to 4.6.0, has been updated to php5.6.
After update textpattern to 4.7.0, has been updated to php7.
Sorry my horror English. I’m learning textpattern, I’m learning English
Offline
Re: Encoding problem
Did you consider adding
AddHandler application/x-httpd-php72 .php
AddDefaultCharset utf-8
in your htaccess file? It forces the server to use php 7.2.x and UTF-8 Charsets
Last edited by colak (2019-01-03 18:19:38)
Yiannis
——————————
NeMe | hblack.art | EMAP | A Sea change | Toolkit of Care
I do my best editing after I click on the submit button.
Offline
#24 2019-01-03 18:14:10
- singaz
- Member
- Registered: 2017-03-12
- Posts: 150
Re: Encoding problem
All changes php did in the panel direct admin
My files .htaccess
# BEGIN Textpattern
#DirectoryIndex index.php index.html
#Options +FollowSymLinks
#Options -Indexes
#ErrorDocument 403 default
<IfModule mod_rewrite.c>
RewriteEngine On
#RewriteBase /relative/web/path/
RewriteCond %{HTTPS} !=on [OR]
RewriteCond %{HTTP_HOST} ^mydomain.com$ [NC]
RewriteRule ^(.*)$ https://www.mydomain.com/$1 [R=301,L]
RewriteCond %{REQUEST_FILENAME} -f [OR]
RewriteCond %{REQUEST_FILENAME} -d
RewriteRule ^(.+) - [PT,L]
RewriteCond %{REQUEST_URI} !=/favicon.ico
RewriteRule ^(.*) index.php
RewriteCond %{HTTP:Authorization} !^$
RewriteRule .* - [E=REMOTE_USER:%{HTTP:Authorization}]
</IfModule>
###php_value register_globals 0
<IfModule mod_mime.c>
AddType image/svg+xml svg svgz
AddEncoding gzip svgz
</IfModule>
# END Textpattern
Perhaps, the hosting provider has made changes in inaccessible for me to view
Sorry my horror English. I’m learning textpattern, I’m learning English
Offline