Bug 50606 - Error running CGI executable in Tomcat 6.0.30
Summary: Error running CGI executable in Tomcat 6.0.30
Status: RESOLVED FIXED
Alias: None
Product: Tomcat 6
Classification: Unclassified
Component: Catalina (show other bugs)
Version: 6.0.30
Hardware: PC Windows XP
: P2 normal (vote)
Target Milestone: default
Assignee: Tomcat Developers Mailing List
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-01-18 02:26 UTC by basil
Modified: 2011-01-20 16:44 UTC (History)
0 users



Attachments
localhost.2011-01-18.log (6.84 KB, text/plain)
2011-01-18 02:26 UTC, basil
Details

Note You need to log in before you can comment on or make changes to this bug.
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.