# [PATCH]An Apache2 fastcgi module

- Thread: https://externals.io/message/10002
- Original archive: https://news-web.php.net/php.internals/10002
- Started by pqf@tebie.com on 2004-05-21T18:35:30+00:00
- Messages: 1
- Reply by email to internals@lists.php.net
- More for agents: search with https://externals.io/search.md?q={query} · JSON API at https://externals.io/api · documentation at https://externals.io/llms.txt

---

## #10002 — pqf@tebie.com — 2004-05-21T18:35:30+00:00

URL: https://externals.io/message/10002#10002

Hi, all
	I just finished an apache2 fastcgi module: mod_fcgid,  can this module be a part of PHP?
	You can find the goals for the implementation in http://fastcgi.coremail.cn/index.htm

	I have to highlight a different from mod_fastcgi: Every fastcgi process has unique UNIX domain socket path, so the following problem will not happen anymore(copy from README.Zeus):  "While we can run FastCGI's locally, there are known problems with some OS's (specifically, the communication between web server and FastCGI happens over a unix domain socket, and some OS's have trouble sustaining high connection rates over these sockets)", 

	Because fastcgi application is no more running in "-b port" mode while working with mod_fcgid, so I patch sapi/cgi/cgi_main.c,  check an enviroment variable "PHP_FCGI_NOFORK ",  if it is set, then the fork() is skipped.  I tested this patch with my module, it work fine. It's a very simple modification,  I just modified one line of the source code.

	You can download the apache module source code and documentation from the link i mention above. ( and a simple configuation demo to show how to make fastcgi-php application work with mod_fcgid)
 
	I would like to put this module into PHP project,  can I? And if I can, how to do it?

	Thank for any comment and advice.


Qingfeng Pan
