This message is further to my earlier post which suggested that the
SCRIPT_NAME environment is not being correctly set.

Unfortunately I do not have enough time to do a proper review of the source
code to see exactly what is going on so I have implemented the following
fix. I make no claims that this is the most elegant solution to the problem
nor that the problem might not be a configuration problem caused by me and
not a problem with the code itself.

In the source file cgi.c, in the function make_cgi_envp, we added a
declaration for "char *p" and then, immediately before the line
"ADD("SCRIPT_NAME", r->path);" we added the following code:


if ((p = strstr(r->path, r->path_args)) != NULL)
{
        if (p == r->path)
                *(p+1) = '\0';
        else
                *p = '\0';
}


This has fixed the problem for us.

If anyone else has any experience with the SCRIPT_NAME and PATH_INFO
environment variables being passed to cgi-bin programs run by mathopd 1.3pl7
then please feel free to comment on this issue.

g.

Reply via email to