【问题标题】:Codeception code coverage - file_get_contents exception (c3/report/clear)Codeception 代码覆盖率 - file_get_contents 异常 (c3/report/clear)
【发布时间】:2013-09-29 12:35:54
【问题描述】:

我正在使用 CodeceptionLaravel 4。特别是我正在尝试使用 remote code coverage 以便我可以在代码覆盖率结果中包含验收测试。

XDebug with remote_enable 已配置,c3.php 已安装并包含在 'public/index.php' 中。

在 Windows 上一切正常。但是在 Ubuntu 12.04 LTS(使用 PHP5.4)上我得到了这个异常:

 [ErrorException] file_get_contents(http://localhost/c3/report/clear): 
 failed to open stream: HTTP request failed! HTTP/1.1 500 Internal Server Error

我做错了什么?

【问题讨论】:

  • 您需要查看您的网络服务器的错误日志,500 错误通常是一个迹象。还要注意你在服务器上记录 PHP 错误并在那里检查错误日志。
  • @hakre 谢谢。包含 c3.php 时路径出现错误。
  • 是的 500 错误可能是很多事情,所以需要检查日志。仅通过错误代码很难判断。可能会将其添加为答案,以便记录下来以防其他人遇到类似问题。

标签: php phpunit codeception


【解决方案1】:

这很容易解决。包含 index.php 中的 c3.php 时路径出错。 Apache 错误日志清楚地说明了这一点。

【讨论】:

  • 我有一个不同的问题,但是查看 apache 日志是我没有想到的。 +1
猜你喜欢
  • 2011-05-27
  • 2011-03-18
  • 1970-01-01
  • 2021-09-27
  • 2015-04-18
  • 1970-01-01
  • 2012-06-30
  • 1970-01-01
  • 2018-01-11
相关资源
最近更新 更多