2

I'm running Apache2 on Ubuntu 10.04 LTS. I've configured /etc/php5/apache2/php.ini with the following:

error_reporting = E_ALL & ~E_DEPRECATED display_errors = Off log_errors = On error_log = /var/log/php_errors.log 

I have a PHP application that I believe has an error in it. With those settings and the suspected error, no php_errors.log was created. So, I created a PHP file with syntax errors. Still no php_errors.log. What are some reasons why PHP would not log errors?

Could it be permissions? I see that /var/log is owned by root:root. I don't know what owns the php process. I believe root starts the apache process and then a new starts a new thread using www-data:www-data for serving files. Would that mean I need to change permissions on the /var/log folder?

2
  • Try putting the log file in the apache log directory /var/log/apache2/php_errors.log, do not change the permissions on the /var/log folder Commented Aug 13, 2010 at 4:39
  • Thanks, I changed the error log path as you suggested by I'm still seeing no errors. Commented Aug 13, 2010 at 13:11

1 Answer 1

1

The following should fix you up ;-)

touch /var/log/php_errors.log chown www-data: /var/log/php_errors.log 
0

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.