Reputation: 4267
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.
Upvotes: 1
Views: 8540
Reputation: 17725
bootstrap.php
for production:Kohana::$environment = Kohana::PRODUCTION;
error_reporting(E_ALL ^ E_NOTICE ^ E_STRICT);
application/logs/month/day.php
file. Open this file and check what was the reason for error.Upvotes: 1
Reputation: 8101
I have experienced that in some cases my server will throw a 500 error (even with small stupid errors) if i dont apply these.
ini_set('display_errors', 1);
error_reporting(E_ALL);
Try applying these in the start of your code.
Upvotes: 4
Reputation: 1262
Are you using .htaccess file? It use to cause 500 internal server errors. Also check your server error logs
Upvotes: 0