有个朋友的网站有大量的中文文件需要处理,而IE默认使用UTF-8模式,使得这部分文件无法被用户正常浏览。
因此打算用 mod_encoding来对此作一些处理。
本以为,参照此文档http://blog.51766.com/page/zsc?entry=1141808884223很容易就可以完成,但是却遇到类似的错误:
mod_encoding.c: In function `get_client_encoding':
mod_encoding.c:174: warning: assignment makes pointer from integer without a cast
mod_encoding.c:181: error: `regex_t' undeclared (first use in this function)
mod_encoding.c:181: error: (Each undeclared identifier is reported only once
mod_encoding.c:181: error: for each function it appears in.)
mod_encoding.c:181: error: syntax error before ')' token
mod_encoding.c: At top level:
mod_encoding.c:187: error: syntax error before "return"
mod_encoding.c: In function `set_server_encoding':
mod_encoding.c:213: warning: assignment makes pointer from integer without a cast
mod_encoding.c: In function `add_client_encoding':
......
搞了好久,查遍资料,也不得要领。
最后好不容易google到这篇文章:
http://www.mail-archive.com/debian-bugs-dist@lists.debian.org/msg20921.html
原来就是一个regex.h的问题。
另外,mod_encoding需要 mod_headers的支持,如果自己编译apache,别忘了把mod_headers选上。
因此打算用 mod_encoding来对此作一些处理。
本以为,参照此文档http://blog.51766.com/page/zsc?entry=1141808884223很容易就可以完成,但是却遇到类似的错误:
mod_encoding.c: In function `get_client_encoding':
mod_encoding.c:174: warning: assignment makes pointer from integer without a cast
mod_encoding.c:181: error: `regex_t' undeclared (first use in this function)
mod_encoding.c:181: error: (Each undeclared identifier is reported only once
mod_encoding.c:181: error: for each function it appears in.)
mod_encoding.c:181: error: syntax error before ')' token
mod_encoding.c: At top level:
mod_encoding.c:187: error: syntax error before "return"
mod_encoding.c: In function `set_server_encoding':
mod_encoding.c:213: warning: assignment makes pointer from integer without a cast
mod_encoding.c: In function `add_client_encoding':
......
搞了好久,查遍资料,也不得要领。
最后好不容易google到这篇文章:
http://www.mail-archive.com/debian-bugs-dist@lists.debian.org/msg20921.html
原来就是一个regex.h的问题。
另外,mod_encoding需要 mod_headers的支持,如果自己编译apache,别忘了把mod_headers选上。
Trackback: http://tb.donews.net/TrackBack.aspx?PostId=1121864