skip to Main Content

I am currently developing a web application using AWS services and it’s written in PHP. Previously, I used XAMPP to do the work, but now I use EC2 and RDS (MySQL) of AWS. And I also hosted the web on domain using Route 53 and it is secure with Certificate Manager (HTTPS enabled).

This is how I do my job. Sublime Text to write code, then copy paste the file from local to server using WinSCP. If nothing wrong, the code will instantly reflect in my webpage. However, unlike XAMPP, the ERROR will reflect exactly which line is going wrong. The approach I am using will only show HTTP 500 (Request cannot be handled) within the webpage.

For now, I have to test code by code to find the ERROR and it’s a waste of time. So, if I want to view which part is going wrong like XAMPP, how can I do so?

Thank you.

2

Answers


  1. In a production environment, it is recommended to switch off detailed errors so that your implementation details are not exposed. Sounds like this is the problem you’re facing with the new setup. You need to enable this in your php.ini file, and you might want to look into your .htaccess as well.

    Login or Signup to reply.
  2. By default, the Errors logs are stored at /var/log/apache2/error.log. So you can do something like the below to see the apache logs in real-time:

    tail -f /var/log/apache2/error.log
    
    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search