problems using #exec on Win32

problems using #exec on Win32

am 01.11.2006 20:38:43 von Ralph Nelson

I'm using the Win32 port (not my fault -- blame my employer) of Apache v2.2.3

I've added the lines:
AddType text/html .shtml
AddType text/html .stm
AddHandler server-parsed .shtml
AddHandler server-parsed .stm
to my httpd.conf as well as adding
Options +Includes +ExecCGI

All of my SSI tags expand *except* the #exec tag. Whenever I try to run an
#exec tag (two shown below - the first just tries "dir" and the other a long
convoluted command), I get:

[Tue Oct 31 17:20:40 2006] [error] [client x.x.x.x] (OS 2)The system cannot find
the file specified. : Failed to open cgi file dir for testing
[Tue Oct 31 17:20:40 2006] [error] [client x.x.x.x] (OS 2)The system cannot find
the file specified. : don't know how to spawn cmd child process:
D:/www/CM/UpdatePDGWeb.stm
[Tue Oct 31 17:20:40 2006] [error] [client x.x.x.x] execution failure for
parameter "cmd" to tag exec in file D:/www/CM/NotWorking.stm

[Tue Oct 31 17:20:40 2006] [error] [client x.x.x.x] (OS 2)The system cannot find
the file specified. : Failed to open cgi file C:/Program
Files/Path/To/binary/binary.exe -options for testing
[Tue Oct 31 17:20:40 2006] [error] [client x.x.x.x] (OS 2)The system cannot find
the file specified. : don't know how to spawn cmd child process:
D:/www/CM/NotWorking.stm
[Tue Oct 31 17:20:40 2006] [error] [client x.x.x.x] execution failure for
parameter "cmd" to tag exec in file D:/www/CM/NotWorking.stm

------------------------------------------------------------ ---------
The official User-To-User support forum of the Apache HTTP Server Project.
See for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
" from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org

Re: problems using #exec on Win32

am 01.11.2006 20:44:33 von Joshua Slive

On 11/1/06, Ralph Nelson wrote:
> I'm using the Win32 port (not my fault -- blame my employer) of Apache v2.2.3
>
> I've added the lines:
> AddType text/html .shtml
> AddType text/html .stm
> AddHandler server-parsed .shtml
> AddHandler server-parsed .stm
> to my httpd.conf as well as adding
> Options +Includes +ExecCGI
>
> All of my SSI tags expand *except* the #exec tag. Whenever I try to run an
> #exec tag (two shown below - the first just tries "dir" and the other a long
> convoluted command), I get:

There may be a bug here. But exec has always been a dirty hack.
Convert your executable into a CGI script and use include virtual
instead.

Joshua.

------------------------------------------------------------ ---------
The official User-To-User support forum of the Apache HTTP Server Project.
See for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
" from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org

Re: problems using #exec on Win32

am 01.11.2006 21:38:16 von sasquatch

> ----- Message from joshua@slive.ca ---------
> There may be a bug here. But exec has always been a dirty hack.
> Convert your executable into a CGI script and use include virtual
> instead.

Okay... I managed to hack togehter a perl script that runs the EXE that I want
run. The only issue *now* is that the application needs to run as one of a very
limited set of users. I've tried the "runas" windows tool but that always
prompts me for a password.

Suggestions?

p.s. Yes, I'll post my summary with all fixes & such as soon as I've got a
working solution.


--
Sas
--
Please help support breast cancer research by pledging
-=* New donation link for 2007 --> http://awbc.lhhf.org/ *=-
-=* Walking in memory of two amazing women who lost their fight *=-
-=* And in support of all of those those who are still fighting *=-



------------------------------------------------------------ ---------
The official User-To-User support forum of the Apache HTTP Server Project.
See for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
" from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org