You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Patrick Lee <pa...@horologe.com.au> on 2007/02/09 06:17:09 UTC

CGI environment variables

Hi,

I have an issue with CGI scripts (Perl based) running under Tomcat on
Windows 2000 getting URL's wrong by using backslashes instead of forward
slashes.

Notes:

1. I've setup CGI support as detailed in the how-to for Tomcat 5.5
2. I either have to set passShellEnvironment to true or set the systemroot
env var at the top of any Perl scripts in order to be able to open a
TCP/IPsocket. Otherwise I get a Can't create TCP/IP socket (10106) error.
3. As such, I have passShellEnvironment to true.
4. If I list the environment variables in Perl - for SCRIPT_NAME I get a
leading forward slash whilst the remaining are backslashes. for example:
SCRIPT_NAME => /cgi\path\to\script.cgi
5. Running Perl scripts on the server inserts backslashes for url's after
/cgi which results in many problems.

Maybe I'm missing something obvious but I've looked "everywhere" for some
info on this and come up empty handed.

Does anyone know how to fix this?

Re: CGI environment variables

Posted by Mark Thomas <ma...@apache.org>.
Patrick Lee wrote:
> Hi,
> 
> I have an issue with CGI scripts (Perl based) running under Tomcat on
> Windows 2000 getting URL's wrong by using backslashes instead of forward
> slashes.
> 
> Does anyone know how to fix this?

It is a bug. I have fixed it in svn and it will be in the next 5.5.x
and 6.0.x releases.

Mark

---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org