-2

I have programmed a php document that sends data to the local server (mysql) using POST. If I send data to the local server, I get: The localhost site is currently unable to process this request. HTTP ERROR 500.

I try to search the internet in various ways, but so far I haven't been able to solve the problem. Please anyone know how to solve this problem?

  • The very thing you'll have to do is: look into the log file(s) to learn, what the actual problem is... – Honk der Hase May 18 '22 at 08:28
  • 500 Internal Server Error is a generic error message informing you that the server crashed while processing the request. Beyond that, it's (intentionally) meaningless, and is of very little use for debugging. You need to check the error logs on the server to try and find the underlying exception message. Once you've got that, you stand a chance of identifying the problem. – ADyson May 18 '22 at 08:29
  • See [How can I get useful error messages in PHP?](https://stackoverflow.com/questions/845021/how-can-i-get-useful-error-messages-in-php) – ADyson May 18 '22 at 08:29

1 Answers1

0

Add this at the top of you php script and see what errors are shown

ini_set('display_errors', 1);
ini_set('display_startup_errors', 1);
error_reporting(E_ALL);
  • This won't help in most cases of a PHP fatal error... a 500 indicates a severe issues, like a parsing error. In this case, these script lines would not be executed at all. – Honk der Hase May 18 '22 at 11:33
  • 1
    @HonkderHase fair enough, thought I would suggest it as it helped me with a few 500 errors in the past. Had to add it as an answer as I don't have enought rep to comment – echobravocharlie May 18 '22 at 11:38