我在将应用程序从 Resin 4.0.6 迁移到 4.0.38 时遇到问题
我得到的错误是 /Users/.../general_urls.php:9: Fatal Error: 'get_servlet_context_path' is an unknown function。其中 get_servlet_context_path 是扩展 AbstractQuercusModule 的 servlet 中的一个函数。有趣的是,这似乎与 utf 编码有关。在resin-web.xml 我有:
<web-app xmlns="http://caucho.com/ns/resin">
<servlet-mapping url-pattern="*.php"
servlet-class="com.caucho.quercus.servlet.QuercusServlet">
<init>
<script-encoding>UTF-8</script-encoding>
<php-ini>
<unicode.semantics>on</unicode.semantics>
<unicode.runtime_encoding>UTF-8</unicode.runtime_encoding>
</php-ini>
</init>
</servlet-mapping>
</web-app>
删除 unicode.semantics 标记使应用程序工作,但非标准字符看起来很糟糕。
版本信息
Resin-4.0.38 (built Tue, 17 Dec 2013 09:48:45 PST)
[14-03-18 10:22:40.776] {main} Mac OS X 10.9.2 x86_64
[14-03-18 10:22:40.776] {main} Java(TM) SE Runtime Environment 1.7.0_45-b18, UTF-8, en
[14-03-18 10:22:40.776] {main} Java HotSpot(TM) 64-Bit Server VM 24.45-b08, 64, mixed mode, Oracle Corporation
有什么建议么?
更新:使用树脂 4.0.33 似乎可以正常工作