[ZBX-12710] Locale not detected properly on IIS 8.5 Created: 2017 Sep 12  Updated: 2024 Apr 10  Resolved: 2017 Oct 22

Status: Closed
Project: ZABBIX BUGS AND ISSUES
Component/s: Frontend (F)
Affects Version/s: 3.4.1
Fix Version/s: 3.0.13rc1, 3.2.10rc1, 3.4.4rc1, 4.0.0alpha1, 4.0 (plan)

Type: Problem report Priority: Trivial
Reporter: Ruslan Aznabaev Assignee: Vjaceslavs Bogdanovs
Resolution: Fixed Votes: 0
Labels: windows
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

Windows Server 2012 R2
IIS 8.5
PHP 7.1.1


Issue Links:
Sub-task
Team: Team C
Sprint: Sprint 19
Story Points: 0.125

 Description   

After transfering zabbix-web-mysql to IIS, I got this error:

Locale for language "ru_RU" is not found on the web server.

But russian translate working.
After some debuging I found this, in file ./include/locales.inc.php(95):

if ((stristr($_SERVER['SERVER_SOFTWARE'], 'win32') !== false) || (stristr($_SERVER['SERVER_SOFTWARE'], 'win64') !== false)) {

$_SERVER['SERVER_SOFTWARE'] defined as "Microsoft-IIS/8.5".
So, I changed this line to:

if ((stristr($_SERVER['SERVER_SOFTWARE'], 'win32') !== false) || (stristr($_SERVER['SERVER_SOFTWARE'], 'win64') !== false) || (stristr($_SERVER['SERVER_SOFTWARE'], 'Microsoft-IIS/8.5') !== false)) {

And error disappears.
But this time, If I select russian translate in profile, I still got english frontend.



 Comments   
Comment by Ingus Vilnis [ 2017 Sep 26 ]

Hi Ruslan,

Thank you for the report. We do confirm the behavior but currently we don't have official support for IIS. There are no plans to implement this in the nearest future either.

You may open this as a feature request for support of IIS though.

Currently closing this one as Won't fix.

Comment by Ruslan Aznabaev [ 2017 Sep 26 ]

Anyway, I just removed error raise and everything works.

Generated at Sun May 25 08:26:31 EEST 2025 using Jira 9.12.4#9120004-sha1:625303b708afdb767e17cb2838290c41888e9ff0.