Error 500 PHP

Hi everyone,
I can’t get PHP to work in my website. When I write some PHP code, I get a 500 error: “The website cannot show this page. There might be a development error”. There is nothing in the error log.

Please help me.

It does sound like there is an issue with your code which is causing this issue. What log level are you using for PHP? Maybe if you increase the log level through error_reporting you’ll see more.
I haven’t seen the “There might be a development error” error before though. Is the error page generated by your browser or by your script? If it’s the latter, the script may be hiding the error messages.

Hello, I translated the error message of the browser into English. I’m using Microsoft EDGE, but the site has been tested with every browser. How do I change the error_reporting?


OK, a question I should probably have asked first: are you using a script you built yourself or is something you got elsewhere?

If you built the script yourself, you can just add a line of PHP like error_reporting(E_ERROR | E_WARNING | E_PARSE | E_NOTICE); to the start of your script (assuming you don’t call error_reporting already).

If you’re using a script you got elsewhere, you should check if the script has an error log file somewhere which contains more details or perhaps has a debug mode you can enable to see the error messages encountered by the script.