Re: FastCGI and CGI Library -> Build FastCGI and Apache

Marc Prewitt <[email protected]>
Newsgroups gmane.comp.web.fastcgi.devel
Message-ID <[email protected]>
You should be able to make mod_fastcgi non-shared by configuring apache 
with this option:

  --disable-shared=NAME  disable build of Module named 'NAME' as a DSO

However, you could also run your app as an external fastcgi process and 
include a small process manager in your app.

There is a perl FCGI::ProcManager that you could use pretty easily like 
this:

use FCGI::ProcManager;
my $proc_manager = FCGI::ProcManager->new({ n_processes => 10 });
$proc_manager->pm_manage();
exec ('your fcgi app');

Jack wrote:
> One thing to correct: as Bryan pointed out, the process
> manager is a separate process. My guess is that because
> fcgi uses pipe when the fcgi apps are running locally,
> the processes (process manager and apps) are running as
> children of the apache process and started by mod_fastcgi.so
> I get very nervous when I hear .so and would suspect the
> library wouldn't work. And it didn't :( So, building
> mod_fastcgi into Apache to get rid of any .so in the chain
> is my last resort ...
> 
> Sunday, April 24, 2005, 12:16:02 AM, you wrote:
> 
> J> Hello Bryan,
> 
> J> Thanks for the reply. No, I am not trying to build my app into
> J> Apache. I'm trying to build mod_fastcgi into Apache. The reason
> J> is that I'm using this strange library (.a) in my fcgi app and
> J> I don't have source code for it. This library seem to hate .so.
> J> If it's linked to a stand-alone single threaded app, it works
> J> just fine. If it's linked to a .so file, it'll fail to initialize.
> J> It seems to fail too if it's in the process space of a .so.
> J> In my case, the process manager and the application seem to
> J> be in the same process as mod_fastcgi.so and this could be
> J> the problem. So, I'm trying to build mod_fastcgi into Apache
> J> to remove the .so from the picture.
> 
> J> My application still outputs to the web - that's how I know
> J> there was a problem: the output includes error return code
> J> of the initialization function of the library.
> J> However, nothing is put in the error log of Apache.
> 
> 
> 
> 
> ------------------------------------------------------------------------
> 
> ___________________________________
> fastcgi-developers mailing list
> http://fastcgi.com/fastcgi-developers/
___________________________________
fastcgi-developers mailing list
http://fastcgi.com/fastcgi-developers/
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.