Bug#511878: apache2-mpm-prefork: The httpd server runs inside an artificial LANG=C environment
I hit the same bug when running a Python/Django site with mod_wsgi. Django tried to os.stat() a unicode filepath with u'\xc4' in it and failed. That's indeed what Python does when run with LANG=C. My fix was to add ENV=env -i LANG=en_US.UTF-8 PATH=/usr/local/bin:/usr/bin:/bin in /etc/default/apache2, but /etc/apache2/envvars sounds more appropriate. -- To UNSUBSCRIBE, email to debian-apache-requ...@lists.debian.org with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org
Bug#511878: apache2-mpm-prefork: The httpd server runs inside an artificial LANG=C environment
Hi, On Thursday 15 January 2009, Josef Spillner wrote: de_DE.UTF-8. Even when running /etc/init.d/apache start from the interactive console, the LANG value in /proc/apachemainpid/environ was set to C. Neither in the startup scripts nor in the httpd sources I can find any reference to this, therefore this report comes without patches, unfortunately. A workaround is adding LANG=de_DE.UTF-8 to /etc/apache2/envvars, but this should hardly be necessary when looking at the lenny release goal of running systems which are unicode-enabled by default. LANG=C is set in /etc/init.d/apache2 . Making this configurable in a more prominent place would be good, though. I seem to remember problems with module loading order when switching to UTF8, because the files in .../mods-enabled are then read in a different order. This has to be checked first. On the other hand, most modules that interpret filenames have a directive for configuring the charset, like IndexOptions Charset=... for mod_autoindex and ProxyFtpDirCharset for mod_proxy_ftp. Maybe mod_dav should have such an option, too. Cheers, Stefan -- To UNSUBSCRIBE, email to debian-apache-requ...@lists.debian.org with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org
Bug#511878: apache2-mpm-prefork: The httpd server runs inside an artificial LANG=C environment
Package: apache2-mpm-prefork Version: 2.2.9-10+lenny1 Severity: normal Running Apache with mod_dav and mod_svn gave me the infamous: svn: Can't convert string from 'UTF-8' to native encoding: when trying to access an SVN directory deliberately created with cyrillic letters in UTF-8 encoding. This made me wonder why, since my $LANG and the system $LANG (through /etc/environment) is set to de_DE.UTF-8. Even when running /etc/init.d/apache start from the interactive console, the LANG value in /proc/apachemainpid/environ was set to C. Neither in the startup scripts nor in the httpd sources I can find any reference to this, therefore this report comes without patches, unfortunately. A workaround is adding LANG=de_DE.UTF-8 to /etc/apache2/envvars, but this should hardly be necessary when looking at the lenny release goal of running systems which are unicode-enabled by default. On a side note, the response sent by httpd to the browser is a 403 Forbidden in this case, which is I think not an appropriate translation of the mod_dav error above, perhaps 500 would be more suitable. I can file a separate bug report if there is consensus on that issue. -- Package-specific info: List of enabled modules from 'apache2 -M': actions alias auth_basic authn_file authz_default authz_groupfile authz_host authz_svn authz_user autoindex cgi dav dav_svn deflate dir env mime negotiation php5 proxy_http proxy setenvif status userdir -- System Information: Debian Release: 5.0 APT prefers testing APT policy: (500, 'testing') Architecture: i386 (i686) Kernel: Linux 2.6.18-5-686 (SMP w/1 CPU core) Locale: LANG=de_DE.UTF-8, LC_CTYPE=de_DE.UTF-8 (charmap=UTF-8) Shell: /bin/sh linked to /bin/bash Versions of packages apache2-mpm-prefork depends on: ii apache2.2-common 2.2.9-10+lenny1 Apache HTTP Server common files ii libapr1 1.2.12-5The Apache Portable Runtime Librar ii libaprutil1 1.2.12+dfsg-8 The Apache Portable Runtime Utilit ii libc62.7-16 GNU C Library: Shared libraries ii libpcre3 7.6-2.1 Perl 5 Compatible Regular Expressi apache2-mpm-prefork recommends no packages. apache2-mpm-prefork suggests no packages. -- no debconf information -- To UNSUBSCRIBE, email to debian-apache-requ...@lists.debian.org with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org