+4 votes
asked in Programming by (3k points)

I am entering my server and I see a 500 error that leaves me understand what is happening. Apparently the 500 error is a bug in PHP. My hosting is PHP and these pages should be running on this server , because I have working correctly on my local server.
Is there any way to make the server to display PHP errors instead of error 500 shows ? Because I used to when I was in my PHP error page , the error out own page and then could understand what was happening.
 Answer by Miguel Angel Alvarez We'll see . The theme that you can go through multiple issues.
One of them, most likely , is simple , because you just have to configure PHP.ini to display PHP errors . This is done in PHP.ini display_errors directive .
Most likely you will have in your php.ini the variable this way:
display_errors = Off
This would be right for a production server ( the server on which users enter to view the page ) , it should work properly. In a production environment can be a good idea not to show PHP errors so that users do not see critical or sensitive information . Of course, if you do not see errors , it may be difficult to know what is happening. Then, you can place the php.ini :
display_errors = On
However, you would also have access to php.ini. If you do not have access to modify that file , ask the service technician to your accommodation to be told how to display errors. Perhaps they will provide , through the control panel of your hosting , an option to view the PHP error log .
Well ... and another thing that can happen is that you have an error in your. Htaccess . If you have a file of these on your server , try to remove it temporarily to see if the error persists . If you no longer gives you that error , then check the htaccess to see what may be happening .

5 Answers

+3 votes
answered by (17.1k points)

Let's see if I can return one of the many support I received from desarrolloweb! 
To display errors such as Michael said, you have two choices: 
1) Modify the php.ini (which is delicate and if you are on a shared server you will not be able to edit) 
2) Place the required code in your. Php to modify the error report * for that file (the default does not affect your site or server) * 
Please add in the first line: 
/ / Report all PHP errors 
error_reporting (E_ALL); 
or (if the above does not work) 
/ / Same as error_reporting (E_ALL); 
ini_set ('error_reporting', E_ALL); 
This will make your file indicate that the file TEMPORARILY print errors, therefore you should do it in your index.php file, or whatever your file is called. 

+4 votes
answered by (17.1k points)
Show the error 
If you are using Internet Explorer: 
Go to Menu Tools> Internet Options> Advanced Options 
Then uncheck the option that says Show Friendly HTTP error messages. 
It should work, I hope so. 
Appreciate the contribution of others, probably because they spent so much time researching now make it "fast". 
+5 votes
answered by (8.1k points)
Error PHP programming 
The Error 500 usually goes bad because PHP is scheduled. may lack the; (semicolon) at the end of an expression. or may be something wrong Fingered check everything. 
Try the LocalHost there if that tells you wrong line. 
In Internet server 500 error only shows you
+6 votes
answered by (8.1k points)
This is very easy to just put in the FIRST LINE OF THIS CODE: 
<? php 
error_reporting (E_ALL); 
ini_set ('display_errors', '1'); 
+7 votes
answered by (3k points)
"This is very easy to just put in the FIRST LINE OF THIS CODE: 
<? php 
error_reporting (E_ALL); 
ini_set ('display_errors', '1'); 
> "
Thank you very much, I had exactly the same problem and've fixed a long time to find solutions with a couple of lines.
Ask a Question
Welcome to WikiTechSolutions where you can ask questions and receive answers from other members of the community.

You can ask a question without registration.