Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

CGI error...forcing child termintion

Status
Not open for further replies.

Guest_imported

New member
Jan 1, 1970
0
Hi,

Have just installed Perl so that I can use CGI scripts on my Apache server. Before i had:

" couldn't spawn child process" error

so I changed the path at the beggining of my Perl script to point to Perl.exe on my machine and now I get the error:

"[error] forcing termination of child #0 (handle 76)"

As you have probably guessed i am a bit of layman...can anyone help me out?

RC
 
Hi,

What do you have in httpd.conf for the following directives :

MaxRequestsPerChild
ThreadsPerChild

If they are not explicitly shown in httpd.conf then they will defaults to 0 and 50 respectively. For win32, it is recommended that you keep MaxRequestPerChild at zero (means no limit) but you can increase the default of 50 if you get a lot of simultaneous hits.

There were some bugs in this area in earlier 1.3.x releases so you might want to try upgrading to 1.3.23 (latest) .

Presumably you have the following in httpd.conf :

AddHandler cgi-script .cgi .pl

... and the directory container defined for the directory that the scripts are in has the directive 'options ExecCGI' or 'options +ExecCGI' - i.e. something like this :

<Directory &quot;/var/ AllowOverride None
Options ExecCGI
Order allow,deny
Allow from all
</Directory>


Hope this helps
 
Thanks for your advice but I still have had no joy. The

MaxRequestsPerChild
ThreadsPerChild

declarations are still set to default (ie 0 and 50).

I am already running Apache 1.3.23 and I did check the other things you suggested in the httpd.conf but still....nothing.

I can run the .pl script on it's own and it updates the HTML page that it should so I guess no problems with the active Perl install.

Apache seems to be finding the script in the CGI bin but I do notice a change after it has tried to execute it. I can no longer shut the server down using CTRL^C and have to use windows program manager to end the program (I can however still access all the HTML files no probs). This also causes a 'sharing violation' error with the log files and I have to re-start windows before I can view the 'Error Log'

I have tried re-installing Apache but I have the same problem.

Can you give me any advice? Does any of this make any sense?

Lost in space...Richibald
 
Hi,

Hmmm ... does a simple perl script work at all? For example the 'printenv.pl' script shipped with apache that prints out all the apache environment variable values. A good basic test of perl cgi is whether you can run
Does it work ??

Regards
 
Yes that seems to work!

When I run it, a PERL window flashes up briefly but I don't actually see the output. Where would this be?

Anyway, presuming this is working correctly (the server continues to be 'normal') should I suspect the PERL script I am trying to run for the guest book?

Mega thanks for your help!

Richibald
 
It works!!!!!

The PERL script had some code that pointed to a non-existing 'date' file in the \user\bin directory to resolve the date of the guestbook entry so I just took it out.

My tutor used to say if it works first time you don't realy learn anything so I guess I've learnt lots here!

Thanks again for all your help ifincham. Tek-Tips really is an invaluable resource.

Richibald
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top