How to Handle “Unexpected response code 500” Error

As you might already know, I’ve been developing an Android app with the entire backend system hosted on my home Linux server. The setup is based on a LAMP architecture, which stands for Linux, Apache, MySQL, and PHP.

Below is an error I’ve encountered.

[78] NetworkUtility.shouldRetryException: Unexpected response code 500 for http://192.168.0.xx/sample.php

To troubleshoot issues with my PHP file, I ran the following command. This approach ensures that the error log is automatically displayed in the terminal console each time you perform a specific task on your client app (in my case, it’s my Android app).

tail -f /var/log/apache2/error.log

I hope this method proves helpful in resolving your bugs.

Leave a Reply