Bug 1222055
| Summary: | httpd24 sysconfig should contain HTTPD_LANG=C on RHEL 6 | ||
|---|---|---|---|
| Product: | Red Hat Software Collections | Reporter: | Martin Frodl <mfrodl> |
| Component: | httpd | Assignee: | Jan Kaluža <jkaluza> |
| Status: | CLOSED ERRATA | QA Contact: | Ondřej Pták <optak> |
| Severity: | unspecified | Docs Contact: | |
| Priority: | unspecified | ||
| Version: | httpd24 | CC: | optak |
| Target Milestone: | rc | ||
| Target Release: | 2.2 | ||
| Hardware: | Unspecified | ||
| OS: | Unspecified | ||
| Whiteboard: | |||
| Fixed In Version: | httpd24-httpd-2.4.18-2.el6 httpd24-httpd-2.4.18-2.el7 | Doc Type: | Bug Fix |
| Doc Text: | Story Points: | --- | |
| Clone Of: | Environment: | ||
| Last Closed: | 2016-05-31 10:16:37 UTC | Type: | Bug |
| Regression: | --- | Mount Type: | --- |
| Documentation: | --- | CRM: | |
| Verified Versions: | Category: | --- | |
| oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
| Cloudforms Team: | --- | Target Upstream Version: | |
| Embargoed: | |||
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 |
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