httpd-bugs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
Subject DO NOT REPLY [Bug 50814] SSI exec not working on Windows (Apache 2.x)
Date Wed, 02 Mar 2011 19:29:26 GMT

--- Comment #5 from RW Sagraves <> 2011-03-02 14:29:23 EST ---
Some updates about trying to use ssi exec after doing some more 
experimentation with this:

I still have not been able to use exec to invoke an .exe and see its output 
but have been able to use it to show some output from an invoked Windows batch 
file.  If Windows internal commands (ex: dir, ver, vol, date /t, time /t) are 
invoked within the batch file then their output will appear in the .shtml page. 
However, I have not been able to get the output of external commands
(ex: hostname.exe, netstat.exe, ipconfig.exe, etc.) that are invoked from the 
batch file to appear.  I have tried various .exe invocations from within the 
batch file to no avail (ex: 'hostname.exe', 'cmd /c hostname.exe', etc.).

Any thoughts on how to get the output of a .exe using the ssi exec?

Below is an example of the latest test files and output.  You can see that
hostname.exe produced no output either when invoked directly by exec or
when used within the batch file.  However, hostname.exe does produce output to
the console when the ssitest.cmd is invoked directly on the command-line.

<!--#set var="FOOBAR" value="SSI is working" -->
<!--#echo var="FOOBAR" -->
Here is output from exec of 'd:\temp\ssitest.cmd': &gt;&gt;<!--#exec
cmd="d:\temp\ssitest.cmd" -->&lt;&lt;
Here is output from exec of 'c:\windows\system32\hostname.exe':
&gt;&gt;<!--#exec cmd="c:\windows\system32\hostname.exe" -->&lt;&lt;

ssitest.cmd batch file (invoked by within index.shtml by exec):
@echo off
@echo "ssitest.cmd ran"
@echo on

Output seen in my browser (for http://localhost/index.shtml):
SSI is working 

Here is output from exec of 'd:/temp/ssitest.cmd': >>"ssitest.cmd ran"
 Volume in drive D is D_DRIVE
 Volume Serial Number is 14E9-D859

 Directory of D:\Apache_2217\htdocs

03/02/2011  01:50 PM              .
03/02/2011  01:50 PM              ..
06/22/2010  04:46 PM                20 cache2.html
11/20/2004  03:16 PM                44 index.html
03/02/2011  01:53 PM               363 index.shtml
03/02/2011  01:24 PM               575 index.shtml_sav
02/17/2011  10:49 AM               614 index.shtml_test1
02/21/2011  11:25 AM               323 index.shtml_use
               6 File(s)          1,939 bytes
               2 Dir(s)  420,219,654,144 bytes free

Here is output from exec of 'c:\windows\system32\hostname.exe': >><<

Configure bugmail:
------- You are receiving this mail because: -------
You are the assignee for the bug.

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message