Andrej van der Zee wrote: > Does anybody know if the hook functions of such modules usually > spawning a new thread/process? My guess is that at least for compiled > CGI application written in C/C++ a new process is forked in the hook > function. >
This is just off the top of my head, so I have no solid proof for this, and please correct me if I'm wrong. I would think that the reason for having an Apache module for PHP/Perl would be to avoid the overhead of initialising the interpreter for every page - it initialises itself once at Apache start, and then resets its state for each request. Or so I would hope. Using a module also gives them access to some Apache internals that CGI applications can't reach. CGI applications (including mod_suphp and PHP/Perl run as CGI scripts) would be forked. Dave