Bug 1221275

Summary: LANG doesn't take effect after httpd graceful restart
Product: Red Hat Enterprise Linux 7 Reporter: Martin Frodl <mfrodl>
Component: httpdAssignee: Luboš Uhliarik <luhliari>
Status: CLOSED NOTABUG QA Contact: BaseOS QE - Apps <qe-baseos-apps>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 7.1CC: dkutalek, fholec, jkaluza, jorton, ykinoshi
Target Milestone: rc   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: 963146
: 1221301 1221611 (view as bug list) Environment:
Last Closed: 2015-05-18 09:40:40 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:

Description Martin Frodl 2015-05-13 15:25:02 UTC
+++ This bug was initially created as a clone of Bug #963146 +++

Description of problem:

Similar to RHEL-6 bug 963146. When the LANG variable is changed in /etc/sysconfig/httpd and Apache restarted gracefully, the value is not updated.

Reproducer:
Create file /var/www/html/info.php containing the following code:
---
<?php
    print "LANG=" . getenv('LANG') . "\n";
?>
---
# systemctl start httpd
# curl http://localhost/info.php
LANG=C
# echo 'LANG=ja_JP.utf-8' > /etc/sysconfig/httpd
# service httpd graceful
# curl http://localhost/info.php
LANG=C
# systemctl restart httpd
# curl http://localhost/info.php
LANG=ja_JP.utf-8

Version-Release number of selected component (if applicable):
httpd-2.4.6-32.el7.x86_64

Comment 2 Jan Kaluža 2015-05-18 09:40:40 UTC
During the graceful restart, it is not possible to change the value of LANG variable. That would mean changing the value of environment variable of running process, which is not possible.

The previous old RHEL-6 bug 963146 is about graceful restart when httpd is *not* running. In that case, graceful restart started the httpd and the LANG variable has been ignored for that newly started httpd instance. But this should work as expected in RHEL7.