It sounds simple enough, but I'm having a hell of a time getting it to work.
Apache expects the first line of my script to say
And I don't want to use perl or anything else, I want to use
But no go.
When I run the rest of the cmd file from the cmd prompt, it works as expected.
I even have a test cgi that does this:
@echo off echo Content-Type: text/html echo. echo ^<html^>^<head^>^</head^>^<body^>hi from stu the cgi ^</body^>^</html^>
and that works.
But when I change the script to run another exe (whose output would be the cgi response) I get all sorts of premature end of script headers.
I'm guessing that it has something to do with the output of the exe not piping back through the shell's output.
Any idea how to make this go?