FastCGI and CGI Library -> Build FastCGI and Apache

Jack <[email protected]>
Newsgroups gmane.comp.web.fastcgi.devel
Message-ID <[email protected]>
I managed to build fastcgi into Apache but had no luck
with making my app work. Same old problem: the library
fails to initialize. Not sure if some Linux experts can
shed some light on this. How come the app runs fine by
itself (from command line) but fails to initialize when
it's called by Apache? I was running it in the same folder
apache/fcgi-bin/.

Marc also suggested me to run it as external app with
a perl proc manager. However, I get lots of errors even
before the "exec(my_program)" line:

  server (pid 21448) started
  server (pid 21440) exited with status 0"

-- 
Best regards,
Jack

Sunday, April 24, 2005, 1:40:18 PM, you wrote:

MP> You should be able to make mod_fastcgi non-shared by configuring apache
MP> with this option:

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

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

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

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

MP> 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/
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.