Report this

What is the reason for this report?

HTTP ERROR 500 when requesting data from rest api

Posted on November 6, 2020

Hello, I have a PHP CodeIgniter project that needs to separate between client side and server side. I’m using guzzle to make rest api. The problem is client side can’t retrieve data from rest api since few days ago and show HTTP error 500. Before this happened, my project is working properly on both local and hosting. This problem just happens on hosting. It works fine on my local and I can retrieve data with postman from my rest api and my local.

Please help me



This textbox defaults to using Markdown to format your answer.

You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

Hi there @tobiasjaya,

I would recommend starting with checking the logs, in there you will find more information on what the actual problem is rather than the generic 500 error.

To check the logs for Apache you can do that with the following command:

  1. sudo tail -100 /var/log/apache2/error.log

For more information on how to troubleshoot common problems with Apache I could suggest this post here:

https://www.digitalocean.com/community/tutorials/how-to-troubleshoot-common-apache-errors

Let me know how it goes! Regards, Bobby

The developer cloud

Scale up as you grow — whether you're running one virtual machine or ten thousand.

Get started for free

Sign up and get $200 in credit for your first 60 days with DigitalOcean.*

*This promotional offer applies to new accounts only.