故障:apache2.4 web服务器下,加载fastcgi 模块,始终无法加载 分析:1,查找文档过程中发现,apache 还有另外一个功能相近的模块,mod_fcgid,很多人说,fcgid要比fastcgi兼容性要好,因为mod_fastcgi是fastCGI.com的项目,遵循FastCGI授权条款。mod_fcgid是Apache基金会负责的项目,使用的是Apache-2.0授权条款。因此,不仅主要负责单位不同,其授权方式也不同
2,mod_fastcgi的授权不是标准的自由/开放源码授权条款,所以显得与其他授权条款格格不入,再加上Linux distribution套件管理政策的因素,使得mod_fastcgi难以全面进入所有Distribution官方库。网上会发现说mod_fastcgi几乎没有再继续开发了,因此也使得网路上许多人转而推荐mod_fcgid。其实这是最大的误解。官方说法是,FastCGI protocol 是一个轻量级且成熟的通讯协定,所以不太需要再额外加上新功能,而目前的工作主要在于瑕疵修复,也就几乎没有任何开发进展。
3,虽然mod_fastcgi与mod_fcgid都支援FastCGI protocol,但设计的概念不同。mod_fcgid的理念是快速的结束FastCGI server并再快速的产生一个。这个方法与FastCGI protocol初衷不同,FastCGI protocol是希望能够允许long-running request。以PHP 应用为例,为了加速PHP 效能,通常会使用bytecode/opcode cache,例如APC、eAccelerator 或Xcache 等。但为了共享cache,意谓着process/request 必须在同一个shared cache中,而无法跨不同的FastCGI or FCGI process。因此在设计上,只能允许一个PHP process启动,然后由此spawn多个children process,使得children 能够享用parent的bytecode/opcode。
4,mod_fcgid的官方描述是:
mod_fcgid is a high performance alternative to mod_cgi or mod_cgid, which starts a sufficient number instances of the CGI program to handle concurrent requests, and these programs remain running to handle further incoming requests. It is favored by the PHP developers, for example, as a preferred alternative to running mod_php in-process, delivering very similar performance. 5,所以用哪个模块都无所谓 处理过程:
1,根据配置正常在apache 配置文件里conf-enable里配置php5-fpm 但发现始终无法加载,