Bug 50606

Summary: Error running CGI executable in Tomcat 6.0.30
Product: Tomcat 6 Reporter: basil <basilk>
Component: CatalinaAssignee: Tomcat Developers Mailing List <dev>
Status: RESOLVED FIXED    
Severity: normal    
Priority: P2    
Version: 6.0.30   
Target Milestone: default   
Hardware: PC   
OS: Windows XP   
Attachments: localhost.2011-01-18.log

Description basil 2011-01-18 02:26:41 UTC
Created attachment 26502 [details]
localhost.2011-01-18.log

I have web application hosting CGI executable with the following settings for CGI
    <servlet>
        <servlet-name>cgi</servlet-name>
        <servlet-class>org.apache.catalina.servlets.CGIServlet</servlet-class>
        <init-param>
          <param-name>debug</param-name>
          <param-value>2</param-value>
        </init-param>
        <init-param>
          <param-name>cgiPathPrefix</param-name>
          <param-value>WEB-INF/cgi</param-value>
        </init-param>
        <init-param>
          <param-name>executable</param-name>
          <param-value></param-value>
        </init-param>        
        <init-param>
          <param-name>passShellEnvironment</param-name>
          <param-value>true</param-value>
        </init-param>       
    </servlet>

This was Ok in Tomcat 6.0.29 but not in 6.0.30, see attachment.
Comment 1 Konstantin Kolinko 2011-01-18 04:52:18 UTC
You have
        <init-param>
          <param-name>executable</param-name>
          <param-value></param-value>
        </init-param>        

i.e. you are setting executable="". The logs say that the attempt to execute "" failed.

The change between 6.0.29 and 6.0.30 in CGIServlet is 
http://svn.apache.org/viewvc?view=revision&revision=1004424

In 6.0.29 the command to be executed was built as a single string, concatenating the components. In 6.0.30 all the components are passes in as an array.

Are you sure that the empty string is a valid value for the "executable"? I do not think that that is a valid value. Thus I am closing this issue as INVALID.


If you need further assistance, please ask on the users@ list.
Comment 2 Konstantin Kolinko 2011-01-20 12:48:02 UTC
Discussed on dev@
Fixed in trunk in r1061412 and will be in 7.0.7.
Proposed for 6.0.x
Comment 3 Mark Thomas 2011-01-20 16:44:44 UTC
Fixed in 6.0.x and will be included in 6.0.31 onwards.