我正在尝试在我的小型服务器上建立一个中型 Drupal 7 网站,但我一直收到 500 错误消息。这是我在 Apache 的错误日志中发现的内容:
[Wed Sep 12 15:02:04 2012] [notice] SSL FIPS mode disabled
[Wed Sep 12 15:02:04 2012] [warn] No JkShmFile defined in httpd.conf. Using default /usr/local/apache/logs/jk-runtime-status
[Wed Sep 12 15:02:04 2012] [notice] Apache/2.2.22 (Unix) mod_ssl/2.2.22 OpenSSL/1.0.0-fips mod_auth_passthrough/2.1 mod_bwlimited/1.4 FrontPage/5.0.2.2635 mod_jk/1.2.35 configured -- resuming normal operations
[Wed Sep 12 15:02:07 2012] [error] [client 89.16.136.28] /usr/bin/php: error while loading shared libraries: libkrb5support.so.0: failed to map segment from shared object: Cannot allocate memory
[Wed Sep 12 15:02:07 2012] [error] [client 89.16.136.28] Premature end of script headers: index.php
[Wed Sep 12 15:02:07 2012] [error] [client 89.16.136.28] /usr/bin/php: error while loading shared libraries: libkrb5support.so.0: failed to map segment from shared object: Cannot allocate memory
[Wed Sep 12 15:02:07 2012] [error] [client 89.16.136.28] Premature end of script headers: index.php
[Wed Sep 12 15:02:07 2012] [error] [client 89.16.136.28] File does not exist: /home/brighton/public_html/favicon.ico
[Wed Sep 12 15:02:07 2012] [error] [client 89.16.136.28] /usr/bin/php: error while loading shared libraries: libkrb5support.so.0: failed to map segment from shared object: Cannot allocate memory
[Wed Sep 12 15:02:07 2012] [error] [client 89.16.136.28] Premature end of script headers: index.php
我联系了支持人员,他们只是告诉我我应该升级我的套餐(对,我有一个 512Mb 的帐户),但我不确定是否要购买它......即使我试图访问一个只包含 phpinfo() 的文件;我仍然会得到 500。
任何帮助都将不胜感激,如果需要任何其他信息,请告诉我,我会更新问题。我用 tomcat 编译了 apache,因为我打算使用 Solr... 不确定这是否相关。
答案1
在 JAVA_OPTS 中给出一些内存限制,例如参数“-Xmx256m”。我建议您使用此解决方案,但在某些 JDK 中似乎无法正常工作。