tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bugzi...@apache.org
Subject DO NOT REPLY [Bug 45235] New: environment PATH is not forwarded to CGI executable or SystemRoot not interpreted
Date Thu, 19 Jun 2008 11:04:44 GMT
https://issues.apache.org/bugzilla/show_bug.cgi?id=45235

           Summary: environment PATH is not forwarded to CGI executable or
                    SystemRoot not interpreted
           Product: Tomcat 5
           Version: Unknown
          Platform: PC
        OS/Version: Windows XP
            Status: NEW
          Severity: major
          Priority: P2
         Component: Catalina
        AssignedTo: tomcat-dev@jakarta.apache.org
        ReportedBy: regis.martin@americas.bnpparibas.com


Windows environment:
Seems that environment PATH is not provided/forwarded to perl when called.
Or that %SystemRoot% variables are not interpreted

System Variables:
PATH=C:\perl\bin;C:\Windows\System32;C:\Windows
JAVA_HOME=C:\Program Files\Java\jdk1.6.0_06
CATALINA_HOME=E:\tomcat-5.5.9
SystemRoot=C:\Windows

Conf:
    <servlet>
        <servlet-name>cgi</servlet-name>
        <servlet-class>org.apache.catalina.servlets.CGIServlet</servlet-class>
        <init-param>
          <param-name>debug</param-name>
          <param-value>1</param-value>
        </init-param>
        <init-param>
          <param-name>executable</param-name>
          <param-value>C:/Perl/bin/perl.exe</param-value>
        </init-param>
        <init-param>
          <param-name>cgiPathPrefix</param-name>
          <param-value>WEB-INF/cgi</param-value>
        </init-param>
        <init-param>
          <param-name>passShellEnvironment</param-name>
          <param-value>true</param-value>
        </init-param>
        <load-on-startup>5</load-on-startup>
    </servlet>

Calling a simple cgi script such as bellow shows that PATH is not setup
#!C:/Perl/bin/perl.exe
use CGI qw(:standard);
use CGI::Carp qw(warningsToBrowser fatalsToBrowser);
use Data::Dumper ; 
use Net::LDAP;
my $IN = new CGI;
print "Content-type:text/html\n\n";
print <<EndOfHTML;
<html><head><title>Print Environment</title></head>
<body>
EndOfHTML
print "Path:" . $ENV{'PATH'} . "<BR>";


Tracing systems calls shows:
perl searcing for dlls or protocol in:
C:\Perl\bin\%SystemRoot%\System32
Then in C:\Windows\System32\%SystemRoor%

During Java installation the ENV PATH was setup with a foward slash 
C:\Perl\Bin\;C:\windows\System32


-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org


Mime
View raw message