httpd

yan seiner yan at seiner.com
Thu Feb 2 18:49:09 UTC 2006


OK, got it figured out.  Here's a patch for PHP "livability"; all it
does is set 2 env vars that PHP really needs; HTTP_HOST and PHP_SELF.

It also prevents httpd from sending out the Content header; since PHP
does this along with a bunch of other headers, httpd gets confused and
breaks php pages.

--Yan

251a252,254
> # ifdef CONFIG_FEATURE_HTTPD_CONFIG_WITH_SCRIPT_INTERPR
>   char *host;
> # endif
1192a1196,1198
> #ifdef CONFIG_FEATURE_HTTPD_CONFIG_WITH_SCRIPT_INTERPR
>          addEnv("PHP",    "SELF",     config->query);
> #endif
1194a1201,1203
> #ifdef CONFIG_FEATURE_HTTPD_CONFIG_WITH_SCRIPT_INTERPR
>          addEnv("PHP",    "SELF",     config->query);
> #endif
1202a1212,1214
> #ifdef CONFIG_FEATURE_HTTPD_CONFIG_WITH_SCRIPT_INTERPR
>       addEnv("HTTP",                  "HOST",    config->host);
> #endif
1365a1378
> #ifndef CONFIG_FEATURE_HTTPD_CONFIG_WITH_SCRIPT_INTERPR
1366a1380
> #endif
1367a1382
> #ifndef CONFIG_FEATURE_HTTPD_CONFIG_WITH_SCRIPT_INTERPR
1371a1387
> #endif
1758a1775,1780
> # ifdef CONFIG_FEATURE_HTTPD_CONFIG_WITH_SCRIPT_INTERPR
>       } else if ((strncasecmp(buf, "Host:", 5) == 0)) {
>                 for(test = buf + 5; isspace(*test); test++)
>                         ;
>                 config->host = strdup(test);
> # endif





More information about the busybox mailing list