Re[2]: FastCGI and CGI Library -> Build FastCGI and Apache
Jack <[email protected]>
| Newsgroups | gmane.comp.web.fastcgi.devel |
|---|---|
| Message-ID | <[email protected]> |
Hello Bryan, Thanks for the reply. No, I am not trying to build my app into Apache. I'm trying to build mod_fastcgi into Apache. The reason is that I'm using this strange library (.a) in my fcgi app and I don't have source code for it. This library seem to hate .so. If it's linked to a stand-alone single threaded app, it works just fine. If it's linked to a .so file, it'll fail to initialize. It seems to fail too if it's in the process space of a .so. In my case, the process manager and the application seem to be in the same process as mod_fastcgi.so and this could be the problem. So, I'm trying to build mod_fastcgi into Apache to remove the .so from the picture. My application still outputs to the web - that's how I know there was a problem: the output includes error return code of the initialization function of the library. However, nothing is put in the error log of Apache. -- Best regards, Jack Saturday, April 23, 2005, 8:59:27 AM, you wrote: BW> Jack wrote: >> Here comes my question 2: >> I have an application that uses a problematic library which has >> problems with .so (on Apache2, Linux) It can not be linked to .so >> projects. Its initialization always fails. It seems that I'm getting >> the same problem when running it from fcgi app. The app runs ok from >> command line. But if it's started by mod_fastcgi, it'll fail to >> initialize. So, I'm thinking of building mod_fastcgi into Apache >> source, just to avoid calling my app from a shared object mod_fastcgi. >> However, I'm not sure if anyone has managed to do that, as mod_fastcgi >> is typically used as a .so file. I'm not quite familiar with building >> apache2 modules into apache, nor with mod_fastcgi. I searched the net >> in the past few days and didn't find much useful info. So if anyone >> has experience with this, I'd be happy to know. Instructions would >> be even better. BW> I don't think you correctly understand how mod_fastcgi works. It sounds BW> like you are trying to link you application to apache. Your fastcgi BW> application is not part of the mod_fastcgi process. Instead the BW> mod_fastcgi handler creates a process manager process. The process BW> manager shows up as another httpd process. It takes care of running BW> fastcgi applications, each as their own process. Your cgi will listen BW> for socket connections. BW> Here is what my process tree currently looks like: BW> httpd-+-httpd-+-adredirect BW> | +-2*[news] BW> +-179*[httpd] BW> adredirect and news are both fastcgi applications. They run as children BW> of the process manager. There are curently two copies of news running BW> and 179 standard web server processes. BW> Statically linking mod_fastcgi into the httpd process would not change BW> the structure of this process tree. BW> I don't know why your application is failing when called from the BW> process manager. What does the apache error log say? ___________________________________ fastcgi-developers mailing list http://fastcgi.com/fastcgi-developers/