httpd-bugs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bugzi...@apache.org
Subject DO NOT REPLY [Bug 32726] New: - SetEnv does not appear to be working in <Directory>
Date Thu, 16 Dec 2004 01:28:59 GMT
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG·
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=32726>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND·
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=32726

           Summary: SetEnv does not appear to be working in <Directory>
           Product: Apache httpd-2.0
           Version: 2.0.50
          Platform: Sun
        OS/Version: Solaris
            Status: NEW
          Severity: normal
          Priority: P2
         Component: mod_env
        AssignedTo: bugs@httpd.apache.org
        ReportedBy: david.logan@hp.com


Hi,

SetEnv seems to work when it is in the main config (see example below for
variables LCS_DB and LCS_HOSTNAME). This is output from my CGI perl script using 

foreach $key (keys %ENV) {
        cluck "$key --> $ENV{$key}<br>";
}

I use cluck to put the Environment out to the error_log.

When the variables are placed in the main configuration ie. Not in a Directory
directive, they are passed through as below.

[Thu Dec 16 11:19:06 2004] list_contacts.pl: HTTP_ACCEPT -->
text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,t
ext/plain;q=0.8,image/png,*/*;q=0.5<br> at list_contacts.pl line 84
[Thu Dec 16 11:19:06 2004] list_contacts.pl: SCRIPT_FILENAME -->
/u2/lcscreative/cgi/list_contacts.pl<br> at list_contacts.pl
 line 84
[Thu Dec 16 11:19:06 2004] list_contacts.pl: LCS_DB --> lcscreative<br> at
list_contacts.pl line 84
[Thu Dec 16 11:19:06 2004] list_contacts.pl: SERVER_SOFTWARE --> Apache/2.0.50
(Unix) mod_perl/1.99_09 Perl/v5.8.0 PHP/4.3.3
DAV/2<br> at list_contacts.pl line 84
[Thu Dec 16 11:19:06 2004] list_contacts.pl: HTTP_ACCEPT_CHARSET -->
ISO-8859-1,utf-8;q=0.7,*;q=0.7<br> at list_contacts.pl l
ine 84
[Thu Dec 16 11:19:06 2004] list_contacts.pl: TZ --> Australia/South<br> at
list_contacts.pl line 84
[Thu Dec 16 11:19:06 2004] list_contacts.pl: QUERY_STRING --> alphabet=A<br> at
list_contacts.pl line 84
[Thu Dec 16 11:19:06 2004] list_contacts.pl: REMOTE_PORT --> 8645<br> at
list_contacts.pl line 84
[Thu Dec 16 11:19:06 2004] list_contacts.pl: HTTP_USER_AGENT --> Mozilla/5.0
(Windows; U; Windows NT 5.1; en-US; rv:1.7.5) Ge
cko/20041107 Firefox/1.0<br> at list_contacts.pl line 84
[Thu Dec 16 11:19:06 2004] list_contacts.pl: SERVER_PORT --> 80<br> at
list_contacts.pl line 84
[Thu Dec 16 11:19:06 2004] list_contacts.pl: SERVER_SIGNATURE -->
<address>Apache/2.0.50 (Unix) mod_perl/1.99_09 Perl/v5.8.0
PHP/4.3.3 DAV/2 Server at edgewing.homeunix.net Port 80</address>
[Thu Dec 16 11:19:06 2004] list_contacts.pl: <br> at list_contacts.pl line 84
[Thu Dec 16 11:19:06 2004] list_contacts.pl: HTTP_ACCEPT_LANGUAGE -->
en-us,en;q=0.5<br> at list_contacts.pl line 84
[Thu Dec 16 11:19:06 2004] list_contacts.pl: HTTP_COOKIE -->
sessionid=CRmJKeZSTeDclqlfVxU<br> at list_contacts.pl line 84
[Thu Dec 16 11:19:06 2004] list_contacts.pl: REMOTE_ADDR --> 161.114.228.150<br>
at list_contacts.pl line 84
[Thu Dec 16 11:19:06 2004] list_contacts.pl: LCS_HOST --> porkchop<br> at
list_contacts.pl line 84
[Thu Dec 16 11:19:06 2004] list_contacts.pl: HTTP_KEEP_ALIVE --> 300<br> at
list_contacts.pl line 84
[Thu Dec 16 11:19:06 2004] list_contacts.pl: SERVER_PROTOCOL --> HTTP/1.0<br> at
list_contacts.pl line 84
[Thu Dec 16 11:19:06 2004] list_contacts.pl: PATH -->
/usr/local/samba/bin:/opt/sfw/bin:/usr/local/mysql/bin:/usr/local/sbin:
/usr/local/sbin/:/usr/local/bin:/usr/bin:<br> at list_contacts.pl line 84
[Thu Dec 16 11:19:06 2004] list_contacts.pl: REQUEST_URI -->
/intscripts/list_contacts.pl?alphabet=A<br> at list_contacts.pl
line 84
[Thu Dec 16 11:19:06 2004] list_contacts.pl: GATEWAY_INTERFACE --> CGI/1.1<br>
at list_contacts.pl line 84
[Thu Dec 16 11:19:06 2004] list_contacts.pl: SERVER_ADDR --> 192.168.0.6<br> at
list_contacts.pl line 84
[Thu Dec 16 11:19:06 2004] list_contacts.pl: DOCUMENT_ROOT --> /u2/www<br> at
list_contacts.pl line 84
[Thu Dec 16 11:19:06 2004] list_contacts.pl: HTTP_VIA --> 1.1 AU-GEMINI-01<br>
at list_contacts.pl line 84
[Thu Dec 16 11:19:06 2004] list_contacts.pl: HTTP_HOST -->
edgewing.homeunix.net<br> at list_contacts.pl line 84
[Thu Dec 16 11:19:06 2004] list_contacts.pl: UNIQUE_ID -->
BWdjIsCoAAYAABHQFCgAAAAA<br> at list_contacts.pl line 84
[Thu Dec 16 11:19:06 2004] [error] Optional hook test said: GET
/intscripts/list_contacts.pl?alphabet=A HTTP/1.0
[Thu Dec 16 11:19:06 2004] [error] Optional function test said: GET
/intscripts/list_contacts.pl?alphabet=A HTTP/1.0


When they are placed in a directory directive (see below) :

 ScriptAlias /intscripts/ "/u2/lcscreative/cgi/"

    Alias /internal "/u2/lcscreative/html/"

    <Directory "/u2/lcscreative/html/">

        Options Indexes FollowSymlinks MultiViews

        AuthType     Basic
        AuthName     "lcscreative"
        AuthUserFile /u2/lcscreative/conf/userpass
        Require      valid-user

        Order allow,deny
        Allow from all

        SetEnv LCS_DB "lcscreative"
        SetEnv LCS_HOST "porkchop"

    </Directory>

The 2 variables that I have set are not passed through, output from error_log
shown below :

[Thu Dec 16 11:35:47 2004] list_contacts.pl: SCRIPT_NAME -->
/intscripts/list_contacts.pl<br> at list_contacts.pl line 84
[Thu Dec 16 11:35:47 2004] list_contacts.pl: SERVER_NAME -->
edgewing.homeunix.net<br> at list_contacts.pl line 84
[Thu Dec 16 11:35:47 2004] list_contacts.pl: HTTP_REFERER -->
http://edgewing.homeunix.net/internal/menu.html<br> at list_contacts.pl line 84
[Thu Dec 16 11:35:47 2004] list_contacts.pl: SERVER_ADMIN -->
edgewing@bigpond.net.au<br> at list_contacts.pl line 84
[Thu Dec 16 11:35:47 2004] list_contacts.pl: HTTP_ACCEPT_ENCODING -->
gzip,deflate<br> at list_contacts.pl line 84
[Thu Dec 16 11:35:47 2004] list_contacts.pl: HTTP_CONNECTION --> Keep-Alive<br>
at list_contacts.pl line 84
[Thu Dec 16 11:35:47 2004] list_contacts.pl: REQUEST_METHOD --> GET<br> at
list_contacts.pl line 84
[Thu Dec 16 11:35:47 2004] list_contacts.pl: HTTP_ACCEPT -->
text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5<br>
at list_contacts.pl line 84
[Thu Dec 16 11:35:47 2004] list_contacts.pl: SCRIPT_FILENAME -->
/u2/lcscreative/cgi/list_contacts.pl<br> at list_contacts.pl line 84
[Thu Dec 16 11:35:47 2004] list_contacts.pl: SERVER_SOFTWARE --> Apache/2.0.50
(Unix) mod_perl/1.99_09 Perl/v5.8.0 PHP/4.3.3 DAV/2<br> at list_contacts.pl line 84
[Thu Dec 16 11:35:47 2004] list_contacts.pl: HTTP_ACCEPT_CHARSET -->
ISO-8859-1,utf-8;q=0.7,*;q=0.7<br> at list_contacts.pl line 84
[Thu Dec 16 11:35:47 2004] list_contacts.pl: TZ --> Australia/South<br> at
list_contacts.pl line 84
[Thu Dec 16 11:35:47 2004] list_contacts.pl: QUERY_STRING --> alphabet=A<br> at
list_contacts.pl line 84
[Thu Dec 16 11:35:47 2004] list_contacts.pl: REMOTE_PORT --> 38067<br> at
list_contacts.pl line 84
[Thu Dec 16 11:35:47 2004] list_contacts.pl: HTTP_USER_AGENT --> Mozilla/5.0
(Windows; U; Windows NT 5.1; en-US; rv:1.7.5) Gecko/20041107 Firefox/1.0<br> at
list_contacts.pl line 84
[Thu Dec 16 11:35:47 2004] list_contacts.pl: SERVER_PORT --> 80<br> at
list_contacts.pl line 84
[Thu Dec 16 11:35:47 2004] list_contacts.pl: SERVER_SIGNATURE -->
<address>Apache/2.0.50 (Unix) mod_perl/1.99_09 Perl/v5.8.0 PHP/4.3.3 DAV/2
Server at edgewing.homeunix.net Port 80</address>
[Thu Dec 16 11:35:47 2004] list_contacts.pl: <br> at list_contacts.pl line 84
[Thu Dec 16 11:35:47 2004] list_contacts.pl: HTTP_ACCEPT_LANGUAGE -->
en-us,en;q=0.5<br> at list_contacts.pl line 84
[Thu Dec 16 11:35:47 2004] list_contacts.pl: HTTP_COOKIE -->
sessionid=CRmJKeZSTeDclqlfVxU<br> at list_contacts.pl line 84
[Thu Dec 16 11:35:47 2004] list_contacts.pl: REMOTE_ADDR --> 161.114.228.150<br>
at list_contacts.pl line 84
[Thu Dec 16 11:35:47 2004] list_contacts.pl: HTTP_KEEP_ALIVE --> 300<br> at
list_contacts.pl line 84
[Thu Dec 16 11:35:47 2004] list_contacts.pl: SERVER_PROTOCOL --> HTTP/1.0<br> at
list_contacts.pl line 84
[Thu Dec 16 11:35:47 2004] list_contacts.pl: PATH -->
/usr/local/samba/bin:/opt/sfw/bin:/usr/local/mysql/bin:/usr/local/sbin:/usr/local/sbin/:/usr/local/bin:/usr/bin:<br>
at list_contacts.pl line 84
[Thu Dec 16 11:35:47 2004] list_contacts.pl: REQUEST_URI -->
/intscripts/list_contacts.pl?alphabet=A<br> at list_contacts.pl line 84
[Thu Dec 16 11:35:47 2004] list_contacts.pl: GATEWAY_INTERFACE --> CGI/1.1<br>
at list_contacts.pl line 84
[Thu Dec 16 11:35:47 2004] list_contacts.pl: SERVER_ADDR --> 192.168.0.6<br> at
list_contacts.pl line 84
[Thu Dec 16 11:35:47 2004] list_contacts.pl: DOCUMENT_ROOT --> /u2/www<br> at
list_contacts.pl line 84
[Thu Dec 16 11:35:47 2004] list_contacts.pl: HTTP_VIA --> 1.1 AU-GEMINI-01<br>
at list_contacts.pl line 84
[Thu Dec 16 11:35:47 2004] list_contacts.pl: HTTP_HOST -->
edgewing.homeunix.net<br> at list_contacts.pl line 84
[Thu Dec 16 11:35:47 2004] list_contacts.pl: UNIQUE_ID -->
QRDkmcCoAAYAABIXiSUAAAAF<br> at list_contacts.pl line 84

My platform is Sun UltraSPARC 30 and OS is Solaris 8

porkribs /u2/lcscreative/cgi $ uname -a
SunOS porkribs 5.8 Generic_108528-27 sun4u sparc SUNW,Ultra-30

Apache version is 2.0.50 - httpd -l =

porkribs /u2/lcscreative/cgi $ /usr/local/apache2/bin/httpd -l
Compiled in modules:
  core.c
  mod_access.c
  mod_auth.c
  mod_auth_dbm.c
  mod_file_cache.c
  mod_echo.c
  mod_charset_lite.c
  mod_cache.c
  mod_disk_cache.c
  mod_mem_cache.c
  mod_ext_filter.c
  mod_include.c
  mod_deflate.c
  mod_log_config.c
  mod_logio.c
  mod_env.c
  mod_mime_magic.c
  mod_expires.c
  mod_headers.c
  mod_usertrack.c
  mod_unique_id.c
  mod_setenvif.c
  mod_proxy.c
  proxy_connect.c
  proxy_ftp.c
  proxy_http.c
  mod_optional_hook_export.c
  mod_optional_hook_import.c
  mod_optional_fn_import.c
  mod_optional_fn_export.c
  mod_bucketeer.c
  prefork.c
  http_core.c
  mod_mime.c
  mod_dav.c
  mod_status.c
  mod_autoindex.c
  mod_asis.c
  mod_info.c
  mod_cgi.c
  mod_cgid.c
  mod_dav_fs.c
  mod_vhost_alias.c
  mod_dir.c
  mod_actions.c
  mod_speling.c
  mod_alias.c
  mod_rewrite.c
  mod_so.c

porkribs /u2/lcscreative/cgi $ /usr/local/apache2/bin/httpd -V
Server version: Apache/2.0.50
Server built:   Sep  5 2004 21:51:13
Server's Module Magic Number: 20020903:8
Architecture:   32-bit
Server compiled with....
 -D APACHE_MPM_DIR="server/mpm/prefork"
 -D APR_HAS_SENDFILE
 -D APR_HAS_MMAP
 -D APR_HAVE_IPV6 (IPv4-mapped addresses enabled)
 -D APR_USE_PROC_PTHREAD_SERIALIZE
 -D APR_USE_PTHREAD_SERIALIZE
 -D SINGLE_LISTEN_UNSERIALIZED_ACCEPT
 -D APR_HAS_OTHER_CHILD
 -D AP_HAVE_RELIABLE_PIPED_LOGS
 -D HTTPD_ROOT="/usr/local/apache2"
 -D SUEXEC_BIN="/usr/local/apache2/bin/suexec"
 -D DEFAULT_PIDLOG="logs/httpd.pid"
 -D DEFAULT_SCOREBOARD="logs/apache_runtime_status"
 -D DEFAULT_LOCKFILE="logs/accept.lock"
 -D DEFAULT_ERRORLOG="logs/error_log"
 -D AP_TYPES_CONFIG_FILE="conf/mime.types"
 -D SERVER_CONFIG_FILE="conf/httpd.conf"

porkribs /u2/lcscreative/cgi $ /usr/local/apache2/bin/httpd -L | grep SetEnv
SetEnv (mod_env.c)
SetEnvIf (mod_setenvif.c)
SetEnvIfNoCase (mod_setenvif.c)

Please let me know if you need any more information or if I have made an error
in my usage.

Many thanks

-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

---------------------------------------------------------------------
To unsubscribe, e-mail: bugs-unsubscribe@httpd.apache.org
For additional commands, e-mail: bugs-help@httpd.apache.org


Mime
View raw message