httpd: support env var SCRIPT_FILENAME
Dirk Clemens
develop at cle-mens.de
Sat Sep 3 21:05:09 UTC 2005
Dirk Clemens wrote:
>php needs the Variable SCRIPT_FILENAME.
>And here is the patch:
>
>@@ -1179,6 +1185,8 @@
> argp[0] = strrchr( purl, '/' ) + 1;
> /* but script argp[0] must have absolute path and chdiring to
>this */
> if(realpath(purl + 1, realpath_buff) != NULL) {
>+ // now we can set SCRIPT_FILENAME
>+ addEnv("SCRIPT_FILENAME","",realpath_buff);
> script = strrchr(realpath_buff, '/');
> if(script) {
> *script = '\0';
>
>
>Dirk
>_______________________________________________
>
>
I have read and thought about this:
SCRIPT_FILENAME is not cgi-Standard.
It's more an apache feature and $0 contains the same information.
So I can use $0 to setup SCRIPT_FILENAME in the cgi-php-wrapper.
http://hoohoo.ncsa.uiuc.edu/cgi/env.html : a list of required
environment variables
More information about the busybox
mailing list