Opened 19 years ago
Closed 18 years ago
#4462 closed patch (fixed)
mythweb Perl components not working with lighttpd
| Reported by: | anonymous | Owned by: | xris |
|---|---|---|---|
| Priority: | minor | Milestone: | unknown |
| Component: | mythweb | Version: | unknown |
| Severity: | medium | Keywords: | lighttpd |
| Cc: | Ticket locked: | no |
Description
For reasons unknown, lighttpd converts all cgi (but not fastcgi) environment variable names to uppercase. This was reported to lighttpd devs 2 years (!) ago, but the issue seems to be ignored (see http://trac.lighttpd.net/trac/ticket/420).
The attached patch makes mythweb work properly with lighttpd.
Attachments (2)
Change History (10)
by , 19 years ago
| Attachment: | mythweb-lighttpd-envvar.patch added |
|---|
comment:3 by , 19 years ago
| Resolution: | → fixed |
|---|---|
| Status: | infoneeded_new → closed |
comment:4 by , 19 years ago
| Resolution: | fixed |
|---|---|
| Status: | closed → new |
This still doesn't work properly. Changing the $ENV{...} references to use uppercase as in the first patch, together with the checked-in change, should work with any web server.
comment:5 by , 19 years ago
How doesn't it work? the changeset basically creates an uppercase version of each environment variable, alongside the lower case one. I can't change the vars to upper case in the apache config because it would break every existing mythweb install and piss off a bunch of users.
comment:6 by , 19 years ago
The problem is that lighttpd converts all environment variable names to uppercase before assigning them. For example, setenv.add-environment = ( "db_server" => "hostname" ) sets the environment variable DB_SERVER to the value hostname. Your change copies any environment variables with lowercase names to new variables with uppercase names, but the lowercase names are the ones that are missing, and the code still tries to access the variables by lowercase names. In other words, the change has no effect under lighttpd. If my original patch is applied on top of your change, the code will work with both web servers, since Apache-assigned lowercase variables will be mapped to uppercase, and lighttpd sets only uppercase names.
comment:8 by , 18 years ago
| Resolution: | → fixed |
|---|---|
| Status: | new → closed |

make mythweb.pl work with lighttpd