Check php errors log in my EC2 Instance running Amazon Linux

26,289

Solution 1

Depending what configuration you use, the errors will either go into the web server error log file, or it will be stored in /var/log/php-fpm/5.6/ (assuming you are using 5.6)

Solution 2

It is in /var/log/httpd/error_log

To debug and see log changes you can do

tail -f /var/log/httpd/error_log
Share:
26,289
idelara
Author by

idelara

Updated on July 29, 2022

Comments

  • idelara
    idelara almost 2 years

    Iv have been trying to find a way on how to find where my php errors log file is stored in. I am using an EC2 Instance, in Amazon AWS running Amazon Linux. Usually, when using MAMP, I get some PHP Warnings and Notices I can see in a php_log file.

    I have been looking for the file, and still no luck finding it.

    Do you know where I can find the error log (file)?

    Thanks a lot!

    Cheers.

  • idelara
    idelara about 8 years
    Where would the web server error log file would be? Do you happen to know?
  • datasage
    datasage about 8 years
    Most applications put logs in /var/log. With both apache and nginx you can tell it to store logs elsewhere, but if you haven't done that you should find them in /var/log/httpd or /var/log/nginx
  • idelara
    idelara about 8 years
    Thanks! I could find it under /var/log/httpd
  • Kevin
    Kevin about 6 years
    this works on my end, my current environment is ec2 linux ami
  • Curtis
    Curtis over 4 years
    What do I do if my httpd folder is empty?
  • Curtis
    Curtis over 4 years
    What do I do if I don't have a php-fpm folder?
  • user2335065
    user2335065 almost 4 years
    It says permission denied when I try to access the /var/log/httpd/ folder
  • alttag
    alttag over 3 years
    If you're getting "permission denied", then put sudo in front of the command: tail -f /var/log/httpd/error_log