Online Shopping : Computers : Internet : Web Servers : Apache

+ Search
Add Entry AlertManage Folder Edit Entry Add page to
Did You Find This Entry Useful?

33 of 173 people (19%) answered Yes
Recently 1 of 10 people (10%) answered Yes


Why don't my cgi's work? I get an error called "Couldn't spawn child process"

Jan 9th, 2002 13:30
Kagan (Kai) MacTane, Dirk Schäfauer,

I can't be sure without being able to test on your machine, but here are
a few possibilities that occur to me:
First, your machine may simply be overloaded, with too many open
processes. This would fill up the process table, and keep Apache from
spawning your CGI script as a child process.
More likely, however, there is a permissions problem at work here.
Either Apache is being denied the ability to spawn child processes at
all, or it's being denied the ability to spawn *certain* child
processes, or your CGI script needs to spawn a child of its own, and is
being denied the ability to do that. 
Does your CGI script use the fork() system call at all? If so, I'd
suspect that as the culprit. What about shell escapes (like the backtick
in Perl)? Some highly-secure installations deny these features, to
enhance security.
Finally, is your script setuid? Most Apache installations will not allow
you to run setuid CGI scripts, especially not setuid root, because they
are often a severe security risk.