惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

T
The Blog of Author Tim Ferriss
Know Your Adversary
Know Your Adversary
P
Palo Alto Networks Blog
D
Darknet – Hacking Tools, Hacker News & Cyber Security
K
Kaspersky official blog
L
LINUX DO - 热门话题
P
Proofpoint News Feed
P
Privacy & Cybersecurity Law Blog
Google DeepMind News
Google DeepMind News
Attack and Defense Labs
Attack and Defense Labs
Cisco Talos Blog
Cisco Talos Blog
AI
AI
L
LINUX DO - 最新话题
H
Heimdal Security Blog
Hacker News: Ask HN
Hacker News: Ask HN
Webroot Blog
Webroot Blog
Threat Intelligence Blog | Flashpoint
Threat Intelligence Blog | Flashpoint
The GitHub Blog
The GitHub Blog
I
Intezer
Blog — PlanetScale
Blog — PlanetScale
有赞技术团队
有赞技术团队
S
Securelist
博客园_首页
IT之家
IT之家
Schneier on Security
Schneier on Security
博客园 - 叶小钗
罗磊的独立博客
WordPress大学
WordPress大学
cs.CL updates on arXiv.org
cs.CL updates on arXiv.org
MongoDB | Blog
MongoDB | Blog
P
Proofpoint News Feed
阮一峰的网络日志
阮一峰的网络日志
A
Arctic Wolf
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
Exploit-DB.com RSS Feed
Exploit-DB.com RSS Feed
W
WeLiveSecurity
The Register - Security
The Register - Security
D
DataBreaches.Net
S
Security @ Cisco Blogs
Security Archives - TechRepublic
Security Archives - TechRepublic
让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com
腾讯CDC
Recorded Future
Recorded Future
NISL@THU
NISL@THU
N
News and Events Feed by Topic
T
Tailwind CSS Blog
N
News and Events Feed by Topic
Cyberwarzone
Cyberwarzone
T
Tor Project blog
www.infosecurity-magazine.com
www.infosecurity-magazine.com

博客园 - 难得一蠢

去掉恼人的XHTML验证.. 完整linux下配置RMagick步骤 解决RMagick.so cannot open shared object问题 如何让apache支持.shtml 让apache支持include标签 [收藏]上班族的真实写照 使用GDI+绘制高质量图和字体(2) 双截棍 C语言版 (超搞笑) [转]C++0x展望[语言核心进化] 小蠢笔记:从继承特性来看构造函数 游子的心-祝福母亲 为了车票而奔波着..... 使用GDI+绘制高质量图和字体 MSN8.0测试邀请发放 李连杰年度巨作<霍元甲>主题曲:周杰伦唱 小问题: windows组件调用失败,无法加载安装安装程序:Wbemupgd.dll 管理者,请还程序员一片净土!! Java剑 VS .NET刀 -- 东山再起(论模式)(二)【推荐】 测测你的智商--我是92,属于弱智,唉 Java剑 VS .NET刀 -- 晨袭血战(论模式)(一)【推荐】 UML利器--Rational Rose Enterprise Edition 2003 安装破解步骤
安装FastCgi错误( In function `init_module': ) 解决办法
难得一蠢 · 2007-09-13 · via 博客园 - 难得一蠢

啥也不多说,直接帖错误代码如下:

mod_fastcgi.c: In function `init_module':
mod_fastcgi.c:271: `ap_null_cleanup' undeclared (first use in this function)
mod_fastcgi.c:271: (Each undeclared identifier is reported only once
mod_fastcgi.c:271: for each function it appears in.)
mod_fastcgi.c: In function `process_headers':
mod_fastcgi.c:726: warning: return makes pointer from integer without a cast
mod_fastcgi.c:730: warning: assignment makes pointer from integer without a cast
mod_fastcgi.c:740: warning: assignment makes pointer from integer without a cast
mod_fastcgi.c:769: warning: initialization makes pointer from integer without a cast
mod_fastcgi.c:839: warning: return makes pointer from integer without a cast
mod_fastcgi.c:843: warning: return makes pointer from integer without a cast
mod_fastcgi.c: In function `set_uid_n_gid':

在网上搜索到一篇帖子的解决办法是:建立一个patch文件,但是按照他的源码帖进去后,还是不行.他的代码如下:

@@ -73,6 +73,36 @@
#define ap_reset_timeout(a)
#define ap_unblock_alarms()

+/* starting with apache 2.2 the backward-compatibility defines for
+ * 1.3 APIs are not available anymore. Define them ourselves here.
+ */
+#ifndef ap_copy_table
+
+#define ap_copy_table apr_table_copy
+#define ap_cpystrn apr_cpystrn
@@ -73,6 +73,36 @@
#define ap_reset_timeout(a)
#define ap_unblock_alarms()

+/* starting with apache 2.2 the backward-compatibility defines for
+ * 1.3 APIs are not available anymore. Define them ourselves here.
+ */
+#ifndef ap_copy_table
+
+#define ap_copy_table apr_table_copy
+#define ap_cpystrn apr_cpystrn
+#define ap_destroy_pool apr_pool_destroy
+#define ap_isspace apr_isspace
+#define ap_make_array apr_array_make
+#define ap_make_table apr_table_make
+#define ap_null_cleanup apr_pool_cleanup_null
+#define ap_palloc apr_palloc
+#define ap_pcalloc apr_pcalloc
+#define ap_psprintf apr_psprintf
+#define ap_pstrcat apr_pstrcat
+#define ap_pstrdup apr_pstrdup
+#define ap_pstrndup apr_pstrndup
+#define ap_push_array apr_array_push
+#define ap_register_cleanup apr_pool_cleanup_register
+#define ap_snprintf apr_snprintf
+#define ap_table_add apr_table_add
+#define ap_table_do apr_table_do

可能是代码没帖全,或者是我的服务器配置有问题..所以错误依旧..于是又找到了正文:按照正文的源码,问题解决:
完整的配置步骤如下:
1. 我的Apache用的是2.2.4版本,安装参考Readme文件,遵循如下步骤:

$ cd
$ cp Makefile.AP2 Makefile            //制作Makefile文件

然后请参考下面的代码
$ vi a                                            //建立patch文件,具体代码在下面..
$ patch -fcgi.h < a                         //写入fcgi.h 文件
  File to patch: fcgi.h                    //操作结果
  patching file fcgi.h

----------------------------------- 确定以上步骤完全OK后,再继续下面的操作
$ make                                         //在这里修改的时候,要注意你的默认目录
$ make install

//install之后,会出现这个提示,说是找不到目录规则,不过不要紧.继续

make[1]: Entering directory `/opt/mod_fastcgi-2.4.2'
/opt/httpd-2.2.0/srclib/apr/libtool --silent --mode=install cp mod_fastcgi.la /opt/apache/modules/
make[1]: Leaving directory `/opt/mod_fastcgi-2.4.2'

If your Apache2 installation isn't in /usr/local/apache2, then
set the top_dir variable when running make (or edit the
Makefile), e.g. ( 这里是说,如果你的apache目录不在 /usr/local/apache2 这个地方,请手工更改文件Makefile的目录指向, )

$ make top_dir=/usr/local/httpd

 //打开httpd.conf文件,配置如下

Add an entry to httpd.conf like this:

LoadModule fastcgi_module modules/mod_fastcgi.so

@@ -73,6 +73,36 @@
 #define ap_reset_timeout(a)
 #define ap_unblock_alarms()
 
+/* starting with apache 2.2 the backward-compatibility defines for
+ * 1.3 APIs are not available anymore. Define them ourselves here.
+ */
+#ifndef ap_copy_table
+
+#define ap_copy_table apr_table_copy
+#define ap_cpystrn apr_cpystrn
+#define ap_destroy_pool apr_pool_destroy
+#define ap_isspace apr_isspace
+#define ap_make_array apr_array_make
+#define ap_make_table apr_table_make
+#define ap_null_cleanup apr_pool_cleanup_null 
+#define ap_palloc apr_palloc
+#define ap_pcalloc apr_pcalloc
+#define ap_psprintf apr_psprintf
+#define ap_pstrcat apr_pstrcat
+#define ap_pstrdup apr_pstrdup
+#define ap_pstrndup apr_pstrndup
+#define ap_push_array apr_array_push
+#define ap_register_cleanup apr_pool_cleanup_register
+#define ap_snprintf apr_snprintf
+#define ap_table_add apr_table_add
+#define ap_table_do apr_table_do
+#define ap_table_get apr_table_get
+#define ap_table_set apr_table_set
+#define ap_table_setn apr_table_setn
+#define ap_table_unset apr_table_unset
+
+#endif /* defined(ap_copy_table) */
+
 #if (defined(HAVE_WRITEV) && !HAVE_WRITEV && !defined(NO_WRITEV)) || defined WIN32
 #define NO_WRITEV
 #endif
diff -ruN mod_fastcgi-2.4.2/Makefile.AP2 mod_fastcgi-2.4.2-ap22/Makefile.AP2
--- mod_fastcgi-2.4.2/Makefile.AP2    2002-07-29 03:36:34.000000000 +0200
+++ mod_fastcgi-2.4.2-ap22/Makefile.AP2    2005-12-07 20:27:50.000000000 +0100
@@ -20,8 +20,6 @@

绿色的是两个不一样的地方..