Bug 1222055 - httpd24 sysconfig should contain HTTPD_LANG=C on RHEL 6
Summary: httpd24 sysconfig should contain HTTPD_LANG=C on RHEL 6
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Software Collections
Classification: Red Hat
Component: httpd
Version: httpd24
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: rc
: 2.2
Assignee: Jan Kaluža
QA Contact: Ondřej Pták
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2015-05-15 15:24 UTC by Martin Frodl
Modified: 2016-05-31 10:16 UTC (History)
1 user (show)

Fixed In Version: httpd24-httpd-2.4.18-2.el6 httpd24-httpd-2.4.18-2.el7
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2016-05-31 10:16:37 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2016:1154 0 normal SHIPPED_LIVE httpd24 bug fix and enhancement update 2016-05-31 13:48:49 UTC

Description Martin Frodl 2015-05-15 15:24:45 UTC
Description of problem:

There is a difference between setting httpd locale on RHEL 6 vs 7. On RHEL 7, this is done with the variable LANG in /opt/rh/httpd24/root/etc/sysconfig/httpd, whereas on RHEL 6 the variable HTTPD_LANG serves the same purpose. Yet by default, the said file contains on both RHEL versions the line 'LANG=C' which has little to no effect on RHEL 6 and should be replaced by HTTPD_LANG=C.

To inspect the impact of both variables, edit the sysconfig file to contain these two following lines:

LANG=ru_RU.utf-8
HTTPD_LANG=ja_JP.utf-8

Create file /opt/rh/httpd24/root/var/www/html/info.php with the following contents:

---
<?php
    print "LANG=" . getenv('LANG') . "\n";
?>
---

Now start the httpd24-httpd service and check the PHP script's output. On RHEL 6, we get:

# service httpd24-httpd start
Запускается httpd:                                         [  OK  ]
# curl http://localhost/info.php
LANG=ja_JP.utf-8

What we see is that the init script itself runs with the 'LANG' locale (Russian in this case), but httpd process is executed with the 'HTTPD_LANG' locale (Japanese). This contradicts the claim in the sysconfig file that the default 'LANG=C' line 'ensures the httpd process is started in the "C" locale'.

On RHEL 7, we get another result -- HTTPD_LANG is completely ignored and the 'LANG' locale is used with httpd processes:

# service httpd24-httpd start
Redirecting to /bin/systemctl start  httpd24-httpd.service
# curl http://localhost/info.php
LANG=ru_RU.utf-8

Version-Release number of selected component (if applicable):
httpd24-httpd-2.4.12-4.el6.x86_64

Comment 6 errata-xmlrpc 2016-05-31 10:16:37 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHBA-2016:1154


Note You need to log in before you can comment on or make changes to this bug.