1

I am on OpenSUSE, I've installed PHP, when I test a simple PHP code, it works, but once I'm trying to display a PHP code that has errors, I get the following error :

The localhost page isn’t working localhost is currently unable to handle this request. HTTP ERROR 500

I have changed the value of display_errors to on in the php.ini file, I have also tried all solutions I could find but I still do get that message instead of the actual errors in my PHP file.

I have also added the following lines on the beginning of my PHP file but it didn't solve the problem :

ini_set('display_errors', 1);
error_reporting(~0);
Ouissal Benameur
  • 1,172
  • 1
  • 12
  • 33
  • 2
    **Related**: Take a look at the following http://stackoverflow.com/questions/845021/how-to-get-useful-error-messages-in-php – Script47 Jul 11 '16 at 14:18
  • Please include your code to be able to evaluate your problem. Also considering turning on your apache server as error is related to server. – Shyam Bhimani Jul 11 '16 at 15:31
  • Why not using a log file in this case? [http://stackoverflow.com/questions/3531703/how-to-log-errors-and-warnings-into-a-file](http://stackoverflow.com/questions/3531703/how-to-log-errors-and-warnings-into-a-file) – bilgec Jul 11 '16 at 16:29
  • @CanB I am using a log file, but I want them to be displayed in the browser instead. – Ouissal Benameur Jul 11 '16 at 20:04
  • @ShyamBhimani My question wasn't about the errors in my code, I am having issues in displaying them, if I write the following code in a file : I won't get an error saying that a comma is missing but I'll get that error I mentioned above instead, scripts with no errors work fine. – Ouissal Benameur Jul 11 '16 at 20:06
  • What IDE are you using ? – Shyam Bhimani Jul 11 '16 at 20:33
  • @ShyamBhimani I am using Komodo Edit 10 – Ouissal Benameur Jul 12 '16 at 08:35

0 Answers0