You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by bu...@apache.org on 2008/06/19 13:04:44 UTC

DO NOT REPLY [Bug 45235] New: environment PATH is not forwarded to CGI executable or SystemRoot not interpreted

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


DO NOT REPLY [Bug 45235] environment PATH is not forwarded to CGI executable or SystemRoot not interpreted

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=45235


Mark Thomas <ma...@apache.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|                            |WORKSFORME




--- Comment #1 from Mark Thomas <ma...@apache.org>  2008-10-01 09:52:22 PST ---
This works for me on the latest 5.5.x. If you still see this problem please
provide the exact steps to reproduce the error you see from a clean Tomcat
install.


-- 
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