dsj83686 2011-11-29 15:15
浏览 211
已采纳

亚马逊主机上的任何错误都有500内部服务器错误

I am working on amazon hosting using Kohana 3.x , PHP, and when there comes an error , it instead of showing error , it gives 500 internal server error. Due to which I have to debug my code on localhost but many times error come online only because many things can only be tested online then in that case I have to test it by commenting some part of code or line by line. So is there a way that instead of 500 internal server error it gives me actual PHP error or Kohana error that would be more helpful.

thanks in advance for your time guys.

  • 写回答

3条回答 默认 最新

  • duan198811 2011-11-29 15:45
    关注
    1. First of all never show PHP errors on a production website!
    2. Implement your own HTTP error pages - http://kohanaframework.org/3.2/guide/kohana/tutorials/error-pages
    3. Setup bootstrap.php for production:
      Kohana::$environment = Kohana::PRODUCTION;
      error_reporting(E_ALL ^ E_NOTICE ^ E_STRICT);
    4. Kohana comes up with built in error logging feature. Every HTTP error (404, 403, 500 etc) is automatically saved in application/logs/month/day.php file. Open this file and check what was the reason for error.
    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论
查看更多回答(2条)

报告相同问题?

悬赏问题

  • ¥15 执行 virtuoso 命令后,界面没有,cadence 启动不起来
  • ¥50 comfyui下连接animatediff节点生成视频质量非常差的原因
  • ¥20 有关区间dp的问题求解
  • ¥15 多电路系统共用电源的串扰问题
  • ¥15 slam rangenet++配置
  • ¥15 有没有研究水声通信方面的帮我改俩matlab代码
  • ¥15 ubuntu子系统密码忘记
  • ¥15 保护模式-系统加载-段寄存器
  • ¥15 电脑桌面设定一个区域禁止鼠标操作
  • ¥15 求NPF226060磁芯的详细资料