Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I just set up PHP and Apache and would like to find where the errors are going. What is the default path of the error logs in apache for PHP?

share|improve this question
You havent mentioned what kind of operating system you're running apache on. Check your apache config for the location of logfiles. – pauska Mar 22 '11 at 22:59
I am using Ubuntu OS. – Genadinik Mar 22 '11 at 23:01
Which is the file that should contain this information by the way? - Thanks! – Genadinik Mar 22 '11 at 23:02
up vote 6 down vote accepted

There are the locations in these popular operating systems:

RHEL / Red Hat / CentOS / Fedora Linux Apache error file location - /var/log/httpd/error_log

Debian / Ubuntu Linux Apache error log file location - /var/log/apache2/error.log

FreeBSD Apache error log file location - /var/log/httpd-error.log

The detailed answer about the Apache log files is here:

share|improve this answer

Try this:

  1. error_reporting = E_ALL | E_STRICT
  2. error_log = /var/log/php_errors.log
  3. Create log file manually
touch /var/log/php_errors.log
chown www-data: /var/log/php_errors.log
chmod +rw /var/log/php_errors.log

Now you can view PHP errors by this way

    tail /var/log/php_errors.log
share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.