HTTP ERROR 500 when requesting data from rest api

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

Submit an answer

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!

Sign In or Sign Up to Answer

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.

Want to learn more? Join the DigitalOcean Community!

Join our DigitalOcean community of over a million developers for free! Get help and share knowledge in Q&A, subscribe to topics of interest, and get courses and tools that will help you grow as a developer and scale your project or business.

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:

Let me know how it goes! Regards, Bobby