Search…

X3 Photo Gallery Support Forums

Search…
 
perch1k
Topic Author
Posts: 17
Joined: 08 Mar 2012, 10:38

Слетела кодировка в Панели Администратора

24 Mar 2017, 18:39

Привет!
Внезапно слетела кодировка в панели администратора. Теперь все русские символы отображаются "кракозябрами". Помогите, пожалуйста, разобраться, в чём может быть дело. При необходимости могу предоставить доступ к панели.
Сайт http://www.pershinoleg.ru
Прикладываю printscreen.
Attachments
Снимок экрана 2017-03-25 в 1.32.24.png
Снимок экрана 2017-03-25 в 1.32.24.png (73.09 KiB) Viewed 12739 times
 
User avatar
mjau-mjau
X3 Wizard
Posts: 13993
Joined: 30 Sep 2006, 03:37

Re: Слетела кодировка в Панели Администратора

25 Mar 2017, 00:43

Perhaps you can send me login to your panel in private message so I can take a look?
 
perch1k
Topic Author
Posts: 17
Joined: 08 Mar 2012, 10:38

Re: Слетела кодировка в Панели Администратора

25 Mar 2017, 07:03

Thanks! I sent you a PM.
 
User avatar
mjau-mjau
X3 Wizard
Posts: 13993
Joined: 30 Sep 2006, 03:37

Re: Слетела кодировка в Панели Администратора

26 Mar 2017, 13:10

I checked server, and can confirm the issue. The server is not encoding Cyrillic properly.

I assume it was not always like this? You upgraded server perhaps?

I will need FTP to study this issue further and try to fix it.
 
perch1k
Topic Author
Posts: 17
Joined: 08 Mar 2012, 10:38

Re: Слетела кодировка в Панели Администратора

26 Mar 2017, 14:01

Yes, not always. It appeared a couple of weeks ago. No, I didn't update the server, maybe it was my hosting provider.
I sent you login to my FTP by PM. Thanks!!
 
User avatar
mjau-mjau
X3 Wizard
Posts: 13993
Joined: 30 Sep 2006, 03:37

Re: Слетела кодировка в Панели Администратора

27 Mar 2017, 03:10

This server is seriously misconfigured.

First of all, by default, your server is outputting Content-Type:application/x-www-form-urlencoded for PHP output.
Code
Content-Type:application/x-www-form-urlencoded; charset=UTF-8
It should not be url-encoded, especially since you are using Cyrillic characters. It should simply be:
Code
Content-Type:text/html; charset=UTF-8
I managed to fix it for the panel MENU (only), by forcing the above content-type from the PHP file. It doesn't seem this can be controlled by .htaccess.

Next up, server is outputting charset=windows-1251 for other PHP requests:
Code
Content-Type:text/html; charset=windows-1251
Response should be charset=UTF-8, especially since you are using Cyrillic! I think the above is the MAIN PROBLEM. We already set UTF-8 from the X3 .htaccess file, but it seems like your server is ignoring this or overriding it.

To further complicate issues, I see this in response headers:
Code
Server:nginx/1.10.1
Huh? Your server is NGINX? On your diagnostics page, it reports "Apache server". This doesn't make sense, and is highly suspect. Do you also have some nginx-specific config somewhere?

Related to this, for your main website document, it returns these values in response headers:
Code
Etag:"c-78060f3189-3122dbe0e1"
Server:nginx/1.10.1
Again, it reports NGINX. Besides, Etag should not be there if the rules from X3 .htaccess are applied properly. Looks to me like either some/all .htaccess rules are ignored and/or you have specific custom server config added somewhere else. Perhaps someone tried to make X3 work with NGINX? That would be possible of course, but some things are not working correctly. Most interesting though, is that response reports "NGINX", while your server reports "Apache/2.4.17 (FreeBSD) PHP/7.0.0".

All in all, this server is simply not configured as standard hosting should be. You will need to contact your host, and feel free to reference the details above. I also had a lot of problems loading panel pages ... I had to refresh several times to get things loaded.

I would be happy to help out if someone is trying to configure this for NGINX.
 
perch1k
Topic Author
Posts: 17
Joined: 08 Mar 2012, 10:38

Re: Слетела кодировка в Панели Администратора

28 Mar 2017, 11:00

Thank you for your help and detailed comments!
Unfortunately, i'm not very versed in all aspects. I wrote to my hosting provider, I'm waiting for some solutions and comments from him.

While I'm waiting for an answer from him - here are the settings of the PHP module (if some parameter needs to change, please tell me):
Attachments
Снимок экрана 2017-03-28 в 17.53.32.png
Снимок экрана 2017-03-28 в 17.53.32.png (119.67 KiB) Viewed 12687 times
 
User avatar
mjau-mjau
X3 Wizard
Posts: 13993
Joined: 30 Sep 2006, 03:37

Re: Слетела кодировка в Панели Администратора

28 Mar 2017, 14:35

I haven't seen this interface before, and ultimately, I am still wondering what kinda server this is and why it outputs "NGINX". Nothing specifically wrong from that screenshot that I can see (although I can't read Russian), but I am guessing that last dropdown box should be set to UTF-8.
 
perch1k
Topic Author
Posts: 17
Joined: 08 Mar 2012, 10:38

Re: Слетела кодировка в Панели Администратора

28 Mar 2017, 16:24

I talked with hosting support. I received a response that the encoding of the site in the hosting control panel was incorrectly selected ... but it's strange, how it worked before. Just changed windows-1251 to utf-8 and all looks great!

I also learned that my hosting services were always arranged as nginx as front-end and Apache as back-end. Hosting provider is NIC https://www.nic.ru/en
 
User avatar
mjau-mjau
X3 Wizard
Posts: 13993
Joined: 30 Sep 2006, 03:37

Re: Слетела кодировка в Панели Администратора

28 Mar 2017, 23:33

perch1k wrote:I talked with hosting support. I received a response that the encoding of the site in the hosting control panel was incorrectly selected ... but it's strange, how it worked before. Just changed windows-1251 to utf-8 and all looks great!
Nice, that was it!
perch1k wrote:I also learned that my hosting services were always arranged as nginx as front-end and Apache as back-end. Hosting provider is NIC https://www.nic.ru/en
Interesting, I didn't know that was possible. That's cool.