httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From David Weaver <dwea...@stanfordalumni.org>
Subject [users@httpd] CGI problem
Date Sat, 14 Feb 2004 09:07:50 GMT
Hello. I'm using Apache as a front-end host for a new CGI language I'm
writing. To make a long story short, I don't like having to put the "shebang"
line at the top of every script (since it makes my scripts very un-portable to
other servers), so I want Apache to automatically send my scripts to my
interpreter executable based on their file extension.

Simple, yes. This is basic behavior discussed in many, many places, but I
cannot get it to work. My understanding is that I need two lines in my .conf
file in order to get this to happen:

# (my language is called "Marathon")
AddHandler marathon .mth
Action marathon D:/webroot/marathon/marathon.exe

When I run an MTH script, I get the now-familiar error message in my log file,
"(9)Bad file descriptor: don't know how to spawn child process" on my script
file. It also reminds me to put a shebang line in my scripts. I don't want to
use the shebang line; that's the whole point.

To pre-emptively answer some probable questions about things I've tried:
- I've tried everything with both forward and backward slashes.
- The executable's permissions give everyone full control of it; likewise with
the script, the Python interpreter (which my script uses), and every other
related file I could think of.
- I've tried specifying a relative path in the "Action" directive (i.e.,
"/marathon/marathon.exe").
- I've tried naming the handler "cgi-script", since that's one of the official
built-in handler names.
- I did remember to restart Apache.
- my executable is actually in the location I specified.
- if I execute the interpreter manually through the command line, it 
does work properly (including printing the right HTTP headers).

None of these things worked. I tried using "ScriptInterpreterSource registry"
as a workaround, then making the proper association in the registry, but this
didn't work either for some reason.

Any help? I'm running out of ideas here.

Dave


____________________________________________________________________
   


---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> 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


Mime
View raw message