solr-php-client、CakePHP 和 Tomcat 出现 Solr 500 错误
我正在尝试将 CakePHP 应用程序从 WAMP(开发机器)移植到 LAMP(生产服务器)。在 WAMP 实例中提交搜索有效。在 LAMP 环境中,搜索返回 HTTP 500 错误。 Tomcat6 可以工作,:8080/solr/admin 页面也可以。 CakePHP Web 应用程序的工作方式不同于搜索。
生产环境: - 乌班图10.04 - 阿帕奇 2.2.14 - 汤姆猫6 - 索尔3.4.0 - CakePHP 1.3(带有 solr-php-client) - MySql 5.1.41
观察:对于相同的搜索,两个环境之间的查询字符串略有不同。 LAMP 版本似乎被截断了,但我不知道该值是如何得出的,所以我无法确定差异是否显着。
LAMP(500 错误): fields=9546e7be6d1d17fbd2e82f0d49a296b91853ddf0%253A
WAMP(结果): fields=9546e7be6d1d17fbd2e82f0d49a296b91853ddf0%253An%253A0%253A%257B%257D
是否有日志可以帮助解决 500 错误?是否有可以直接通过 solr/admin 运行的测试来阐明这个问题?
I'm trying to port a CakePHP application from WAMP (development machine) to LAMP (production server). In the WAMP instance submitting a search works. In the LAMP environment, search returns HTTP 500 error. Tomcat6 works and so does the :8080/solr/admin page. The CakePHP webapp works other than search.
Production Environment:
- Ubuntu 10.04
- Apache 2.2.14
- Tomcat6
- Solr 3.4.0
- CakePHP 1.3 (with solr-php-client)
- MySql 5.1.41
Observation: for the same search, the query strings are slightly different between the two environments. The LAMP version seems to be truncated, but I don't know how the value is derived so I can't be sure if the difference is significant.
LAMP (500 error): fields=9546e7be6d1d17fbd2e82f0d49a296b91853ddf0%253A
WAMP (results) : fields=9546e7be6d1d17fbd2e82f0d49a296b91853ddf0%253An%253A0%253A%257B%257D
Are there logs that might help troubleshoot the 500 error? Are there tests I can run directly through solr/admin that might shed light on the issue?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
问题解决了。 @aitchnyu:感谢您的时间和建议。
事实证明这是一个 CakePHP 问题。引用 php-solr-client 类的代码在 WAMP 和 LAMP 中的工作方式不同。在 WAMP 中,代码在正确大写文件/文件夹时有效。在 LAMP 中,引用必须全部使用小写,并添加包含正确大写的文件/文件夹名称的参数。
我在这里找到了答案:
http://cakebaker.42dh.com/2008/03/26/ load-vendor-files/
LAMP/WAMP 中的不同 URL 似乎无关紧要。
Problem solved. @aitchnyu: Thank you for your time and suggestions.
This turned out to be a CakePHP issue. The code to reference the php-solr-client classes works differently in WAMP and LAMP. In WAMP, code works when capitalizing file/folders properly. In LAMP, the reference must use all lower case with an added parameter containing properly capitalized file/folder names.
Here's where I found the answer:
http://cakebaker.42dh.com/2008/03/26/loading-vendor-files/
The different URLs in LAMP/WAMP appear to be insignificant.