在我的Apache日志“预期令牌没有present”错误 [英] “Expected token not present” error in my Apache log

查看:300
本文介绍了在我的Apache日志“预期令牌没有present”错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我的网站上的Apache 2的mod_perl运行,并使用梅森模板系统。我没有使用任何认证系统或在我的网站的任何会议,但有时(任意)我得到这个错误:

My website runs on Apache 2 with mod_perl and uses the Mason template system. I am not using any authentication system or any sessions in my website, but sometimes (at random) I get this error:

服务器遇到一个内部错误或配置错误,
  无法完成您的请求。

Internal Server Error

The server encountered an internal error or misconfiguration and was unable to complete your request.

请与服务器管理员联系,webmaster@admin.org
  并通知他们的错误发生的时间,以及任何你可能
  这样做,是可能造成的错误。

Please contact the server administrator, webmaster@admin.org and inform them of the time the error occurred, and anything you might have done that may have caused the error.

有关此错误的更多信息可在服务器错误可用
  登录。

More information about this error may be available in the server error log.

此外,遇到了500内部服务器错误,而错误
  试图使用ErrorDocument来处理请求。

Additionally, a 500 Internal Server Error error was encountered while trying to use an ErrorDocument to handle the request.

在错误日志中,相应的记录是:

In the error log, the corresponding record is:

[Mon Dec 19 09:34:26 2011] [error] [client 127.0.0.1] Expected token not present

Server版本字符串:

Server version string:

Apache/2.2.8 (Ubuntu) mod_apreq2-20051231/2.6.0 mod_perl/2.0.3 Perl/v5.8.8 Server

我的浏览器发送这个奇怪的cookie:

My browsers sends this weird cookie:

Name:                   BC_BANDWIDTH
Content:                1324486772745,6811
Domain:                 example.org
Path:                   /
Send For:               Any kind of connection
Accessible to Script:   Yes
Created:                Wednesday, December 21, 2011 12:59:09 PM
Expires:                When I close my browser

当我删除它,我可以重新载入我的网页和它的作品。但是经过几次点击的问题再次出现。

When I delete it, I can reload my page and it works. However after a couple of clicks the problem reappears.

为什么我得到的错误在我的错误日志?如何解决?

推荐答案

由于省略您的解决方案return语句,你不得不绕程序语句的评估块为好。否则,你可以期望一个首次星座,其中一个功能cookie_class被称为上未定义值什么会抛出异常。因此

Because you omit the return statement in your solution, you had to circle the proceeding statement in an eval block as well. Otherwise you can expect a first time constellation where a function "cookie_class" is called on an undefined value what would throw an exception. Therefore

此外替换

$jar->cookie_class(__PACKAGE__);

eval {$jar->cookie_class(__PACKAGE__)};

享受!

这篇关于在我的Apache日志“预期令牌没有present”错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆