"The localhost page isn’t working
localhost is currently unable to handle this request.
HTTP ERROR 500"
This is the error message my browser displayed.
I don't know why, I installed Magento on Windows and there was no problem, but when I install it on my Ubuntu, my browser say that, please help me and thank you for the help.
An error 500 is an error on the server side.
Maybe you have a typo in your code which makes it break.
As you tried it on Windows, it could come from this as well, as Windows is not case sensitive with files, and ubuntu is.
You should try looking at the server logs to have more information.
Or else put those lines in your index.php, it should show you the errors and help you debugging it (there is a developper mode you can enable in Magento but I prefere adding all those lines to get more informations) :
ini_set('error_reporting', E_ALL);
ini_set('display_errors', 1);
ini_set('display_startup_errors', 1);
Related
I am a beginner in PHP and have a problem. My browser is not showing the errors from a PHP file. It only says This page isn’t working 127.0.0.1 is currently unable to handle this request.HTTP ERROR 500. I want the errors to be displayed(like a notice). I am using Docker. I have searched everywhere and don't know what to do. Please help.
p.s Also I can not find my php.ini file. Tried putting this code in the PHP file , but still it doesn't work
error_reporting(E_ALL);
error_reporting(-1);
ini_set('error_reporting', E_ALL);
I have a web application programmed in php hosted on windows server which was working great until recently he encountered "http 500 internal server error" only on 1 php page which was basically retrieving and displaying information from database. i checked to see what can be the possible reasons for that error to happen. when i tried to generate the same error after including ini_set('display_errors', 1); in that php page, the page started working.
and I dont know what was the reason which was causing that http 500 error to generate.
if anyone has idea about this issue then please share the knowledge, it would be great help.
Check the php_error.log, if you do not know the location, open php.ini and find the path, or enable it if not enabled. Then log the error.
I created a simple php webcrawler on my webhost, but after a while it gives a 500 internal server error.
Assuming the coding and permissions are good.. what can I do about it?
I upgraded from shared hosting to VPS hosting, but it seems to give the error even sooner. I am really lost here.
Follow these steps:
-Enable the error reporting from php.ini file or by functions like
error_reporting(E_ALL);
ini_set('display_errors', '1');
Disable .htaccess file
Check the error_log
I looked PHP.ini files but error mode is on there?
But when there is error in my code I cannot see php showing error??
I use local host called AMPPS.
And whenever there is error i see blank page like if i use:
require('something.php');
There is a blank page instead of showing fatal error or warnings.
I use CodeCanyon script. Can script change the error showing mode?
How can I display all there error even if it is small on as I am on development mode.
Can script change the error showing mode?
Yes, it can. For starters you can set this in your PHP file—before code like require('something.php');—to force errors to show:
error_reporting(E_ALL);
ini_set('display_errors', 1);
But that said, if errors are not displayed at all, check your Apache logs in your setup. Unclear on where in AMPPS the logs would be stored—or what your host system running AMPPS is—but there should be a log in there somewhere.
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.
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.
First of all never show PHP errors on a production website!
Implement your own HTTP error pages - http://kohanaframework.org/3.2/guide/kohana/tutorials/error-pages
Setup bootstrap.php for production:
Kohana::$environment = Kohana::PRODUCTION;
error_reporting(E_ALL ^ E_NOTICE ^ E_STRICT);
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.
Are you using .htaccess file? It use to cause 500 internal server errors. Also check your server error logs