Your message dated Fri, 19 Mar 2010 23:38:34 +0100
with message-id <[email protected]>
and subject line indeed, was not a bug
has caused the Debian Bug report #571559,
regarding lighttpd: fastcgi bin-environment variable not set
to be marked as done.
This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.
(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact [email protected]
immediately.)
--
571559: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=571559
Debian Bug Tracking System
Contact [email protected] with problems
--- Begin Message ---
Package: lighttpd
Version: 1.4.26-1
Severity: normal
I want to get an environment variable MY_VAR in a small c program (attached),
and it used to work with a previous version of lighttpd. With this version it
does not. Some variables are properly set, e.g. QUERY_STRING is ok.
I also attached the lighttpd config file.
-- System Information:
Debian Release: squeeze/sid
APT prefers unstable
APT policy: (500, 'unstable'), (500, 'testing'), (500, 'stable'), (1,
'experimental')
Architecture: i386 (i686)
Kernel: Linux 2.6.32-3-686 (SMP w/2 CPU cores)
Locale: LANG=fr_FR.UTF-8, LC_CTYPE=fr_FR.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Versions of packages lighttpd depends on:
ii libattr1 1:2.4.44-1 Extended attribute shared library
ii libbz2-1.0 1.0.5-4 high-quality block-sorting file co
ii libc6 2.10.2-5 Embedded GNU C Library: Shared lib
ii libgamin0 [libfam0] 0.1.10-2+b1 Client library for the gamin file
ii libldap-2.4-2 2.4.17-2.1 OpenLDAP libraries
ii libpcre3 7.8-3 Perl 5 Compatible Regular Expressi
ii libssl0.9.8 0.9.8k-8 SSL shared libraries
ii libterm-readline-perl-p 1.0303-1 Perl implementation of Readline li
ii lsb-base 3.2-23 Linux Standard Base 3.2 init scrip
ii mime-support 3.48-1 MIME files 'mime.types' & 'mailcap
ii zlib1g 1:1.2.3.4.dfsg-3 compression library - runtime
Versions of packages lighttpd recommends:
ii spawn-fcgi 1.6.3-1 A fastcgi process spawner
Versions of packages lighttpd suggests:
ii apache2-utils 2.2.14-7 utility programs for webservers
ii openssl 0.9.8k-8 Secure Socket Layer (SSL) binary a
pn rrdtool <none> (no description available)
-- no debconf information
/* gcc testbinenv.c -o testbinenv -lfcgi */
#include <stdlib.h>
#include <string.h>
#include <fcgi_stdio.h>
int main(int argc, char *argv[])
{
while (FCGI_Accept() >= 0) {
printf("Content-type: text/html;charset=UTF-8\r\n\r\n");
printf("one loop");
char* fTemp = getenv("MY_VAR");
if (fTemp == NULL || strlen(fTemp) == 0) {
printf("no MY_VAR\r\n");
continue;
}
printf("MY_VAR : %s\r\n", fTemp);
} // FCGI_Accept()
return 0;
}
server.modules += ( "mod_fastcgi" )
$HTTP["remoteip"] =~ "127.0.0.1" {
fastcgi.server += ( "testbinenv.fcgi" =>
((
"bin-path" => "/home/toto/testbinenv",
"socket" => "/var/run/lighttpd/testbinenv.socket",
"max-procs" => 1,
"idle-timeout" => 5,
"check-local" => "disable",
"bin-environment" => (
"MY_VAR" => "test_my_var"
),
"bin-copy-environment" => (
"PATH", "SHELL", "USER"
)
))
)
}
--- End Message ---
--- Begin Message ---
i moved the getenv code out of the FCGI_Accep loop and it
works nicely.
Thank you for your help,
Jérémy.
signature.asc
Description: OpenPGP digital signature
--- End Message ---